code: function update(instance, array, tx, callback) {
      var
          model = instance.__model,
          beforeUpdate = model.__beforeUpdate,
          updates,
          params,
          sql;
      if (beforeUpdate) {
          beforeUpdate(instance);
      }
      if (!array) {
          array = model.__updateAttributesArray;
      }
      updates = _.map(array, function (attr) {
          return '`' + attr + '`=?';
      });
      params = _.map(array, function (attr) {
          return instance[attr];
      });
      params.push(instance[model.__primaryKey]);
      sql = utils.format('update `%s` set %s where `%s`=?', model.__table, updates.join(', '), model.__primaryKey);
      smartRunSQL(model.__pool, sql, params, tx, function (err, result) {
          if (err) {
              return callback(err);
          }
          callback(null, instance);
      });
  }
docs: update an instance data: