summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Query/AST/SelectExpression.php
blob: f09f3cda0ac581c668a431435176c30646f10e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Query\AST;

use Doctrine\ORM\Query\SqlWalker;

/**
 * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression |
 *                      (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable]
 *
 * @link    www.doctrine-project.org
 */
class SelectExpression extends Node
{
    public function __construct(
        public mixed $expression,
        public string|null $fieldIdentificationVariable,
        public bool $hiddenAliasResultVariable = false,
    ) {
    }

    public function dispatch(SqlWalker $walker): string
    {
        return $walker->walkSelectExpression($this);
    }
}