Feature: [export] Add a list of accompanying periods

This commit is contained in:
2022-10-28 22:25:53 +02:00
parent bf58c5d59c
commit b5a9dac62e
13 changed files with 778 additions and 93 deletions

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Doctrine\DQL;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
class STX extends FunctionNode
{
private $field;
public function getSql(SqlWalker $sqlWalker)
{
return sprintf('ST_X(%s)', $this->field->dispatch($sqlWalker));
}
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->field = $parser->ArithmeticExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
}