. */ namespace Doctrine\ORM\Query\AST\Functions; use Doctrine\ORM\Query\Lexer; /** * "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")" * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.2 * @author Fabio B. Silva */ class BitAndFunction extends FunctionNode { public $firstArithmetic; public $secondArithmetic; /** * @override */ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { $platform = $sqlWalker->getConnection()->getDatabasePlatform(); return $platform->getBitAndComparisonExpression( $this->firstArithmetic->dispatch($sqlWalker), $this->secondArithmetic->dispatch($sqlWalker) ); } /** * @override */ public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->firstArithmetic = $parser->ArithmeticPrimary(); $parser->match(Lexer::T_COMMA); $this->secondArithmetic = $parser->ArithmeticPrimary(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); } }