Execute a update query with specified data

@param array|string $set
@return int
550897
public function update($set = array())
    {
        if (is_array($set)) {
            $params = array();
            foreach ($set as $field => $param) {
                $this->add('set', $field . ' = ?', true);
                $params[] = $param;
            }
            $this->params = array_merge($params, $this->params);
        } else {
            $this->add('set', $set, true);
        }
        $this->type = self::UPDATE;
        return $this->execute();
    }
1114551
public function update(array $values): int
	{
		$query = $this->compiler->update($values);

		return $this->connection->queryAndCount($query['sql'], $query['params']);
	}
11909
private static function updateSet(array $values)
    {
        $ret = "";
        foreach($values as $key=>$value)
            $ret .= $key."=".$value.", ";
        $ret = substr($ret,0,-2);//remove last \", \"
        return $ret;
    }
800261
public function update($table, $feilds, array $where, $limit=0)
	{
		$set = array();
        $vals = array();

		foreach ($feilds as $key => $val) {
			$set[] = "`{$key}` = ?";
            $vals[] = $val;
		}

		$set = implode(', ', $set);

		$sql = "UPDATE {$table} SET {$set} WHERE " . $this->buildWhere($where, $vals);

        if ($limit > 0) {
            $sql .= " LIMIT ".(int)$limit;
        }

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($vals) : false;
	}
125603
function update(array $where, array $data, $returning = "*") {
		$query = $this->getQueryWriter()->reset();
		$query->write("UPDATE", $this->conn->quoteName($this->name));
		$first = true;
		foreach ($data as $key => $val) {
			$query->write($first ? "SET" : ",", $key, "=", 
				$query->param($val, $this->getAttributes()->getColumn($key)->type));
			$first and $first = false;
		}
		$query->write("WHERE")->criteria($where);
		if (strlen($returning)) {
			$query->write("RETURNING", $returning);
		}
		return $this->execute($query);
	}
755175
public function update(array $values)
    {
        $result = $this->getBuilder()->update($values);

        // Reset query builder
        $this->resetBuilder();

        return (int) $result;
    }
883735
function checkColumns($set = null)
    {
        if ($set !== null) {
            $this->check_columns = $set;
        }

        return $this->check_columns;
    }
965356
public function open( $set = null )
    {
        return $this->setting(
            'open',
            null === $set ? null : (bool) $set
        );
    }
1040598
public function subset( \PhpSets\Set $set ) {
        $iterator = $set->entries();

        // iterate through $set and return false is an uncommon value is present
        while ( $iterator->valid() ) {
            if ( ! $this->has( $iterator->current() ) ) {
                return false;
            }
            $iterator->next();
        }

        $iterator->rewind();

        return true;
    }
1316438
public function update($data = null): IResult
    {
        $builder = new UpdateBuilder($this);
        $sql = $builder->build($data);
        return $this->execute($sql);
    }
1117065
public function update(array $cols): int
    {
        $this->cols = $cols;
        $pdoStatement = $this->provideStatement();
        $pdoStatement = $this->execute($pdoStatement);
        return $pdoStatement->rowCount();
    }
349920
public static function remove(&$set, $args)
    {
        self::assertArgsNumber(1, $args);

        foreach ($set as $key => $value) {
            if ($value === $args[0]) {
                unset($set[$key]);
                return;
            }
        }
    }
918614
public function intersect( \PhpSets\Set $set ) {
        $iterator = $set->entries();
        $intersect = new \PhpSets\Set;

        while ( $iterator->valid() ) {
            if ( $this->has( $iterator->current() ) ) {
                $intersect->add( $iterator->current() );
            }
            $iterator->next();
        }
        $iterator->rewind();

        return $intersect;
    }
603683
public function update($fields)
    {
        // Set fields
        $this->fields($fields);

        // Resolve fields
        $fields = $this->getUpdateFieldsString();

        // Define wheres
        $where = $this->getWhereString();

        // Build query
        $this->query = 'UPDATE ' . $this->table . ' SET ' . $fields . ' '. $where;

        // Prepare statement
        $this->statement = $this->pdo->prepare($this->query);

        // Bind fields values
        $this->bindFields();

        // Bind where values
        if (count($this->wheres)) {
            $this->bindWheres();
        }

        // Execute statement
        $result = $this->statement->execute();

        // Reset values
        $this->reset();

        // Return result
        return $result;
    }
628204
public function update()
    {
        $query = 'update '.$this->getTables($this->tables).' set ';
        //
        for ($i = 0; $i < Collection::count($this->sets); $i++) {
            if ($i < Collection::count($this->sets) - 1) {
                $query .= $this->sets[$i].',';
            } else {
                $query .= $this->sets[$i];
            }
        }
        //
        $query .= ' '.$this->where;
        //
        $this->reset();
        //
        return Database::exec($query);
    }
1326165
public function appendData($data, $set = false)
    {
        if ($set) {
            // 进行数据处理
            foreach ($data as $key => $value) {
                $this->setAttr($key, $value, $data);
            }
        } else {
            if (is_object($data)) {
                $data = get_object_vars($data);
            }

            $this->data = array_merge($this->data, $data);
        }

        return $this;
    }
304755
public function update($statements, array $data)
    {
        if (!isset($statements['tables'])) {
            throw new Exception('No table specified', 3);
        } elseif (count($data) < 1) {
            throw new Exception('No data given.', 4);
        }

        $table = end($statements['tables']);

        // Update statement
        list($updateStatement, $bindings) = $this->getUpdateStatement($data);

        // Wheres
        list($whereCriteria, $whereBindings) = $this->buildCriteriaWithType($statements, 'wheres', 'WHERE');

        // Limit
        $limit = isset($statements['limit']) ? 'LIMIT ' . $statements['limit'] : '';

        $sqlArray = array(
            'UPDATE',
            $this->wrapSanitizer($table),
            'SET ' . $updateStatement,
            $whereCriteria,
            $limit
        );

        $sql = $this->concatenateQuery($sqlArray);

        $bindings = array_merge($bindings, $whereBindings);
        return compact('sql', 'bindings');
    }