. */ namespace Doctrine\ORM\Query\AST\Functions; /** * "CONCAT" "(" StringPrimary "," StringPrimary ")" * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class ConcatFunction extends FunctionNode { public $firstStringPrimary; public $secondStringPriamry; /** * @override */ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { $platform = $sqlWalker->getConnection()->getDatabasePlatform(); return $platform->getConcatExpression( $sqlWalker->walkStringPrimary($this->firstStringPrimary), $sqlWalker->walkStringPrimary($this->secondStringPrimary) ); } /** * @override */ public function parse(\Doctrine\ORM\Query\Parser $parser) { $lexer = $parser->getLexer(); $parser->match($lexer->lookahead['value']); $parser->match('('); $this->firstStringPrimary = $parser->StringPrimary(); $parser->match(','); $this->secondStringPrimary = $parser->StringPrimary(); $parser->match(')'); } }