src/Service/DB/Select.php
public function update(array $row)
    {
        list($where, $params) = $this->compileWhere();

        // 不允许没有任何条件的update
        if (!$where) {
            throw new \LogicException('MUST specify WHERE condition before update');
        }

        // 见delete()方法注释
        if ($this->limit or $this->offset or $this->group_by) {
            throw new \LogicException('CAN NOT UPDATE while specify LIMIT or OFFSET or GROUP BY');
        }

        return $this->adapter->update($this->table, $row, $where, $params);
    }
public function update(array $row)
    {
        list($where, $params) = $this->compileWhere();

        // 不允许没有任何条件的update
        if (!$where) {
            throw new \LogicException('MUST specify WHERE condition before update');
        }

        // 见delete()方法注释
        if ($this->limit or $this->offset or $this->group_by) {
            throw new \LogicException('CAN NOT UPDATE while specify LIMIT or OFFSET or GROUP BY');
        }

        return $this->adapter->update($this->table, $row, $where, $params);
    }
根据当前查询语句的条件参数更新数据.

@param array $row

@return int affected row count