Skip to content

Commit

Permalink
Add Phpdoc to CountFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Mar 1, 2024
1 parent 8406352 commit 6aad84e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Query/Postgresql/CountFilterFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace DoctrineExtensions\Query\Postgresql;

use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\AST\WhereClause;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;
Expand All @@ -11,11 +13,19 @@

/**
* CountFilterFunction ::= "COUNT_FILTER" "(" ArithmeticPrimary "," ArithmeticPrimary ")"
*
* @link https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES
*
* @example SELECT COUNT_FILTER(*, WHERE foo.bar < 3) FROM entity
*
* @todo rename class to CountFilter
*/
class CountFilterFunction extends FunctionNode
{
/** @var Node|string */
public $countExpression = null;

/** @var WhereClause */
public $whereExpression = null;

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

0 comments on commit 6aad84e

Please sign in to comment.