Pop\Db\Sql\Predicate::isNull PHP Метод

isNull() публичный Метод

Predicate for IS NULL
public isNull ( string $column, string $combine = 'AND' ) : Predicate
$column string
$combine string
Результат Predicate
    public function isNull($column, $combine = 'AND')
    {
        $this->predicates[] = array('format' => '%1 IS NULL', 'values' => array($column), 'combine' => $combine == 'OR' ? 'OR' : 'AND');
        return $this;
    }

Usage Example

Пример #1
0
 public function testIsNull()
 {
     $p = new Predicate(Sql::factory(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')), 'users'));
     $p->isNull('email');
     $this->assertEquals('("email" IS NULL)', (string) $p);
 }