Generate grid

This commit is contained in:
thibaud-leclere
2026-01-31 16:17:24 +01:00
parent 1ebf8b99b3
commit a196fac6c6
10 changed files with 158 additions and 40 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Doctrine\Extension;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\QueryException;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;
class Random extends FunctionNode
{
/**
* @throws QueryException
*/
public function parse(Parser $parser): void
{
$parser->match(TokenType::T_IDENTIFIER);
$parser->match(TokenType::T_OPEN_PARENTHESIS);
$parser->match(TokenType::T_CLOSE_PARENTHESIS);
}
public function getSql(SqlWalker $sqlWalker): string
{
return 'RANDOM()';
}
}