/** * {@inheritdoc} */ public function update($table, $values) { $this->currentQuery = $this->connection->update($table); foreach ($values as $name => $value) { // TODO: Add proper PK checks in here if ($name !== 'id') { $this->currentQuery->set($name, $value); } } // TODO: Update to use the actual PK $this->where('id', '=', $values['id']); }
/** * Compile a returning statement * * @param Collector $collection query collector * @return string returning sql */ public function compileReturning(Collector $collector) { if ($returning = $collector->getInsertIdField()) { return 'RETURNING ' . $this->quoteIdentifier($returning); } }