src/RocknRoot/StrayFw/Database/Postgres/Query/Update.php
public function toSql()
    {
        if (empty($this->update) === true) {
            throw new BadUse('update clause has not been defined (' . print_r($this, true) . ')');
        }
        $sql = 'UPDATE ' . $this->update . ' ';
        $sql .= 'SET ' . $this->set . ' ';

        if ($this->where != null) {
            $sql .= 'WHERE ' . $this->where->toSql() . ' ';
        }
        if ($this->orderBy != null) {
            $sql .= 'ORDER BY ' . $this->orderBy . ' ';
        }
        if ($this->limit != null) {
            $sql .= 'LIMIT ' . $this->limit . ' ';
        }

        return $sql;
    }
public function toSql()
    {
        if (empty($this->update) === true) {
            throw new BadUse('update clause has not been defined (' . print_r($this, true) . ')');
        }
        $sql = 'UPDATE ' . $this->update . ' ';
        $sql .= 'SET ' . $this->set . ' ';

        if ($this->where != null) {
            $sql .= 'WHERE ' . $this->where->toSql() . ' ';
        }
        if ($this->orderBy != null) {
            $sql .= 'ORDER BY ' . $this->orderBy . ' ';
        }
        if ($this->limit != null) {
            $sql .= 'LIMIT ' . $this->limit . ' ';
        }

        return $sql;
    }
Extract the corresponding SQL code.

@throws BadUse if update clause has not been defined
@return string generated SQL code