diff --git a/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php b/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php new file mode 100644 index 000000000..338d49fce --- /dev/null +++ b/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" + * + * @since 2.1 + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class CoalesceExpression extends Node +{ + public $scalarExpressions = array(); + + + public function __construct(array $scalarExpressions) + { + $this->scalarExpressions = $scalarExpressions; + } + + public function dispatch($sqlWalker) + { + return $sqlWalker->walkCoalesceExpression($this); + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/NullIfExpression.php b/lib/Doctrine/ORM/Query/AST/NullIfExpression.php new file mode 100644 index 000000000..c79d23a99 --- /dev/null +++ b/lib/Doctrine/ORM/Query/AST/NullIfExpression.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" + * + * @since 2.1 + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class NullIfExpression extends Node +{ + public $firstExpression; + + public $secondExpression; + + public function __construct($firstExpression, $secondExpression) + { + $this->firstExpression = $firstExpression; + $this->secondExpression = $secondExpression; + } + + public function dispatch($sqlWalker) + { + return $sqlWalker->walkNullIfExpression($this); + } +} \ No newline at end of file