Updates from the resource
@method put <public>
@argument params <optional> [Object]
@argument callback <optional> [Function]
421941
function update(requestObj, callback) {

            var i, found, storedData, storage;

            storage = this;

            callback = callback || function(){};

            if ((typeof requestObj) === 'undefined' || requestObj === null) {
                callback(null);
                return this;
            }
            
            requestObj.config = {};
            requestObj.config.url = requestObj.config.url || this.url.put;
            requestObj.config.type = requestObj.config.type || this.constructor.REQUEST_TYPE_POST;

            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }

            this.constructor._sendRequest(requestObj, function(data){
                for (i = 0; i < storage.processors.length; i++) {
                    data = storage.processors[i](data, requestObj);
                }
                callback(data);
            });

            return this;
        }
1004536
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);
    });
}
401148
public void setParams(java.util.Collection<UpdateParam> params) {
        if (params == null) {
            this.params = null;
            return;
        }

        this.params = new java.util.ArrayList<UpdateParam>(params);
    }
1085119
public static function put($urls, $data = null, callable $callback = null)
    {
        return static::make('put', $urls, $data, $callback);
    }
169508
function( key, info, callback ){
    this.log.debug('Updating info %s %s', key, info.status);
    this._query("update " + this.infoTable + " set info = '" + JSON.stringify(info) + "' where id = '"+key+":info'", function(err, result){
      if ( err || !result ){
        callback('Key Not Found ' + key, null);
      } else {
        callback(null, true);
      }
    });
  }
817798
function (context, callback) {

            if (this.$resourceConfiguration.$.upsert === true) {
                callback(new HttpError("Please create with PUT", 405));
                return;
            }

            var self = this,
                model,
                processor;

            flow()
                .seq("collection", function (cb) {
                    self._findCollection(context, cb);
                })
                .seq(function () {
                    model = this.vars.collection.createItem();

                    var payload = context.request.params;

                    processor = self.$restHandler.$restDataSource.getProcessorForModel(model);

                    model.set(processor.parse(model, payload));

                    if (model.createdField) {
                        model.set(model.createdField, new Date());
                    }
                })
                .seq(function () {
                    self._generateAutoValues(model);
                })
                .seq(function (cb) {
                    self._validate(model, context, cb);
                })
                .seq(function (cb) {
                    self._beforeModelSave(model, context, cb);
                })
                .seq(function (cb) {
                    self._beforeModelCreate(model, context, cb);
                })
                // validate and save model
                .seq(function (cb) {
                    model.validateAndSave({action: DataSource.ACTION.CREATE }, cb);
                })
                .seq(function (cb) {
                    self._afterModelCreate(model, context, cb);
                }).
                exec(function (err, results) {
                    if (!err) {
                        // TODO: do correct invalidation
                        results.collection.invalidatePageCache();

                        var body = JSON.stringify(processor.compose(model, null));

                        var response = context.response;
                        response.writeHead(201, "", {
                            'Content-Type': 'application/json',
                            'Location': context.request.urlInfo.uri + "/" + model.identifier()
                        });

                        response.write(body);
                        response.end();

                        callback(null);
                    } else {
                        if (!(err instanceof HttpError)) {
                            var statusCode = 400;
                            // TODO: add more error handling
                            err = new HttpError(err, statusCode);
                        }
                        callback(err);
                    }
                });
        }
1090121
function update(item, model, data, funcParams) {
    var working = [];
    var definedByData = [];

    _.forEach(data, function(value, key) {
        if (_.isFunction(value)) {
            working.push(Promise.resolve(value()).then(function(val) {
                item[key] = val;
            }));
        } else item[key] = value;
        definedByData.push(value);
    });

    _.forEach(model.itemDef, function(value, key) {
        if (value && value.__precalc) {
            var func = value.__precalc, previousVal = data[key];
            working.push(Promise.resolve(func.call(item, previousVal, funcParams || {})).then(function(val) {
                item[key] = (val && val._stWrapped) ? val.val : val;
            }));
        } // if the property has not been set from the itemDef yet. This allows item def properties to be changed
        else if (!_.has(item, key) || definedByData.indexOf(key) !== -1) item[key] = value;
    });

    return Promise.all(working);
}
154444
function update(clientModelDoc, callback) {
      var cb = callback || angular.noop;

      return ClientModelDoc.update(clientModelDoc,
        function (clientModelDoc) {
          return cb(clientModelDoc);
        },
        function (err) {
          return cb(err);
        }).$promise;
    }
981875
def put(self, data, request, id):
        
        if not id:
            # can't update the whole container
            raise errors.MethodNotAllowed()
        userdata = self._dict_to_model(data)
        userdata.pk = id
        try:
            userdata.save(force_update=True)
        except DatabaseError:
            # can't udpate non-existing user
            raise errors.NotFound()
1143811
function(params) {
                var that = this;
                return corbel.request.send(params, that.driver).then(function(response) {

                    that.driver.config.set(corbel.Services._FORCE_UPDATE_STATUS, 0);
                    that.driver.config.set(corbel.Services._UNAUTHORIZED_NUM_RETRIES, 0);

                    return response;

                }).catch(function(response) {
                    // Force update
                    if (response.status === corbel.Services._FORCE_UPDATE_STATUS_CODE &&
                        response.textStatus === corbel.Services._FORCE_UPDATE_TEXT) {

                        var retries = that.driver.config.get(corbel.Services._FORCE_UPDATE_STATUS, 0);
                        if (retries < corbel.Services._FORCE_UPDATE_MAX_RETRIES) {
                            retries++;
                            that.driver.config.set(corbel.Services._FORCE_UPDATE_STATUS, retries);

                            that.driver.trigger('force:update', response);

                            throw response;
                        } else {
                            throw response;
                        }
                    } else {
                        throw response;
                    }

                });
            }
108546
function(callback, options, params) {
        var options = options || ((_.isObject(callback) && !_.isFunction(callback)) ? callback : {});
        if (params) {
            options = _.extend({}, options, params);
        }

        return options
    }
686657
async def update(self):
    '''
    
    '''
    keys = self.extras.keys()
    self.extras = {}
    for key in keys:
      try:
        func = getattr(self, key, None)
        if callable(func):
          func()
      except:
        pass
1159592
public function update(string $id, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::PUT,
            ResourceMethodEnum::UPDATE,
            $params,
            $id
        );
    }
736792
def update_params(self, params):
        
        if not params.get('BINARY', True):
            raise Warning('To increase performance please use ElastiCache'
                          ' in binary mode')
        else:
            params['BINARY'] = True  # patch params, set binary mode
        if 'OPTIONS' not in params:
            # set special 'behaviors' pylibmc attributes
            params['OPTIONS'] = {
                'tcp_nodelay': True,
                'ketama': True
            }
475205
def update(params={})
      update_attributes(params) unless params.empty?
      response = put(Lead.url_for("lead", self.guid), self.changed_attributes)
      true
    end
10996
def put(self, url, data=None, params=None):
        
        return self.request("put", url, data, params)
294143
public RuleUpdate setParameters(Map<String, String> params) {
    checkCustomRule();
    this.parameters.clear();
    this.parameters.putAll(params);
    this.changeParameters = true;
    return this;
  }