2009-03-23 21:48:54 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\ORM\Query\AST\Functions;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* "CURRENT_DATE"
|
|
|
|
*
|
|
|
|
* @author robo
|
|
|
|
*/
|
|
|
|
class CurrentDateFunction extends FunctionNode
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
|
|
|
{
|
2009-06-20 16:59:33 +04:00
|
|
|
return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentDateSql();
|
2009-03-23 21:48:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function parse(\Doctrine\ORM\Query\Parser $parser)
|
|
|
|
{
|
|
|
|
$lexer = $parser->getLexer();
|
|
|
|
$parser->match($lexer->lookahead['value']);
|
2009-06-20 16:59:33 +04:00
|
|
|
$parser->match('(');
|
|
|
|
$parser->match(')');
|
2009-03-23 21:48:54 +03:00
|
|
|
}
|
2009-06-20 16:59:33 +04:00
|
|
|
}
|