1
0
mirror of synced 2024-12-13 22:56:04 +03:00

added isNotNull support

This commit is contained in:
zYne 2006-12-15 23:03:37 +00:00
parent 7f8fc2bec1
commit e33bd03aa8

View File

@ -565,6 +565,24 @@ class Doctrine_Expression extends Doctrine_Connection_Module {
$expression = $this->getIdentifier($expression);
return $expression . ' IS NULL';
}
/**
* Returns SQL that checks if a expression is not null.
*
* Example:
* <code>
* $q = new Doctrine_Query();
* $q->select('u.*')
* ->from('User u')
* ->where($q->expr->isNotNull('id'));
* </code>
*
* @param string $expression the expression that should be compared to null
* @return string logical expression
*/
public function isNotNull($expression) {
$expression = $this->getIdentifier($expression);
return $expression . ' IS NOT NULL';
}
/**
* Returns SQL that checks if an expression evaluates to a value between
* two values.