35 lines
648 B
PHP
35 lines
648 B
PHP
|
<?php
|
||
|
/*
|
||
|
* To change this template, choose Tools | Templates
|
||
|
* and open the template in the editor.
|
||
|
*/
|
||
|
|
||
|
namespace Doctrine\ORM\Query\AST\Functions;
|
||
|
|
||
|
/**
|
||
|
* "CURRENT_TIMESTAMP"
|
||
|
*
|
||
|
* @author robo
|
||
|
*/
|
||
|
class CurrentTimestampFunction extends FunctionNode
|
||
|
{
|
||
|
/**
|
||
|
* @override
|
||
|
*/
|
||
|
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
||
|
{
|
||
|
//TODO: Use platform to get SQL
|
||
|
return 'CURRENT_TIMESTAMP';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @override
|
||
|
*/
|
||
|
public function parse(\Doctrine\ORM\Query\Parser $parser)
|
||
|
{
|
||
|
$lexer = $parser->getLexer();
|
||
|
$parser->match($lexer->lookahead['value']);
|
||
|
}
|
||
|
}
|
||
|
|