Update primary database value with data from set database data.
327230
public function updatePrimaryDbValueFromDbData()
    {
        $dbDataPrimaryValue = $this->getDbDataPrimaryValue();

        if ($dbDataPrimaryValue !== $this->getDbDataPrimaryDefaultValue()) {
            $this->setPrimaryDbValue($dbDataPrimaryValue);
        }
    }
951996
public ActiveEntity update(String primaryKey) {
		try {
			db.update(this, Entity.create().set(primaryKey, this.get(primaryKey)));
		} catch (SQLException e) {
			throw new DbRuntimeException(e);
		}
		return this;
	}
799037
def update(connection, force_download):
    """"""
    manager.database.update(
        connection=connection,
        force_download=force_download
    )
1331968
def set_data(self, index, value):
        """"""
        acces, field = self.get_item(index), self.header[index.column()]
        self.beginResetModel()
        self.set_data_hook(acces, field, value)
        self.endResetModel()
275925
def update(self, data):
        """"""
        self.name = data["name"]
        self.description = data['description']
        self.win_index = data['win_index']
        # Other attributes are optional
        if conf.use_winpcapy:
            self._update_pcapdata()
        try:
            self.ip = socket.inet_ntoa(get_if_raw_addr(data['guid']))
        except (KeyError, AttributeError, NameError):
            pass
        try:
            self.mac = data['mac']
        except KeyError:
            pass
772104
public function setDatabase($database = [], $name = 'default')
    {
        $this->database = $database;
        $this->dbName   = $name;

        return $this;
    }
689695
def set(file_name, key, value, new):
    
    db = XonoticDB.load_path(file_name)
    if key not in db and not new:
        click.echo('Key %s is not found in the database' % key, file=sys.stderr)
        sys.exit(1)
    else:
        db[key] = value
        db.save(file_name)
655875
def db_update_record(self, table_name, column, value):
        
        sql = 'UPDATE {} SET {} = \'{}\''.format(table_name, column, value)
        cur = self.db_conn.cursor()
        cur.execute(sql)
939535
def set_primary(self, **params):
        """"""
        data = self.api_client.set_primary_account(self.id, **params)
        self.update(data)
        return data
1052007
public function update(
        $table = null,
        Index $database = null,
        $primary = null
    ) {
        //argument test
        $error = Argument::i()
            //Argument 1 must be a string or null
            ->test(1, 'string', 'null')
            //Argument 1 must be a string or null
            ->test(3, 'string', 'null', 'array');
        
        //if no table
        if (is_null($table)) {
            //if no default table either
            if (!$this->table) {
                //throw error
                $error->setMessage(Exception::TABLE_NOT_SET)->trigger();
            }
            
            $table = $this->table;
        }
        
        //if no database
        if (is_null($database)) {
            //and no default database
            if (!$this->database) {
                $error->setMessage(Exception::DATABASE_NOT_SET)->trigger();
            }
            
            $database = $this->database;
        }
        
        //get the meta data, the valid column values and whether is primary is set
        $meta = $this->getMeta($table, $database);
        $data = $this->getValidColumns(array_keys($meta[self::COLUMNS]));
        
        //update original data
        $this->original = $this->data;
        
        //from here it means that this table has primary
        //columns and all primary values are set
        
        if (is_null($primary)) {
            $primary = $meta[self::PRIMARY];
        }
        
        if (is_string($primary)) {
            $primary = array($primary);
        }
        
        $filter = array();
        //for each primary key
        foreach ($primary as $column) {
            //add the condition to the filter
            $filter[] = array($column.'=%s', $data[$column]);
        }
        
        //we update it
        $database->updateRows($table, $data, $filter);
        
        return $this;
    }
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
132139
def update(self, **args):
        """"""
        data = {}
        for field in args:
            data[field] = args[field]

        super(Version, self).update(**data)
572398
def update(table, values, where=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("UPDATE", table, values=values, where=where)
    return execute(sql, args).rowcount
322598
def upsert(db, table, key_cols, update_dict):
    
    with db:
        cur = db.cursor()
        cur.execute(
            'UPDATE {} SET {} WHERE {}'.format(
                table,
                ','.join(_sqlpformat(col) for col in update_dict.keys()),
                ' AND '.join(_sqlpformat(col) for col in key_cols),
            ),
            update_dict,
        )
        if db.changes() == 0:
            keys, values = zip(*update_dict.items())
            cur.execute(
                'INSERT INTO {} ({}) VALUES ({})'.format(
                    table,
                    ','.join(keys),
                    ','.join('?' for _ in values)),
                values)
611280
def update(self,record,**kw):
        """"""
        vals = self._make_sql_params(kw)
        sql = "UPDATE %s SET %s WHERE rowid=?" %(self.name,
            ",".join(vals))
        self.cursor.execute(sql,kw.values()+[record['__id__']])
1255161
def _set_value(self, entity, value):
    """"""
    if value is not None:
      value = _validate_key(value, entity=entity)
      value = entity._validate_key(value)
    entity._entity_key = value
484972
def update(self, data):
        """"""
        self._md.update(data)
        bufpos = self._nbytes & 63
        self._nbytes += len(data)

        if self._rarbug and len(data) > 64:
            dpos = self.block_size - bufpos
            while dpos + self.block_size <= len(data):
                self._corrupt(data, dpos)
                dpos += self.block_size