public function in($column, $values, $combine = 'AND') { $this->predicates[] = array('format' => '%1 IN (%2)', 'values' => array($column, $values), 'combine' => $combine == 'OR' ? 'OR' : 'AND'); return $this; }
public function testIn() { $p = new Predicate(Sql::factory(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')), 'users')); $p->in('id', array(1, 2, 3)); $this->assertEquals('("id" IN (1, 2, 3))', (string) $p); }