For UPDATE_RESULT
The parameters are set afterwards as the Result is reused
177332
public static Result newUpdateResultRequest(Type[] types, long id) {

        Result result = newResult(ResultConstants.UPDATE_RESULT);

        result.metaData = ResultMetaData.newUpdateResultMetaData(types);
        result.id       = id;

        result.navigator.add(new Object[]{});

        return result;
    }
772829
def _update_params(self):
        
        if self.data.get('title'):
            self.params['title'] = self.data.get('title')
        if self.data.get('pageid'):
            self.params['pageid'] = self.data.get('pageid')
        if self.data.get('wikibase'):
            self.params['wikibase'] = self.data.get('wikibase')
878575
def assign_from_old(params, new_params)
      queued_deletes = []

      params.attributes.each_pair do |name, old_val|
        # If there is a new value, see if it has [name]
        new_val = new_params ? new_params[name] : nil

        if !new_val
          # Queues the delete until after we finish the each_pair loop
          queued_deletes << name
        elsif new_val.is_a?(Hash)
          assign_from_old(old_val, new_val)
        else
          # assign value
          params.set(name, new_val) if old_val != new_val
          new_params.delete(name)
        end
      end

      queued_deletes.each { |name| params.delete(name) }
    end
554986
def put(self, result, decorated_function, *args, **kwargs):
		
		self._storage[decorated_function] = result
578398
def putResult(self, result):
        """"""
        self._lock_prev_output.acquire()
        for tube in self._tubes_result_output:
            tube.put((result, 0))
        self._lock_next_output.release()
1209515
def update(self):
        
        def process_result(result):
            self.raw = result
        return Command('get', self.path, process_result=process_result)
1355994
public void setResult(Object result) {
        if (resultSent) {
            throw new RuntimeException("You can only set the result once.");
        }
        this.resultSent = true;
        Channel channel = this.channel.get();
        if (channel == null) {
            log.warn("The client is no longer connected.");
            return;
        }
        call.setResult(result);
        Invoke reply = new Invoke();
        reply.setCall(call);
        reply.setTransactionId(transactionId);
        channel.write(reply);
        channel.getConnection().unregisterDeferredResult(this);
    }
697524
def update_model_params(self, **params):
        """
        for key, value in params.items():
            if not hasattr(self, key):
                setattr(self, key, value)  # set parameter for the first time.
            elif getattr(self, key) is None:
                setattr(self, key, value)  # update because this parameter is still None.
            elif value is not None:
                setattr(self, key, value)
525965
private function processHitResults(&$results, $result_set, $query_settings) {
        // If we're only returning hits, we can return the count here.
        if($query_settings['count']) {
            $results[] = ['count' => array_sum(array_map(function($x) { return $x['hits']['total']; }, $result_set))];
            return;
        }

        foreach($result_set as $result) {
            foreach($result['hits']['hits'] as $result) {
                $result = array_merge($result, $result['_source']);
                unset($result['_source']);
                if($query_settings['flatten']) {
                    $result = $this->flattenResults($result);
                }

                $results[] = $result;
            }
        }
    }
593585
function update(values, returning) {
    var ret,
        obj = this._single.update || {};
    this._method = 'update';
    if (typeof values === 'string') {
      obj[values] = returning;
      if (arguments.length > 2) {
        ret = arguments[2];
      }
    } else {
      var i = -1,
          keys = Object.keys(values);
      if (this._single.update) {
        debug('Update called multiple times with objects.');
      }
      while (++i < keys.length) {
        obj[keys[i]] = values[keys[i]];
      }
      ret = arguments[1];
    }
    if (!isEmpty(ret)) {
      this.returning(ret);
    }
    this._single.update = obj;
    return this;
  }
612107
def _prepare_results(self, results):
        
        # if we want a result sorted by a score, and if we have a full result
        # (no slice), we can do it know, by creating keys for each values with
        # the sorted set score, and sort on them
        if self._sort_by_sortedset_after and (len(results) > 1 or self._values):
            conn = self.cls.get_connection()

            sort_params = {}
            base_tmp_key, tmp_keys = self._prepare_sort_by_score(results, sort_params)

            # compose the set to sort
            final_set = '%s_final_set' % base_tmp_key
            conn.sadd(final_set, *results)

            # apply the sort
            results = conn.sort(final_set, **sort_params)

            # finally delete all temporary keys
            conn.delete(*(tmp_keys + [final_set, base_tmp_key]))

        if self._store:
            # if store, redis doesn't return result, so don't return anything here
            return

        if self._values and self._values['mode'] != 'flat':
            results = self._to_values(results)

        return super(ExtendedCollectionManager, self)._prepare_results(results)
639417
def Update(self, data):
        
        m = len(data)
        self.params[:m] += data
896041
function (parameters, result) {
                var
                    len,
                    idx,
                    parameter,
                    name,
                    value;
                len = parameters.length;
                for (idx = 0; idx < len; ++idx) {
                    parameter = parameters[idx];
                    name = parameter._name;
                    if (undefined === result[name]) {
                        if (parameter._required) {
                            gpf.Error.paramsRequiredMissing({
                                name: name
                            });
                        }
                        value = parameter._defaultValue;
                        if (undefined !== value) {
                            if (parameter._multiple) {
                                value = [value];
                            }
                            result[name] = value;
                        } else if (parameter._multiple) {
                            result[name] = [];
                        }
                    }
                }
            }
870026
public void setResult(T result) {
        lock.lock();
        try {
            if(Objects.equals(expected_result, result))
                super.setResult(result);
        }
        finally {
            lock.unlock();
        }
    }
514215
def set_result(self, result):
        '''
        
        '''
        if hasattr(self, '_result'):
            raise ValueError('Cannot set the result twice')
        self._result = result
        self._scheduler.emergesend(FutureEvent(self, result = result))
438130
def update(self, **kwargs):
        
        if self.condition is not None:
            self.result = self.do_(self.model.table.update().where(self.condition).values(**kwargs))
        else:
            self.result = self.do_(self.model.table.update().values(**kwargs))
        return self.result
625195
def add(self, new_results):
        
        for result in new_results:
            result.update(self.context)
            self.results = self.results.append(result, ignore_index=True)