示例#1
0
文件: Fuel.php 项目: atabak/orm
 /**
  * {@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']);
 }
示例#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);
     }
 }