{@inheritDoc}

Update using the complex key
436061
@Override
	public int update(FeatureTileLink data) throws SQLException {

		UpdateBuilder<FeatureTileLink, FeatureTileLinkKey> ub = updateBuilder();
		// Currently there are no non primary values to update

		ub.where()
				.eq(FeatureTileLink.COLUMN_FEATURE_TABLE_NAME,
						data.getFeatureTableName())
				.and()
				.eq(FeatureTileLink.COLUMN_TILE_TABLE_NAME,
						data.getTileTableName());

		PreparedUpdate<FeatureTileLink> update = ub.prepare();
		int updated = update(update);

		return updated;
	}
296365
public WriteResult<T, K> updateById(K id, DBUpdate.Builder update) throws MongoException {
        return this.update(createIdQuery(id), update.serialiseAndGet(objectMapper));
    }
564472
public function upsert($table, $insertFieldValues, $updateFieldValues = [], $primaryKey = null)
    {
        if (!$primaryKey) {
            $primaryKey = (string)key($insertFieldValues);
        }

        if ($this->query($table)->whereEq($primaryKey, $insertFieldValues[$primaryKey])->exists()) {
            $bind = [];
            $updates = [];
            foreach ($updateFieldValues as $k => $v) {
                $field = is_string($k) ? $k : $v;
                if ($primaryKey === $field) {
                    continue;
                }

                if (is_int($k)) {
                    $updates[] = "[$field]=:$field";
                    $bind[$field] = $insertFieldValues[$field];
                } elseif ($v instanceof AssignmentInterface) {
                    $v->setFieldName($k);
                    $updates[] = $v->getSql();
                    /** @noinspection SlowArrayOperationsInLoopInspection */
                    $bind = array_merge($bind, $v->getBind());
                } else {
                    $updates[] = $v;
                }
            }
            return $this->update($table, $updates, [$primaryKey => $insertFieldValues[$primaryKey]], $bind);
        } else {
            return $this->insert($table, $insertFieldValues);
        }
    }
938651
private function doUpdate(array $changes) {
        $db     = $this->db();
        $entity = $this->dao()->getEntityMapping();
        $table  = $entity->getTableName();

        // collect identity infos
        $identity = $entity->getIdentity();
        $idColumn = $identity->getColumn();
        $idValue  = $identity->convertToDBValue($this->getObjectId(), $db);

        // collect version infos
        $versionMapping = $versionName = $versionColumn = $oldVersion = null;
        //if ($versionMapping = $entity->getVersion()) {
        //    $versionName   = $versionMapping->getName();
        //    $versionColumn = $versionMapping->getColumn();
        //    $oldVersion    = $object->getSnapshot()->$versionName;        // TODO: implement dirty check via snapshot
        //    $oldVersion    = $versionMapping->convertToDBValue($oldVersion, $db);
        //}

        // create SQL
        $sql = 'update '.$table.' set';                                     // update table
        foreach ($changes as $name => $value) {                             //    set ...
            $mapping     = $entity->getProperty($name);                     //        ...
            $columnName  = $mapping->getColumn();                           //        ...
            $columnValue = $mapping->convertToDBValue($value, $db);         //        column1 = value1,
            $sql .= ' '.$columnName.' = '.$columnValue.',';                 //        column2 = value2,
        }                                                                   //        ...
        $sql  = strLeft($sql, -1);                                          //        ...
        $sql .= ' where '.$idColumn.' = '.$idValue;                         //    where id = value
        if ($versionMapping) {                                              //        ...
            $op   = $oldVersion=='null' ? 'is':'=';                         //        ...
            $sql .= ' and '.$versionColumn.' '.$op.' '.$oldVersion;         //      and version = oldVersion
        }

        // execute SQL and check for concurrent modifications
        if ($db->execute($sql)->lastAffectedRows() != 1) {
            if ($versionMapping) {
                $this->reload();
                $msg = 'expected version: '.$oldVersion.', found version: '.$this->$versionName;
            }
            else $msg = 'record not found';
            throw new ConcurrentModificationException('Error updating '.get_class($this).' (oid='.$this->getObjectId().'), '.$msg);
        }
        return true;
    }
141795
private static AbstractType<?> updateWith(AbstractType<?> type, String keyspace, ByteBuffer toReplace, UserType updated)
    {
        if (type instanceof UserType)
        {
            UserType ut = (UserType)type;

            // If it's directly the type we've updated, then just use the new one.
            if (keyspace.equals(ut.keyspace) && toReplace.equals(ut.name))
                return updated;

            // Otherwise, check for nesting
            List<AbstractType<?>> updatedTypes = updateTypes(ut.fieldTypes(), keyspace, toReplace, updated);
            return updatedTypes == null ? null : new UserType(ut.keyspace, ut.name, new ArrayList<>(ut.fieldNames()), updatedTypes);
        }
        else if (type instanceof CompositeType)
        {
            CompositeType ct = (CompositeType)type;
            List<AbstractType<?>> updatedTypes = updateTypes(ct.types, keyspace, toReplace, updated);
            return updatedTypes == null ? null : CompositeType.getInstance(updatedTypes);
        }
        else if (type instanceof ColumnToCollectionType)
        {
            ColumnToCollectionType ctct = (ColumnToCollectionType)type;
            Map<ByteBuffer, CollectionType> updatedTypes = null;
            for (Map.Entry<ByteBuffer, CollectionType> entry : ctct.defined.entrySet())
            {
                AbstractType<?> t = updateWith(entry.getValue(), keyspace, toReplace, updated);
                if (t == null)
                    continue;

                if (updatedTypes == null)
                    updatedTypes = new HashMap<>(ctct.defined);

                updatedTypes.put(entry.getKey(), (CollectionType)t);
            }
            return updatedTypes == null ? null : ColumnToCollectionType.getInstance(updatedTypes);
        }
        else if (type instanceof CollectionType)
        {
            if (type instanceof ListType)
            {
                AbstractType<?> t = updateWith(((ListType)type).getElementsType(), keyspace, toReplace, updated);
                if (t == null)
                    return null;
                return ListType.getInstance(t, type.isMultiCell());
            }
            else if (type instanceof SetType)
            {
                AbstractType<?> t = updateWith(((SetType)type).getElementsType(), keyspace, toReplace, updated);
                if (t == null)
                    return null;
                return SetType.getInstance(t, type.isMultiCell());
            }
            else
            {
                assert type instanceof MapType;
                MapType mt = (MapType)type;
                AbstractType<?> k = updateWith(mt.getKeysType(), keyspace, toReplace, updated);
                AbstractType<?> v = updateWith(mt.getValuesType(), keyspace, toReplace, updated);
                if (k == null && v == null)
                    return null;
                return MapType.getInstance(k == null ? mt.getKeysType() : k, v == null ? mt.getValuesType() : v, type.isMultiCell());
            }
        }
        else
        {
            return null;
        }
    }
1135198
public function update($id = null, $attributes = [])
    {
        // ID has to be defined
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID to update', 400);
        }

        // Attributes have to be array
        if (!(isset($attributes)) || !is_array($attributes)) {
            throw new \InvalidArgumentException('Undefined attributes', 400);
        }

        // Perform before hook
        $attributes = $this->beforeUpdate($id, $attributes);

        // Remove non fillable attributes
        $fields = array_intersect_key($attributes, array_flip($this->fillable));

        // Validate attributes
        $this->setValidationRules();
        $errors = $this->validationErrors($fields);
        if ($errors) {
            throw new Exceptions\ValidationException('Invalid attributes', 400, $errors);
        }

        // Update the model
        if ($fields && count($fields)) {
            $result = $this->db()->table($this->table)->where($this->primaryKey, $id, '=', $this->table)->update($fields);

            // Return false if the update failed
            if (!$result) {
                throw new \Exception('Could not update the model', 500);
            }
        }

        // Sync many to many relationships
        $this->sync($id, $attributes);

        // Upsert has many relationships
        $this->updateHasMany($id, $attributes);

        // Get the created model
        $model = $this->find($id);

        // Run after hook
        $model = $this->afterUpdate($id, $attributes, $model);

        // Return the created model
        return $model;
    }
253794
def update(key, definition, options = {})
      custom_params = options[:dc] ? use_named_parameter('dc', options[:dc]) : nil
      ret = send_put_request(@conn, ["/v1/query/#{key}"], options, definition, custom_params)
      ret.status == 200
    end
1055396
private function update()
    {
        if ($this->urlObject) {
            \Closure::bind(function ($urlObject, $query) {
                $urlObject->url->query = $query === '' ? null : $query;
            }, null, $this->urlObject)->__invoke($this->urlObject, lib\URLencoding::serializeURLencoded($this->list));
        }
    }
893672
public function _update(...$keyValues) {
		$instance = DAO::getOne ( $this->model, $keyValues, false );
		$this->operate_ ( $instance, function ($instance) {
			$datas = $this->getDatas ();
			$this->_setValuesToObject ( $instance, $datas );
			if ($this->_validateInstance ( $instance, array_keys ( $datas ) )) {
				return $this->updateOperation ( $instance, $datas, true );
			}
			return null;
		}, "updated", "Unable to update the instance", $keyValues );
	}
779250
@Override
    public Object put(String key, Object value) {
        return update(String.valueOf(key), value);
    }
700853
def update_house(self, complex: str, id: str, **kwargs):
        
        self.check_house(complex, id)
        self.put('developers/{developer}/complexes/{complex}/houses/{id}'.format(
            developer=self.developer,
            complex=complex,
            id=id,
        ), data=kwargs)
845185
def update(self, mapping):
        """"""
        return self.api.mset(dict((key, self.prepare_value(value))
                                for key, value in mapping.items()))
196186
private function _update($attrs,$calling,$pk,$pk_value)
    {
        $escape        = Driver::$escape_char;
        $vals          = array();
        $update_column = self::hasColumn("updated_at");
        $create_column = self::hasColumn("created_at");

        // no way to update a primary key!
        unset($attrs[$pk]);

        $sql = "update $escape".$calling::getTableName()."$escape set ";

        foreach ($attrs as $attr => $value) {
            if (($update_column &&    $attr == $update_column)
                || ($create_column && $attr == $create_column)
            ) {
                continue;
            }

            if (strlen(trim($value)) < 1) {
                $value = null;
            }

            $sql .= "$escape".self::$_mapping[$calling][$attr]."$escape=?,";
            array_push($vals, $value);
        }

        if ($update_column) {
            $sql .= "$escape".self::$_mapping[$calling][$update_column]."$escape=".Driver::$current_timestamp.",";
        }

        $sql  = substr($sql, 0, strlen($sql)-1);
        $sql .= " where $escape".self::getTableName()."$escape.$escape".self::$_mapping[$calling][$pk]."$escape=?";
        array_push($vals, $pk_value);

        return self::executePrepared($sql, $vals)->rowCount()==1;
    }
652248
public function updateMap($key, $value)
    {
        $update = ( ! $value instanceof MapUpdate)
            ? MapUpdate::createFromArray($value)
            : $value;

        $this->update->updateMap($key, $update->getOp());

        return $this;
    }
1328848
public function update($key, $value)
    {
        if (!empty($this->get($this->normalizeKey($key)))) {
            $this->headers[$this->normalizeKey($key)] = $value;
        }
    }
797622
public function update($repository, $keys, $data)
    {
        $context = $this->getCommandContext();

        $context->data = $data;
        $context->repository = $repository;
        $context->keys = $keys;
        $context->query = AnDomainQuery::getInstance($repository, $keys)->update(AnConfig::unbox($data));

        if ($this->getCommandChain()->run('before.update', $context) !== false) {
            $context->result = $this->execute($context->query);
            $this->getCommandChain()->run('after.update', $context);
        }

        return $context->result;
    }
931521
function Update()
	{
		$db = $this->DB();
		if (!$db) {
			return false;
		}
		$table = $this->TableInfo();

		$where = $this->GenWhere($db, $table);

		if (!$where) {
			$this->error("Where missing for table $table", "Update");
			return false;
		}
		$valarr = array();
		$neworig = array();
		$pairs = array();
		$i = -1;
		$cnt = 0;
		foreach($table->flds as $name=>$fld) {
			$i += 1;
			$val = $this->$name;
			$neworig[] = $val;

			if (isset($table->keys[$name])) {
				continue;
			}

			if (is_null($val)) {
				if (isset($fld->not_null) && $fld->not_null) {
					if (isset($fld->default_value) && strlen($fld->default_value)) {
						continue;
					}
					else {
						$this->Error("Cannot set field $name to NULL","Update");
						return false;
					}
				}
			}

			if (isset($this->_original[$i]) && $val === $this->_original[$i]) {
				continue;
			}
			$valarr[] = $val;
			$pairs[] = $name.'='.$db->Param($cnt);
			$cnt += 1;
		}


		if (!$cnt) {
			return -1;
		}
		$sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where;
		$ok = $db->Execute($sql,$valarr);
		if ($ok) {
			$this->_original = $neworig;
			return 1;
		}
		return 0;
	}