docs: function updateRating(rating, config, conn) {
  
    // validate
    if (!rating.uri || rating.uri === '') {
      return 'You must enter a valid uri'
    }
    if (!rating.reviewer || rating.reviewer === '') {
      return 'You must enter a valid reviewer'
    }
    if (isNaN(rating.rating)) {
      return 'You must enter a valid rating'
    }
  
    // defaults
    config = config || require('../config/config.js')
  
  
    // main
    return new Promise((resolve, reject) => {
  
      if (!conn) {
        var conn = wc_db.getConnection(config.db)
      }
  
      var sql = 'UPDATE Rating r join User u on u.id = r.reviewer_id set r.rating = :rating where u.uri = :reviewer and r.uri = :uri'
  
      debug('updateRating', sql, rating)
  
      conn.query(sql, { replacements: { "uri" : rating.uri, "reviewer" : rating.reviewer, "rating" : rating.rating } }).then(function(ret){
        return resolve({"ret" : ret, "conn" : conn})
      }).catch(function(err) {
        return reject({"err" : err, "conn" : conn})
      })
  
    })
  
  }