Create the grammar for the 'update' statement
183645
def create_update():
    
    update = upkey("update").setResultsName("action")
    returns, none, all_, updated, old, new = map(
        upkey, ["returns", "none", "all", "updated", "old", "new"]
    )
    return_ = returns + Group(
        none | (all_ + old) | (all_ + new) | (updated + old) | (updated + new)
    ).setResultsName("returns")
    return (
        update
        + table
        + update_expr
        + Optional(keys_in)
        + Optional(where)
        + Optional(using)
        + Optional(return_)
        + Optional(throttle)
    )
300560
def update(self, *args, **kwargs):
        '''
        
        '''
        preprocess = kwargs.get('preprocess')
        for s in args:
            for e in s:
                self._dict_set(preprocess(e) if preprocess else e, True)
1265093
def custom_update(self, data, pred, obj):
        '''  '''
        if isinstance(data[pred], str): # for all simple properties of str value
            data[pred] = str(obj)
        else: # synonyms, superclasses, and existing_ids have special requirements
            if pred == 'synonyms':
                literals = [d['literal'] for d in data[pred]]
                if obj not in literals:
                    data[pred].append({'literal': obj}) # synonyms req for post
            elif pred == 'superclasses':
                ilx_ids = [d['ilx'] for d in data[pred]]
                if obj not in ilx_ids:
                    _obj = obj.replace('ILX:', 'ilx_')
                    super_data, success = self.get_data_from_ilx(ilx_id=_obj)
                    super_data = super_data['data']
                    if success:
                        # superclass req post
                        data[pred].append({'id': super_data['id'], 'ilx': _obj})
                    else:
                        return self.test_check('Your superclass ILX ID '
                                                + _obj + ' does not exist.')
            elif pred == 'existing_ids':  # FIXME need to autogenerate curies from a map
                iris = [d['iri'] for d in data[pred]]
                if obj not in iris:
                    if 'http' not in obj:
                        return self.test_check('exisiting id value must \
                                               be a uri containing "http"')
                    data[pred].append({
                        'curie': self.qname(obj),
                        'iri': obj,
                        'preferred': '0' # preferred is auto generated by preferred_change
                    })
                #data[pred] = []
                data = self.preferred_change(data) # One ex id is determined to be preferred
            else:
                # Somehow broke this code
                return self.test_check(pred + ' Has slipped through the cracks')
        return data
984450
function update(){
    now = new Date();
    var time = now.getHours().toString() + ("0" + now.getMinutes().toString()).slice(-2);
    display.writeString(time);
    display.setColon(colon = !colon);
}
585408
def _update(self, tree):
        
        tablename = tree.table
        table = self.describe(tablename, require=True)
        kwargs = {}

        if tree.returns:
            kwargs["returns"] = "_".join(tree.returns)
        else:
            kwargs["returns"] = "NONE"

        visitor = Visitor(self.reserved_words)
        updates = UpdateExpression.from_update(tree.update)
        kwargs["expression"] = updates.build(visitor)
        if tree.where:
            constraints = ConstraintExpression.from_where(tree.where)
            kwargs["condition"] = constraints.build(visitor)
        kwargs["expr_values"] = visitor.expression_values
        kwargs["alias"] = visitor.attribute_names
        return self._query_and_op(tree, table, "update_item", kwargs)
1086254
def generate_update_view(self):
        """"""

        name = model_class_form(self.model + 'UpdateView')
        update_args = dict(
            form_class=self.get_actual_form('update'),
            model=self.get_model_class,
            template_name=self.get_template('update'),
            permissions=self.view_permission('update'),
            permission_required=self.check_permission_required,
            login_required=self.check_login_required,
            inlineformset=self.inlineformset,
            custom_form=self.createupdate_forms or self.custom_modelform,
            success_url=reverse_lazy('{}-{}-list'.format(self.app, self.custom_postfix_url)),
            custom_postfix_url=self.custom_postfix_url
        )

        parent_classes = [self.get_createupdate_mixin(), UpdateView]
        if self.custom_update_view_mixin:
            parent_classes.insert(0, self.custom_update_view_mixin)

        update_class = type(
            name,
            tuple(parent_classes),
            update_args
        )
        self.classes[name] = update_class
        return update_class
1065013
function() {
    this.appendDummyInput()
        .appendField(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE);
    this.appendStatementInput('STACK');
    this.appendDummyInput('STATEMENT_INPUT')
        .appendField(Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS)
        .appendField(new Blockly.FieldCheckbox('TRUE'), 'STATEMENTS');
    this.setColour(Blockly.Blocks.procedures.HUE);
    this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP);
    this.contextMenu = false;
  }
721429
def update(self, *a, **ka):
        
        prefix = ''
        if a and isinstance(a[0], basestring):
            prefix = a[0].strip('.') + '.'
            a = a[1:]
        for key, value in dict(*a, **ka).items():
            self[prefix + key] = value
1085037
protected ActionCommand createUpdateCommand()
    {
        ActionCommand command = new ActionCommand(UPDATE_COMMAND_ID)
        {

            @Override
            protected void doExecuteCommand()
            {
                doUpdate();
            }
        };
        command.setSecurityControllerId(getId() + "." + UPDATE_COMMAND_ID);
        getApplicationConfig().commandConfigurer().configure(command);
        getDetailForm().addGuarded(command, FormGuard.LIKE_COMMITCOMMAND);
        return command;
    }
926658
function(config){
   Statement.apply( this, arguments ); // Call the Statement (super) contructor

     if (!config) {
            config = {};
     }
    // We can have a serialized version (with trailing ) or a programmatically config, easier without _
    this._verb = config._verb || config.verb || Statement.VERB_MEASURE;
    this._label = config._label || config.label || null;
    this._metadata = config._metadata || config.metadata || {};
    this._params = config._params || config.params || {};

    if (config.when || config._when)
        this._when = config.when || config._when;
     this.get_token();

    if (!this._resultvalues || (this._resultvalues === "undefined") )
        this._resultvalues = {};
    
    return this;// Chaining
}
379039
protected function translateUpdate()
    {
        $build = 'update ' . $this->escapeTable() . ' set ';

        // add the array values.
        foreach ($this->attr('values') as $key => $value) {
            $build .= $this->escape($key) . ' = ' . $this->param($value) . ', ';
        }

        // cut away the last comma and space
        $build = substr($build, 0, -2);

        // build the where statements
        if ($wheres = $this->attr('wheres'))
        {
            $build .= $this->translateWhere($wheres);
        }
    
        // build offset and limit
        if ($this->attr('limit'))
        {
             $build .= $this->translateLimit();
        }

        return $build;
    }
848588
def pref_update(self, key, new_val):
        
        print('Update and save pref from: %s=%r, to: %s=%r' %
              (key, six.text_type(self[key]), key, six.text_type(new_val)))
        self.__setattr__(key, new_val)
        return self.save()
557900
function update() {
  for (var
    tmp,
    promise = false,
    updates = this.updates,
    template = this.chunks,
    out = [template[0]],
    i = 1,
    length = arguments.length;
    i < length; i++
  ) {
    tmp = arguments[i];
    if (
      (typeof tmp === 'object' && tmp !== null)
      &&
      (typeof tmp.then === 'function' || 'placeholder' in tmp)
    ) {
      promise = true;
      out.push(
        ('placeholder' in tmp ? invokeAtDistance(tmp, false) : tmp)
          .then(updates[i - 1]),
        template[i]
      );
    } else {
      out.push(updates[i - 1](tmp), template[i]);
    }
  }
  return promise ? Promise.all(out).then(asBuffer) : asBuffer(out);
}
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
1104663
def statement(type, hook, opt={})
      lang = opt[:lang] || Cog.active_language
      lang.comment_pattern("#{type}\\s*:\\s*(#{hook})\\s*(?:\\(\\s*(.+?)\\s*\\))?(\\s*once\\s*)?(?:\\s*([{]))?")
    end
354298
function (key, regexp, replacement, editor) {
            key = key.toLowerCase();

            return getPreviousKeyForEditing(key, editor)
            .then(bindr(Result.andThen, editOnlyWhenPreviousKeyExists))
            .then(bindr(Result.andThen, function (description) {
                const old_message = description.message;
                const new_message = old_message
                    .replace(regexp, replacement)
                    .replace(/\s+/, " ");

                if (old_message === new_message) {
                    return Fail("unchanged");
                }

                if (new_message.length > maxMessageLength) {
                    return Fail("message-length-exceeded");
                }

                if (new_message === "") {
                    return Fail("no-message-left");
                }

                description.message = new_message;
                description.editor = editor;
                description.time = now();

                return Ok(description);
            }))
            .then(bindr(Result.andThen, beforeUpdate))
            .then(bindr(Result.map, function (value) {
                db.set(key, value);
                return value;
            }));
        }
218452
private static PreparedStatement createStatementForUpdate(final Connection connection,
                                                             final Introspected introspected,
                                                             final FieldColumnInfo[] fieldColumnInfos,
                                                             final Set<String> excludedColumns) throws SQLException
   {
      final String sql = createSqlForUpdate(introspected, fieldColumnInfos, excludedColumns);
      return connection.prepareStatement(sql);
   }