Beispiel #1
0
 public function case_update()
 {
     $this->given($q = new CUT())->when($u = $q->update(), $u->enableEncloseIdentifier(), $result = (string) $u->table('foo')->set('a', 13)->set('b', 'bar')->where('"b" = 0'))->then->string($result)->isEqualTo('UPDATE "foo" SET "a" = 13, "b" = bar WHERE "b" = 0');
 }
Beispiel #2
0
 public function case_basic_update()
 {
     $this->given($q = new CUT())->when($result = (string) $q->update()->or->ignore()->table('foo')->set('a', 13)->set('b', 'bar')->where('b = 0')->or->where($q->where('b > 10')->and->where('b < 100')))->then->string($result)->isEqualTo('UPDATE OR IGNORE foo SET a = 13, b = bar ' . 'WHERE b = 0 OR (b > 10 AND b < 100)');
 }