Exemplo n.º 1
0
 public function case_insert()
 {
     $this->given($q = new CUT())->when($i = $q->insert(), $i->enableEncloseIdentifier(), $result = (string) $i->into('foo')->on('a', 'b')->values(1, 'bar'))->then->string($result)->isEqualTo('INSERT INTO "foo" ("a", "b") VALUES (1, bar)');
 }
Exemplo n.º 2
0
 public function case_insert_select()
 {
     $this->given($q = new CUT())->when($result = (string) $q->insert()->or->rollback()->into('foo')->on('a', 'b', 'c')->values($q->select('a', 'b', 'c')->from('foo')->limit(3)))->then->string($result)->isEqualTo('INSERT OR ROLLBACK INTO foo (a, b, c) ' . 'SELECT a, b, c FROM foo LIMIT 3');
 }