run relationship updates on input (used by store and update)
170966
private static function processRelationsInput($table, $row_id) {

		foreach ($table->fields as $field) {
			if ($field->type == 'checkboxes') {
				
				# Figure out schema
				$object_column = self::formatKeyColumn($table->name);
				$remote_column = self::formatKeyColumn($field->source);

				# Clear old values
				DB::table($field->name)->where($object_column, $row_id)->delete();

				# Loop through and save all the checkboxes
				if (Request::has($field->name)) {
					foreach (Request::input($field->name) as $related_id) {
						DB::table($field->name)->insert([
							$object_column=>$row_id,
							$remote_column=>$related_id,
						]);
					}
				}
				
			} elseif ($field->type == 'image') {
				
				# Capture the uploaded file by setting the reverse-lookup
				DB::table(config('center.db.files'))
					->where('id', Request::input($field->name))
					->update(['row_id'=>$row_id]);

			} elseif ($field->type == 'images') {

				# Unset any old file associations (will get cleaned up after this loop)
				DB::table(config('center.db.files'))
					->where('table', $table->name)
					->where('field', $field->name)
					->where('row_id', $row_id)
					->update(['row_id' => null]);

				# Create new associations
				$file_ids = explode(',', Request::input($field->name));
				$precedence = 0;
				foreach ($file_ids as $file_id) {
					DB::table(config('center.db.files'))
						->where('id', $file_id)
						->update([
							'row_id' => $row_id,
							'precedence' => ++$precedence,
						]);
				}

			}
		}
	}
129065
def execute_update(self, update, safe=False):
		''' 
		'''

		# safe = self.safe
		# if update.safe is not None:
		#     safe = remove.safe

		assert len(update.update_data) > 0
		self.queue.append(UpdateOp(self.transaction_id, self, update.query.type, safe, update))
		if self.autoflush:
			return self.flush()
623582
function replace(id, item, store) {
      var data = store.rootData.asObject();
      // Check id coincidence
      if (data[id.toString()]) {
        // Add item id property if it hasn't
        item[store.idProperty] = id.toString();
        // Replace item
        data[id.toString()] = item;
        // Update store data
        store.rootData = store.data = new Result(data,store, store.data.__sorted);
        // Update store data items length
        store.size = Object.keys(store.data).length;
        // Trigger onSourceChanged event
        vcomet.triggerCallback("onSourceChanged", store);
      } else {
        // Item not found warning
        return vcomet.error.log("store", "Item with id " + id + " not found");
      }
      return item;
    }
299213
def update(attributes)
      self.class.run_transaction do |tx|
        self.attributes = process_attributes(attributes)
        saved = save
        tx.mark_failed unless saved
        saved
      end
    end
1007976
function(db, trans, is_caller_setversion) {

    var action = is_caller_setversion ? 'changing' : 'upgrading';
    goog.log.finer(me.logger, action + ' version to ' + db.version +
        ' from ' + old_version);

    // create store that we don't have previously
    for (var i = 0; i < schema.stores.length; i++) {
      // this is sync process.
      me.update_store_(db, trans, schema.stores[i]);
    }

    // delete stores
    var storeNames = /** @type {DOMStringList} */ (db.objectStoreNames);
    for (var n = storeNames.length, i = 0; i < n; i++) {
      if (!schema.hasStore(storeNames[i])) {
        db.deleteObjectStore(storeNames[i]);
        goog.log.finer(me.logger, 'store: ' + storeNames[i] + ' deleted.');
      }
    }
  }
1134094
def update(cls, **kwargs):
        '''
        
        '''
        q = cls._get_instance(**{'id': kwargs['id']})
        if q:
            for k, v in kwargs.items():
                setattr(q, k, v)
            _action_and_commit(q, session.add)
        else:
            cls.get_or_create(**kwargs)
579351
function update() {
        for (var i = 0; i < states.length; i++) {
          if (anyMatch(states[i].state, states[i].params)) {
            addClass($element, activeClasses[states[i].hash]);
          } else {
            removeClass($element, activeClasses[states[i].hash]);
          }

          if (exactMatch(states[i].state, states[i].params)) {
            addClass($element, activeEqClass);
          } else {
            removeClass($element, activeEqClass);
          }
        }
      }
548226
function () {
    var items = Array.prototype.slice.call(arguments);
    this.source.push.apply(this.source, items);
    this._updateInfo();

    // DEPRECATED
    this.emit("insert", items[0], this.length - 1);
    this.emit("update", { insert: items, index: this.length - 1});
  }
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
1316078
def upgradeSystemOid(store):
    
    store.transact(
        _upgradeTableOid, store, 'axiom_types',
        lambda: store.executeSchemaSQL(CREATE_TYPES))
    store.transact(
        _upgradeTableOid, store, 'axiom_objects',
        lambda: store.executeSchemaSQL(CREATE_OBJECTS),
        lambda: store.executeSchemaSQL(CREATE_OBJECTS_IDX))
359034
def _upsert(context, params, data):
    """"""
    table = params.get("table")
    table = datastore.get_table(table, primary_id=False)
    unique_keys = ensure_list(params.get("unique"))
    data["__last_seen"] = datetime.datetime.utcnow()
    if len(unique_keys):
        updated = table.update(data, unique_keys, return_count=True)
        if updated:
            return
    data["__first_seen"] = data["__last_seen"]
    table.insert(data)
538654
def before_update(mapper, conn, target):
        """"""

        target.name = Table.mangle_name(target.name)

        if isinstance(target, Column):
            raise TypeError('Got a column instead of a table')

        target.update_id(target.sequence_id, False)
78857
def update!(conditions = {})
      run_callbacks(:update) do
        options = range_key ? { range_key: Dumping.dump_field(read_attribute(range_key), self.class.attributes[range_key]) } : {}

        begin
          new_attrs = Dynamoid.adapter.update_item(self.class.table_name, hash_key, options.merge(conditions: conditions)) do |t|
            t.add(lock_version: 1) if self.class.attributes[:lock_version]

            if Dynamoid::Config.timestamps
              time_now = DateTime.now.in_time_zone(Time.zone)
              time_now_dumped = Dumping.dump_field(time_now, self.class.attributes[:updated_at])
              t.set(updated_at: time_now_dumped)
            end

            yield t
          end
          load(Undumping.undump_attributes(new_attrs, self.class.attributes))
        rescue Dynamoid::Errors::ConditionalCheckFailedException
          raise Dynamoid::Errors::StaleObjectError.new(self, 'update')
        end
      end
    end
1217171
function update (params, cb) {
      let promise = null
      if (typeof cb !== 'function') [promise, cb] = asyncify()

      const { id, name, description, metadata } = params

      Joi.validate({ id, name, description, metadata }, validationRules.update, (err) => {
        if (err) return cb(Boom.badRequest(err))

        const sqlQuery = SQL`
          UPDATE organizations
          SET
            name = ${name},
            description = ${description},
            metadata = ${metadata}
          WHERE id = ${id}
        `
        db.query(sqlQuery, function (err, result) {
          if (utils.isUniqueViolationError(err)) return cb(Boom.conflict(err.detail))
          if (err) return cb(Boom.badImplementation(err))
          if (result.rowCount === 0) return cb(Boom.notFound())

          organizationOps.readById(id, cb)
        })
      })

      return promise
    }
1203756
function (dt) {
            _.each(
                systems,
                function (system) {
                    if (_.has(system, 'update')) {
                        _.each(
                            entities,
                            function (entity) {
                                if (!_.isUndefined(entity)) {
                                    _.each(system.update, function (func, id) {
                                        if (entity.has(id)){
                                            func(entity, dt);
                                        }
                                    });
                                }
                            }
                        );
                    }
                }
            );
        }
1107230
def update(self, other, **kwargs):
        """"""
        from itertools import chain
        if hasattr(other, 'items'):
            other = other.items()
        for (k, v) in chain(other, kwargs.items()):
            if (
                    k not in self or
                    self[k] != v
            ):
                self[k] = v
658036
void update()
    {
        mx = x - oldX;
        my = y - oldY;
        oldX = x;
        oldY = y;
    }