37 lines
799 B
PHP
37 lines
799 B
PHP
<?php
|
|
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
namespace Doctrine\ORM\Query\AST\Functions;
|
|
|
|
use Doctrine\ORM\Query\Lexer;
|
|
|
|
/**
|
|
* "CURRENT_TIMESTAMP"
|
|
*
|
|
* @author robo
|
|
*/
|
|
class CurrentTimestampFunction extends FunctionNode
|
|
{
|
|
/**
|
|
* @override
|
|
*/
|
|
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
|
{
|
|
return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimestampSQL();
|
|
}
|
|
|
|
/**
|
|
* @override
|
|
*/
|
|
public function parse(\Doctrine\ORM\Query\Parser $parser)
|
|
{
|
|
$lexer = $parser->getLexer();
|
|
|
|
$parser->match(Lexer::T_IDENTIFIER);
|
|
$parser->match(Lexer::T_OPEN_PARENTHESIS);
|
|
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
|
|
}
|
|
} |