2009-03-23 21:48:54 +03:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* To change this template, choose Tools | Templates
|
|
|
|
* and open the template in the editor.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Doctrine\ORM\Query\AST\Functions;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* "CURRENT_TIME"
|
|
|
|
*
|
|
|
|
* @author robo
|
|
|
|
*/
|
|
|
|
class CurrentTimeFunction extends FunctionNode
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
|
|
|
{
|
2009-06-20 16:59:33 +04:00
|
|
|
return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimeSql();
|
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 18:24:21 +04:00
|
|
|
$parser->match('(');
|
|
|
|
$parser->match(')');
|
2009-03-23 21:48:54 +03:00
|
|
|
}
|
2009-06-20 18:24:21 +04:00
|
|
|
}
|