Skip to content

Commit

Permalink
Add Phpdoc to GroupConcat
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Mar 1, 2024
1 parent 3e2abfc commit 5c0216a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Query/Mysql/GroupConcat.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
namespace DoctrineExtensions\Query\Mysql;

use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\AST\OrderByClause;
use Doctrine\ORM\Query\AST\PathExpression;
use Doctrine\ORM\Query\AST\Subselect;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;
Expand All @@ -12,16 +16,25 @@
use function strtolower;

/**
* ?
* GroupConcatFunction ::= "GROUP_CONCAT" "(" ["DISTINCT"] StringExpression|SingleValuedPathExpression [{ "," StringPrimary }*] ["ORDER" "BY" OrderByItem { "," OrderByItem }*] [ "SEPARATOR" StringPrimary ] ")"
*
* @link https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_group-concat
*
* @example GROUP_CONCAT(foo.bar, foo.bar2) FROM entity
* @example GROUP_CONCAT(DISTINCT foo.bar, foo.bar2 ORDER BY foo.bar ASC, foo.bar2 DESC SEPARATOR ", ") FROM entity
*/
class GroupConcat extends FunctionNode
{
/** @var bool */
public $isDistinct = false;

/** @var array<Subselect|Node|PathExpression|string> */
public $pathExp = null;

/** @var Node */
public $separator = null;

/** @var OrderByClause */
public $orderBy = null;

public function parse(Parser $parser): void
Expand Down

0 comments on commit 5c0216a

Please sign in to comment.