Exemple #1
0
 /**
  * {@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']);
 }
Exemple #2
0
 /**
  * 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);
     }
 }