diff options
author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Query/AST | |
parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Query/AST')
88 files changed, 2989 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Query/AST/ASTException.php b/vendor/doctrine/orm/src/Query/AST/ASTException.php new file mode 100644 index 0000000..1ef890a --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ASTException.php | |||
@@ -0,0 +1,20 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\QueryException; | ||
8 | |||
9 | use function get_debug_type; | ||
10 | |||
11 | /** | ||
12 | * Base exception class for AST exceptions. | ||
13 | */ | ||
14 | class ASTException extends QueryException | ||
15 | { | ||
16 | public static function noDispatchForNode(Node $node): self | ||
17 | { | ||
18 | return new self('Double-dispatch for node ' . get_debug_type($node) . ' is not supported.'); | ||
19 | } | ||
20 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/AggregateExpression.php b/vendor/doctrine/orm/src/Query/AST/AggregateExpression.php new file mode 100644 index 0000000..468c65c --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/AggregateExpression.php | |||
@@ -0,0 +1,23 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class AggregateExpression extends Node | ||
10 | { | ||
11 | /** @param bool $isDistinct Some aggregate expressions support distinct, eg COUNT. */ | ||
12 | public function __construct( | ||
13 | public string $functionName, | ||
14 | public Node|string $pathExpression, | ||
15 | public bool $isDistinct, | ||
16 | ) { | ||
17 | } | ||
18 | |||
19 | public function dispatch(SqlWalker $walker): string | ||
20 | { | ||
21 | return $walker->walkAggregateExpression($this); | ||
22 | } | ||
23 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ArithmeticExpression.php b/vendor/doctrine/orm/src/Query/AST/ArithmeticExpression.php new file mode 100644 index 0000000..a819e05 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ArithmeticExpression.php | |||
@@ -0,0 +1,34 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ArithmeticExpression extends Node | ||
15 | { | ||
16 | public Node|string|null $simpleArithmeticExpression = null; | ||
17 | |||
18 | public Subselect|null $subselect = null; | ||
19 | |||
20 | public function isSimpleArithmeticExpression(): bool | ||
21 | { | ||
22 | return (bool) $this->simpleArithmeticExpression; | ||
23 | } | ||
24 | |||
25 | public function isSubselect(): bool | ||
26 | { | ||
27 | return (bool) $this->subselect; | ||
28 | } | ||
29 | |||
30 | public function dispatch(SqlWalker $walker): string | ||
31 | { | ||
32 | return $walker->walkArithmeticExpression($this); | ||
33 | } | ||
34 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ArithmeticFactor.php b/vendor/doctrine/orm/src/Query/AST/ArithmeticFactor.php new file mode 100644 index 0000000..278a921 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ArithmeticFactor.php | |||
@@ -0,0 +1,36 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ArithmeticFactor extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public mixed $arithmeticPrimary, | ||
18 | public bool|null $sign = null, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function isPositiveSigned(): bool | ||
23 | { | ||
24 | return $this->sign === true; | ||
25 | } | ||
26 | |||
27 | public function isNegativeSigned(): bool | ||
28 | { | ||
29 | return $this->sign === false; | ||
30 | } | ||
31 | |||
32 | public function dispatch(SqlWalker $walker): string | ||
33 | { | ||
34 | return $walker->walkArithmeticFactor($this); | ||
35 | } | ||
36 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ArithmeticTerm.php b/vendor/doctrine/orm/src/Query/AST/ArithmeticTerm.php new file mode 100644 index 0000000..b233612 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ArithmeticTerm.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ArithmeticTerm extends Node | ||
15 | { | ||
16 | /** @param mixed[] $arithmeticFactors */ | ||
17 | public function __construct(public array $arithmeticFactors) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkArithmeticTerm($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/BetweenExpression.php b/vendor/doctrine/orm/src/Query/AST/BetweenExpression.php new file mode 100644 index 0000000..c13292b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/BetweenExpression.php | |||
@@ -0,0 +1,23 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class BetweenExpression extends Node | ||
10 | { | ||
11 | public function __construct( | ||
12 | public ArithmeticExpression $expression, | ||
13 | public ArithmeticExpression $leftBetweenExpression, | ||
14 | public ArithmeticExpression $rightBetweenExpression, | ||
15 | public bool $not = false, | ||
16 | ) { | ||
17 | } | ||
18 | |||
19 | public function dispatch(SqlWalker $walker): string | ||
20 | { | ||
21 | return $walker->walkBetweenExpression($this); | ||
22 | } | ||
23 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/CoalesceExpression.php b/vendor/doctrine/orm/src/Query/AST/CoalesceExpression.php new file mode 100644 index 0000000..89f025f --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/CoalesceExpression.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class CoalesceExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $scalarExpressions */ | ||
17 | public function __construct(public array $scalarExpressions) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkCoalesceExpression($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/CollectionMemberExpression.php b/vendor/doctrine/orm/src/Query/AST/CollectionMemberExpression.php new file mode 100644 index 0000000..a62a191 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/CollectionMemberExpression.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class CollectionMemberExpression extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public mixed $entityExpression, | ||
18 | public PathExpression $collectionValuedPathExpression, | ||
19 | public bool $not = false, | ||
20 | ) { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkCollectionMemberExpression($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ComparisonExpression.php b/vendor/doctrine/orm/src/Query/AST/ComparisonExpression.php new file mode 100644 index 0000000..a7d91f9 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ComparisonExpression.php | |||
@@ -0,0 +1,32 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | | ||
11 | * StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | | ||
12 | * BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) | | ||
13 | * EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) | | ||
14 | * DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | | ||
15 | * EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression) | ||
16 | * | ||
17 | * @link www.doctrine-project.org | ||
18 | */ | ||
19 | class ComparisonExpression extends Node | ||
20 | { | ||
21 | public function __construct( | ||
22 | public Node|string $leftExpression, | ||
23 | public string $operator, | ||
24 | public Node|string $rightExpression, | ||
25 | ) { | ||
26 | } | ||
27 | |||
28 | public function dispatch(SqlWalker $walker): string | ||
29 | { | ||
30 | return $walker->walkComparisonExpression($this); | ||
31 | } | ||
32 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ConditionalExpression.php b/vendor/doctrine/orm/src/Query/AST/ConditionalExpression.php new file mode 100644 index 0000000..26a98e5 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ConditionalExpression.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ConditionalExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $conditionalTerms */ | ||
17 | public function __construct(public array $conditionalTerms) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkConditionalExpression($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ConditionalFactor.php b/vendor/doctrine/orm/src/Query/AST/ConditionalFactor.php new file mode 100644 index 0000000..7881743 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ConditionalFactor.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ConditionalFactor ::= ["NOT"] ConditionalPrimary | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ConditionalFactor extends Node implements Phase2OptimizableConditional | ||
15 | { | ||
16 | public function __construct( | ||
17 | public ConditionalPrimary $conditionalPrimary, | ||
18 | public bool $not = false, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkConditionalFactor($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ConditionalPrimary.php b/vendor/doctrine/orm/src/Query/AST/ConditionalPrimary.php new file mode 100644 index 0000000..9344cd9 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ConditionalPrimary.php | |||
@@ -0,0 +1,34 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ConditionalPrimary extends Node implements Phase2OptimizableConditional | ||
15 | { | ||
16 | public Node|null $simpleConditionalExpression = null; | ||
17 | |||
18 | public ConditionalExpression|Phase2OptimizableConditional|null $conditionalExpression = null; | ||
19 | |||
20 | public function isSimpleConditionalExpression(): bool | ||
21 | { | ||
22 | return (bool) $this->simpleConditionalExpression; | ||
23 | } | ||
24 | |||
25 | public function isConditionalExpression(): bool | ||
26 | { | ||
27 | return (bool) $this->conditionalExpression; | ||
28 | } | ||
29 | |||
30 | public function dispatch(SqlWalker $walker): string | ||
31 | { | ||
32 | return $walker->walkConditionalPrimary($this); | ||
33 | } | ||
34 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ConditionalTerm.php b/vendor/doctrine/orm/src/Query/AST/ConditionalTerm.php new file mode 100644 index 0000000..dcea50b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ConditionalTerm.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ConditionalTerm extends Node implements Phase2OptimizableConditional | ||
15 | { | ||
16 | /** @param mixed[] $conditionalFactors */ | ||
17 | public function __construct(public array $conditionalFactors) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkConditionalTerm($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/DeleteClause.php b/vendor/doctrine/orm/src/Query/AST/DeleteClause.php new file mode 100644 index 0000000..25e9085 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/DeleteClause.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class DeleteClause extends Node | ||
15 | { | ||
16 | public string $aliasIdentificationVariable; | ||
17 | |||
18 | public function __construct(public string $abstractSchemaName) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkDeleteClause($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/DeleteStatement.php b/vendor/doctrine/orm/src/Query/AST/DeleteStatement.php new file mode 100644 index 0000000..f367d09 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/DeleteStatement.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * DeleteStatement = DeleteClause [WhereClause] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class DeleteStatement extends Node | ||
15 | { | ||
16 | public WhereClause|null $whereClause = null; | ||
17 | |||
18 | public function __construct(public DeleteClause $deleteClause) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkDeleteStatement($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/EmptyCollectionComparisonExpression.php b/vendor/doctrine/orm/src/Query/AST/EmptyCollectionComparisonExpression.php new file mode 100644 index 0000000..9978800 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/EmptyCollectionComparisonExpression.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class EmptyCollectionComparisonExpression extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public PathExpression $expression, | ||
18 | public bool $not = false, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkEmptyCollectionComparisonExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ExistsExpression.php b/vendor/doctrine/orm/src/Query/AST/ExistsExpression.php new file mode 100644 index 0000000..72757f4 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ExistsExpression.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class ExistsExpression extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public Subselect $subselect, | ||
18 | public bool $not = false, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkExistsExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/FromClause.php b/vendor/doctrine/orm/src/Query/AST/FromClause.php new file mode 100644 index 0000000..0b74393 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/FromClause.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class FromClause extends Node | ||
15 | { | ||
16 | /** @param mixed[] $identificationVariableDeclarations */ | ||
17 | public function __construct(public array $identificationVariableDeclarations) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkFromClause($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/AbsFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/AbsFunction.php new file mode 100644 index 0000000..4edff06 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/AbsFunction.php | |||
@@ -0,0 +1,37 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "ABS" "(" SimpleArithmeticExpression ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class AbsFunction extends FunctionNode | ||
18 | { | ||
19 | public Node|string $simpleArithmeticExpression; | ||
20 | |||
21 | public function getSql(SqlWalker $sqlWalker): string | ||
22 | { | ||
23 | return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( | ||
24 | $this->simpleArithmeticExpression, | ||
25 | ) . ')'; | ||
26 | } | ||
27 | |||
28 | public function parse(Parser $parser): void | ||
29 | { | ||
30 | $parser->match(TokenType::T_IDENTIFIER); | ||
31 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
32 | |||
33 | $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
34 | |||
35 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
36 | } | ||
37 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/AvgFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/AvgFunction.php new file mode 100644 index 0000000..ba7b7f3 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/AvgFunction.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\AggregateExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | /** | ||
12 | * "AVG" "(" ["DISTINCT"] StringPrimary ")" | ||
13 | */ | ||
14 | final class AvgFunction extends FunctionNode | ||
15 | { | ||
16 | private AggregateExpression $aggregateExpression; | ||
17 | |||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $this->aggregateExpression->dispatch($sqlWalker); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $this->aggregateExpression = $parser->AggregateExpression(); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/BitAndFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/BitAndFunction.php new file mode 100644 index 0000000..f2d3146 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/BitAndFunction.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class BitAndFunction extends FunctionNode | ||
18 | { | ||
19 | public Node $firstArithmetic; | ||
20 | public Node $secondArithmetic; | ||
21 | |||
22 | public function getSql(SqlWalker $sqlWalker): string | ||
23 | { | ||
24 | $platform = $sqlWalker->getConnection()->getDatabasePlatform(); | ||
25 | |||
26 | return $platform->getBitAndComparisonExpression( | ||
27 | $this->firstArithmetic->dispatch($sqlWalker), | ||
28 | $this->secondArithmetic->dispatch($sqlWalker), | ||
29 | ); | ||
30 | } | ||
31 | |||
32 | public function parse(Parser $parser): void | ||
33 | { | ||
34 | $parser->match(TokenType::T_IDENTIFIER); | ||
35 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
36 | |||
37 | $this->firstArithmetic = $parser->ArithmeticPrimary(); | ||
38 | $parser->match(TokenType::T_COMMA); | ||
39 | $this->secondArithmetic = $parser->ArithmeticPrimary(); | ||
40 | |||
41 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
42 | } | ||
43 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/BitOrFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/BitOrFunction.php new file mode 100644 index 0000000..f3f84da --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/BitOrFunction.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "BIT_OR" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class BitOrFunction extends FunctionNode | ||
18 | { | ||
19 | public Node $firstArithmetic; | ||
20 | public Node $secondArithmetic; | ||
21 | |||
22 | public function getSql(SqlWalker $sqlWalker): string | ||
23 | { | ||
24 | $platform = $sqlWalker->getConnection()->getDatabasePlatform(); | ||
25 | |||
26 | return $platform->getBitOrComparisonExpression( | ||
27 | $this->firstArithmetic->dispatch($sqlWalker), | ||
28 | $this->secondArithmetic->dispatch($sqlWalker), | ||
29 | ); | ||
30 | } | ||
31 | |||
32 | public function parse(Parser $parser): void | ||
33 | { | ||
34 | $parser->match(TokenType::T_IDENTIFIER); | ||
35 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
36 | |||
37 | $this->firstArithmetic = $parser->ArithmeticPrimary(); | ||
38 | $parser->match(TokenType::T_COMMA); | ||
39 | $this->secondArithmetic = $parser->ArithmeticPrimary(); | ||
40 | |||
41 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
42 | } | ||
43 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/ConcatFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/ConcatFunction.php new file mode 100644 index 0000000..5b8d696 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/ConcatFunction.php | |||
@@ -0,0 +1,58 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "CONCAT" "(" StringPrimary "," StringPrimary {"," StringPrimary }* ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class ConcatFunction extends FunctionNode | ||
18 | { | ||
19 | public Node $firstStringPrimary; | ||
20 | public Node $secondStringPrimary; | ||
21 | |||
22 | /** @psalm-var list<Node> */ | ||
23 | public array $concatExpressions = []; | ||
24 | |||
25 | public function getSql(SqlWalker $sqlWalker): string | ||
26 | { | ||
27 | $platform = $sqlWalker->getConnection()->getDatabasePlatform(); | ||
28 | |||
29 | $args = []; | ||
30 | |||
31 | foreach ($this->concatExpressions as $expression) { | ||
32 | $args[] = $sqlWalker->walkStringPrimary($expression); | ||
33 | } | ||
34 | |||
35 | return $platform->getConcatExpression(...$args); | ||
36 | } | ||
37 | |||
38 | public function parse(Parser $parser): void | ||
39 | { | ||
40 | $parser->match(TokenType::T_IDENTIFIER); | ||
41 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
42 | |||
43 | $this->firstStringPrimary = $parser->StringPrimary(); | ||
44 | $this->concatExpressions[] = $this->firstStringPrimary; | ||
45 | |||
46 | $parser->match(TokenType::T_COMMA); | ||
47 | |||
48 | $this->secondStringPrimary = $parser->StringPrimary(); | ||
49 | $this->concatExpressions[] = $this->secondStringPrimary; | ||
50 | |||
51 | while ($parser->getLexer()->isNextToken(TokenType::T_COMMA)) { | ||
52 | $parser->match(TokenType::T_COMMA); | ||
53 | $this->concatExpressions[] = $parser->StringPrimary(); | ||
54 | } | ||
55 | |||
56 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
57 | } | ||
58 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/CountFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/CountFunction.php new file mode 100644 index 0000000..dc926a5 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/CountFunction.php | |||
@@ -0,0 +1,35 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\DBAL\Types\Type; | ||
8 | use Doctrine\DBAL\Types\Types; | ||
9 | use Doctrine\ORM\Query\AST\AggregateExpression; | ||
10 | use Doctrine\ORM\Query\AST\TypedExpression; | ||
11 | use Doctrine\ORM\Query\Parser; | ||
12 | use Doctrine\ORM\Query\SqlWalker; | ||
13 | |||
14 | /** | ||
15 | * "COUNT" "(" ["DISTINCT"] StringPrimary ")" | ||
16 | */ | ||
17 | final class CountFunction extends FunctionNode implements TypedExpression | ||
18 | { | ||
19 | private AggregateExpression $aggregateExpression; | ||
20 | |||
21 | public function getSql(SqlWalker $sqlWalker): string | ||
22 | { | ||
23 | return $this->aggregateExpression->dispatch($sqlWalker); | ||
24 | } | ||
25 | |||
26 | public function parse(Parser $parser): void | ||
27 | { | ||
28 | $this->aggregateExpression = $parser->AggregateExpression(); | ||
29 | } | ||
30 | |||
31 | public function getReturnType(): Type | ||
32 | { | ||
33 | return Type::getType(Types::INTEGER); | ||
34 | } | ||
35 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/CurrentDateFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentDateFunction.php new file mode 100644 index 0000000..cec9632 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentDateFunction.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\Parser; | ||
8 | use Doctrine\ORM\Query\SqlWalker; | ||
9 | use Doctrine\ORM\Query\TokenType; | ||
10 | |||
11 | /** | ||
12 | * "CURRENT_DATE" | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class CurrentDateFunction extends FunctionNode | ||
17 | { | ||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentDateSQL(); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $parser->match(TokenType::T_IDENTIFIER); | ||
26 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
27 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimeFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimeFunction.php new file mode 100644 index 0000000..6473fce --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimeFunction.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\Parser; | ||
8 | use Doctrine\ORM\Query\SqlWalker; | ||
9 | use Doctrine\ORM\Query\TokenType; | ||
10 | |||
11 | /** | ||
12 | * "CURRENT_TIME" | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class CurrentTimeFunction extends FunctionNode | ||
17 | { | ||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimeSQL(); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $parser->match(TokenType::T_IDENTIFIER); | ||
26 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
27 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimestampFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimestampFunction.php new file mode 100644 index 0000000..edcd27c --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/CurrentTimestampFunction.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\Parser; | ||
8 | use Doctrine\ORM\Query\SqlWalker; | ||
9 | use Doctrine\ORM\Query\TokenType; | ||
10 | |||
11 | /** | ||
12 | * "CURRENT_TIMESTAMP" | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class CurrentTimestampFunction extends FunctionNode | ||
17 | { | ||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimestampSQL(); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $parser->match(TokenType::T_IDENTIFIER); | ||
26 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
27 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/DateAddFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/DateAddFunction.php new file mode 100644 index 0000000..12920dc --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/DateAddFunction.php | |||
@@ -0,0 +1,83 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\ASTException; | ||
8 | use Doctrine\ORM\Query\AST\Node; | ||
9 | use Doctrine\ORM\Query\Parser; | ||
10 | use Doctrine\ORM\Query\QueryException; | ||
11 | use Doctrine\ORM\Query\SqlWalker; | ||
12 | use Doctrine\ORM\Query\TokenType; | ||
13 | |||
14 | use function strtolower; | ||
15 | |||
16 | /** | ||
17 | * "DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" | ||
18 | * | ||
19 | * @link www.doctrine-project.org | ||
20 | */ | ||
21 | class DateAddFunction extends FunctionNode | ||
22 | { | ||
23 | public Node $firstDateExpression; | ||
24 | public Node $intervalExpression; | ||
25 | public Node $unit; | ||
26 | |||
27 | public function getSql(SqlWalker $sqlWalker): string | ||
28 | { | ||
29 | return match (strtolower((string) $this->unit->value)) { | ||
30 | 'second' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddSecondsExpression( | ||
31 | $this->firstDateExpression->dispatch($sqlWalker), | ||
32 | $this->dispatchIntervalExpression($sqlWalker), | ||
33 | ), | ||
34 | 'minute' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddMinutesExpression( | ||
35 | $this->firstDateExpression->dispatch($sqlWalker), | ||
36 | $this->dispatchIntervalExpression($sqlWalker), | ||
37 | ), | ||
38 | 'hour' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddHourExpression( | ||
39 | $this->firstDateExpression->dispatch($sqlWalker), | ||
40 | $this->dispatchIntervalExpression($sqlWalker), | ||
41 | ), | ||
42 | 'day' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddDaysExpression( | ||
43 | $this->firstDateExpression->dispatch($sqlWalker), | ||
44 | $this->dispatchIntervalExpression($sqlWalker), | ||
45 | ), | ||
46 | 'week' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddWeeksExpression( | ||
47 | $this->firstDateExpression->dispatch($sqlWalker), | ||
48 | $this->dispatchIntervalExpression($sqlWalker), | ||
49 | ), | ||
50 | 'month' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddMonthExpression( | ||
51 | $this->firstDateExpression->dispatch($sqlWalker), | ||
52 | $this->dispatchIntervalExpression($sqlWalker), | ||
53 | ), | ||
54 | 'year' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddYearsExpression( | ||
55 | $this->firstDateExpression->dispatch($sqlWalker), | ||
56 | $this->dispatchIntervalExpression($sqlWalker), | ||
57 | ), | ||
58 | default => throw QueryException::semanticalError( | ||
59 | 'DATE_ADD() only supports units of type second, minute, hour, day, week, month and year.', | ||
60 | ), | ||
61 | }; | ||
62 | } | ||
63 | |||
64 | /** @throws ASTException */ | ||
65 | private function dispatchIntervalExpression(SqlWalker $sqlWalker): string | ||
66 | { | ||
67 | return $this->intervalExpression->dispatch($sqlWalker); | ||
68 | } | ||
69 | |||
70 | public function parse(Parser $parser): void | ||
71 | { | ||
72 | $parser->match(TokenType::T_IDENTIFIER); | ||
73 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
74 | |||
75 | $this->firstDateExpression = $parser->ArithmeticPrimary(); | ||
76 | $parser->match(TokenType::T_COMMA); | ||
77 | $this->intervalExpression = $parser->ArithmeticPrimary(); | ||
78 | $parser->match(TokenType::T_COMMA); | ||
79 | $this->unit = $parser->StringPrimary(); | ||
80 | |||
81 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
82 | } | ||
83 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/DateDiffFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/DateDiffFunction.php new file mode 100644 index 0000000..55598c0 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/DateDiffFunction.php | |||
@@ -0,0 +1,41 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "DATE_DIFF" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class DateDiffFunction extends FunctionNode | ||
18 | { | ||
19 | public Node $date1; | ||
20 | public Node $date2; | ||
21 | |||
22 | public function getSql(SqlWalker $sqlWalker): string | ||
23 | { | ||
24 | return $sqlWalker->getConnection()->getDatabasePlatform()->getDateDiffExpression( | ||
25 | $this->date1->dispatch($sqlWalker), | ||
26 | $this->date2->dispatch($sqlWalker), | ||
27 | ); | ||
28 | } | ||
29 | |||
30 | public function parse(Parser $parser): void | ||
31 | { | ||
32 | $parser->match(TokenType::T_IDENTIFIER); | ||
33 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
34 | |||
35 | $this->date1 = $parser->ArithmeticPrimary(); | ||
36 | $parser->match(TokenType::T_COMMA); | ||
37 | $this->date2 = $parser->ArithmeticPrimary(); | ||
38 | |||
39 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
40 | } | ||
41 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/DateSubFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/DateSubFunction.php new file mode 100644 index 0000000..5363680 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/DateSubFunction.php | |||
@@ -0,0 +1,62 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\ASTException; | ||
8 | use Doctrine\ORM\Query\QueryException; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | use function strtolower; | ||
12 | |||
13 | /** | ||
14 | * "DATE_SUB(date1, interval, unit)" | ||
15 | * | ||
16 | * @link www.doctrine-project.org | ||
17 | */ | ||
18 | class DateSubFunction extends DateAddFunction | ||
19 | { | ||
20 | public function getSql(SqlWalker $sqlWalker): string | ||
21 | { | ||
22 | return match (strtolower((string) $this->unit->value)) { | ||
23 | 'second' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubSecondsExpression( | ||
24 | $this->firstDateExpression->dispatch($sqlWalker), | ||
25 | $this->dispatchIntervalExpression($sqlWalker), | ||
26 | ), | ||
27 | 'minute' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubMinutesExpression( | ||
28 | $this->firstDateExpression->dispatch($sqlWalker), | ||
29 | $this->dispatchIntervalExpression($sqlWalker), | ||
30 | ), | ||
31 | 'hour' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubHourExpression( | ||
32 | $this->firstDateExpression->dispatch($sqlWalker), | ||
33 | $this->dispatchIntervalExpression($sqlWalker), | ||
34 | ), | ||
35 | 'day' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubDaysExpression( | ||
36 | $this->firstDateExpression->dispatch($sqlWalker), | ||
37 | $this->dispatchIntervalExpression($sqlWalker), | ||
38 | ), | ||
39 | 'week' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubWeeksExpression( | ||
40 | $this->firstDateExpression->dispatch($sqlWalker), | ||
41 | $this->dispatchIntervalExpression($sqlWalker), | ||
42 | ), | ||
43 | 'month' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubMonthExpression( | ||
44 | $this->firstDateExpression->dispatch($sqlWalker), | ||
45 | $this->dispatchIntervalExpression($sqlWalker), | ||
46 | ), | ||
47 | 'year' => $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubYearsExpression( | ||
48 | $this->firstDateExpression->dispatch($sqlWalker), | ||
49 | $this->dispatchIntervalExpression($sqlWalker), | ||
50 | ), | ||
51 | default => throw QueryException::semanticalError( | ||
52 | 'DATE_SUB() only supports units of type second, minute, hour, day, week, month and year.', | ||
53 | ), | ||
54 | }; | ||
55 | } | ||
56 | |||
57 | /** @throws ASTException */ | ||
58 | private function dispatchIntervalExpression(SqlWalker $sqlWalker): string | ||
59 | { | ||
60 | return $this->intervalExpression->dispatch($sqlWalker); | ||
61 | } | ||
62 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/FunctionNode.php b/vendor/doctrine/orm/src/Query/AST/Functions/FunctionNode.php new file mode 100644 index 0000000..4cc549e --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/FunctionNode.php | |||
@@ -0,0 +1,32 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | /** | ||
12 | * Abstract Function Node. | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | * | ||
16 | * @psalm-consistent-constructor | ||
17 | */ | ||
18 | abstract class FunctionNode extends Node | ||
19 | { | ||
20 | public function __construct(public string $name) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | abstract public function getSql(SqlWalker $sqlWalker): string; | ||
25 | |||
26 | public function dispatch(SqlWalker $sqlWalker): string | ||
27 | { | ||
28 | return $sqlWalker->walkFunction($this); | ||
29 | } | ||
30 | |||
31 | abstract public function parse(Parser $parser): void; | ||
32 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/IdentityFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/IdentityFunction.php new file mode 100644 index 0000000..1dd1bf5 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/IdentityFunction.php | |||
@@ -0,0 +1,90 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\PathExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\QueryException; | ||
10 | use Doctrine\ORM\Query\SqlWalker; | ||
11 | use Doctrine\ORM\Query\TokenType; | ||
12 | |||
13 | use function assert; | ||
14 | use function reset; | ||
15 | use function sprintf; | ||
16 | |||
17 | /** | ||
18 | * "IDENTITY" "(" SingleValuedAssociationPathExpression {"," string} ")" | ||
19 | * | ||
20 | * @link www.doctrine-project.org | ||
21 | */ | ||
22 | class IdentityFunction extends FunctionNode | ||
23 | { | ||
24 | public PathExpression $pathExpression; | ||
25 | |||
26 | public string|null $fieldMapping = null; | ||
27 | |||
28 | public function getSql(SqlWalker $sqlWalker): string | ||
29 | { | ||
30 | assert($this->pathExpression->field !== null); | ||
31 | $entityManager = $sqlWalker->getEntityManager(); | ||
32 | $platform = $entityManager->getConnection()->getDatabasePlatform(); | ||
33 | $quoteStrategy = $entityManager->getConfiguration()->getQuoteStrategy(); | ||
34 | $dqlAlias = $this->pathExpression->identificationVariable; | ||
35 | $assocField = $this->pathExpression->field; | ||
36 | $assoc = $sqlWalker->getMetadataForDqlAlias($dqlAlias)->associationMappings[$assocField]; | ||
37 | $targetEntity = $entityManager->getClassMetadata($assoc->targetEntity); | ||
38 | |||
39 | assert($assoc->isToOneOwningSide()); | ||
40 | $joinColumn = reset($assoc->joinColumns); | ||
41 | |||
42 | if ($this->fieldMapping !== null) { | ||
43 | if (! isset($targetEntity->fieldMappings[$this->fieldMapping])) { | ||
44 | throw new QueryException(sprintf('Undefined reference field mapping "%s"', $this->fieldMapping)); | ||
45 | } | ||
46 | |||
47 | $field = $targetEntity->fieldMappings[$this->fieldMapping]; | ||
48 | $joinColumn = null; | ||
49 | |||
50 | foreach ($assoc->joinColumns as $mapping) { | ||
51 | if ($mapping->referencedColumnName === $field->columnName) { | ||
52 | $joinColumn = $mapping; | ||
53 | |||
54 | break; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | if ($joinColumn === null) { | ||
59 | throw new QueryException(sprintf('Unable to resolve the reference field mapping "%s"', $this->fieldMapping)); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | // The table with the relation may be a subclass, so get the table name from the association definition | ||
64 | $tableName = $entityManager->getClassMetadata($assoc->sourceEntity)->getTableName(); | ||
65 | |||
66 | $tableAlias = $sqlWalker->getSQLTableAlias($tableName, $dqlAlias); | ||
67 | $columnName = $quoteStrategy->getJoinColumnName($joinColumn, $targetEntity, $platform); | ||
68 | |||
69 | return $tableAlias . '.' . $columnName; | ||
70 | } | ||
71 | |||
72 | public function parse(Parser $parser): void | ||
73 | { | ||
74 | $parser->match(TokenType::T_IDENTIFIER); | ||
75 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
76 | |||
77 | $this->pathExpression = $parser->SingleValuedAssociationPathExpression(); | ||
78 | |||
79 | if ($parser->getLexer()->isNextToken(TokenType::T_COMMA)) { | ||
80 | $parser->match(TokenType::T_COMMA); | ||
81 | $parser->match(TokenType::T_STRING); | ||
82 | |||
83 | $token = $parser->getLexer()->token; | ||
84 | assert($token !== null); | ||
85 | $this->fieldMapping = $token->value; | ||
86 | } | ||
87 | |||
88 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
89 | } | ||
90 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/LengthFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/LengthFunction.php new file mode 100644 index 0000000..3994918 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/LengthFunction.php | |||
@@ -0,0 +1,45 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\DBAL\Types\Type; | ||
8 | use Doctrine\DBAL\Types\Types; | ||
9 | use Doctrine\ORM\Query\AST\Node; | ||
10 | use Doctrine\ORM\Query\AST\TypedExpression; | ||
11 | use Doctrine\ORM\Query\Parser; | ||
12 | use Doctrine\ORM\Query\SqlWalker; | ||
13 | use Doctrine\ORM\Query\TokenType; | ||
14 | |||
15 | /** | ||
16 | * "LENGTH" "(" StringPrimary ")" | ||
17 | * | ||
18 | * @link www.doctrine-project.org | ||
19 | */ | ||
20 | class LengthFunction extends FunctionNode implements TypedExpression | ||
21 | { | ||
22 | public Node $stringPrimary; | ||
23 | |||
24 | public function getSql(SqlWalker $sqlWalker): string | ||
25 | { | ||
26 | return $sqlWalker->getConnection()->getDatabasePlatform()->getLengthExpression( | ||
27 | $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary), | ||
28 | ); | ||
29 | } | ||
30 | |||
31 | public function parse(Parser $parser): void | ||
32 | { | ||
33 | $parser->match(TokenType::T_IDENTIFIER); | ||
34 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
35 | |||
36 | $this->stringPrimary = $parser->StringPrimary(); | ||
37 | |||
38 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
39 | } | ||
40 | |||
41 | public function getReturnType(): Type | ||
42 | { | ||
43 | return Type::getType(Types::INTEGER); | ||
44 | } | ||
45 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/LocateFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/LocateFunction.php new file mode 100644 index 0000000..c0d3b4a --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/LocateFunction.php | |||
@@ -0,0 +1,62 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class LocateFunction extends FunctionNode | ||
18 | { | ||
19 | public Node|string $firstStringPrimary; | ||
20 | public Node|string $secondStringPrimary; | ||
21 | |||
22 | public Node|string|bool $simpleArithmeticExpression = false; | ||
23 | |||
24 | public function getSql(SqlWalker $sqlWalker): string | ||
25 | { | ||
26 | $platform = $sqlWalker->getConnection()->getDatabasePlatform(); | ||
27 | |||
28 | $firstString = $sqlWalker->walkStringPrimary($this->firstStringPrimary); | ||
29 | $secondString = $sqlWalker->walkStringPrimary($this->secondStringPrimary); | ||
30 | |||
31 | if ($this->simpleArithmeticExpression) { | ||
32 | return $platform->getLocateExpression( | ||
33 | $secondString, | ||
34 | $firstString, | ||
35 | $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression), | ||
36 | ); | ||
37 | } | ||
38 | |||
39 | return $platform->getLocateExpression($secondString, $firstString); | ||
40 | } | ||
41 | |||
42 | public function parse(Parser $parser): void | ||
43 | { | ||
44 | $parser->match(TokenType::T_IDENTIFIER); | ||
45 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
46 | |||
47 | $this->firstStringPrimary = $parser->StringPrimary(); | ||
48 | |||
49 | $parser->match(TokenType::T_COMMA); | ||
50 | |||
51 | $this->secondStringPrimary = $parser->StringPrimary(); | ||
52 | |||
53 | $lexer = $parser->getLexer(); | ||
54 | if ($lexer->isNextToken(TokenType::T_COMMA)) { | ||
55 | $parser->match(TokenType::T_COMMA); | ||
56 | |||
57 | $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
58 | } | ||
59 | |||
60 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
61 | } | ||
62 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/LowerFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/LowerFunction.php new file mode 100644 index 0000000..8ae337a --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/LowerFunction.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | use function sprintf; | ||
13 | |||
14 | /** | ||
15 | * "LOWER" "(" StringPrimary ")" | ||
16 | * | ||
17 | * @link www.doctrine-project.org | ||
18 | */ | ||
19 | class LowerFunction extends FunctionNode | ||
20 | { | ||
21 | public Node $stringPrimary; | ||
22 | |||
23 | public function getSql(SqlWalker $sqlWalker): string | ||
24 | { | ||
25 | return sprintf( | ||
26 | 'LOWER(%s)', | ||
27 | $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary), | ||
28 | ); | ||
29 | } | ||
30 | |||
31 | public function parse(Parser $parser): void | ||
32 | { | ||
33 | $parser->match(TokenType::T_IDENTIFIER); | ||
34 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
35 | |||
36 | $this->stringPrimary = $parser->StringPrimary(); | ||
37 | |||
38 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
39 | } | ||
40 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/MaxFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/MaxFunction.php new file mode 100644 index 0000000..8a6eecf --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/MaxFunction.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\AggregateExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | /** | ||
12 | * "MAX" "(" ["DISTINCT"] StringPrimary ")" | ||
13 | */ | ||
14 | final class MaxFunction extends FunctionNode | ||
15 | { | ||
16 | private AggregateExpression $aggregateExpression; | ||
17 | |||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $this->aggregateExpression->dispatch($sqlWalker); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $this->aggregateExpression = $parser->AggregateExpression(); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/MinFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/MinFunction.php new file mode 100644 index 0000000..98d73a2 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/MinFunction.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\AggregateExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | /** | ||
12 | * "MIN" "(" ["DISTINCT"] StringPrimary ")" | ||
13 | */ | ||
14 | final class MinFunction extends FunctionNode | ||
15 | { | ||
16 | private AggregateExpression $aggregateExpression; | ||
17 | |||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $this->aggregateExpression->dispatch($sqlWalker); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $this->aggregateExpression = $parser->AggregateExpression(); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/ModFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/ModFunction.php new file mode 100644 index 0000000..7c1af0b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/ModFunction.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class ModFunction extends FunctionNode | ||
18 | { | ||
19 | public Node|string $firstSimpleArithmeticExpression; | ||
20 | public Node|string $secondSimpleArithmeticExpression; | ||
21 | |||
22 | public function getSql(SqlWalker $sqlWalker): string | ||
23 | { | ||
24 | return $sqlWalker->getConnection()->getDatabasePlatform()->getModExpression( | ||
25 | $sqlWalker->walkSimpleArithmeticExpression($this->firstSimpleArithmeticExpression), | ||
26 | $sqlWalker->walkSimpleArithmeticExpression($this->secondSimpleArithmeticExpression), | ||
27 | ); | ||
28 | } | ||
29 | |||
30 | public function parse(Parser $parser): void | ||
31 | { | ||
32 | $parser->match(TokenType::T_IDENTIFIER); | ||
33 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
34 | |||
35 | $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
36 | |||
37 | $parser->match(TokenType::T_COMMA); | ||
38 | |||
39 | $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
40 | |||
41 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
42 | } | ||
43 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/SizeFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/SizeFunction.php new file mode 100644 index 0000000..87ee713 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/SizeFunction.php | |||
@@ -0,0 +1,113 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\PathExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | use function assert; | ||
13 | |||
14 | /** | ||
15 | * "SIZE" "(" CollectionValuedPathExpression ")" | ||
16 | * | ||
17 | * @link www.doctrine-project.org | ||
18 | */ | ||
19 | class SizeFunction extends FunctionNode | ||
20 | { | ||
21 | public PathExpression $collectionPathExpression; | ||
22 | |||
23 | /** | ||
24 | * @inheritdoc | ||
25 | * @todo If the collection being counted is already joined, the SQL can be simpler (more efficient). | ||
26 | */ | ||
27 | public function getSql(SqlWalker $sqlWalker): string | ||
28 | { | ||
29 | assert($this->collectionPathExpression->field !== null); | ||
30 | $entityManager = $sqlWalker->getEntityManager(); | ||
31 | $platform = $entityManager->getConnection()->getDatabasePlatform(); | ||
32 | $quoteStrategy = $entityManager->getConfiguration()->getQuoteStrategy(); | ||
33 | $dqlAlias = $this->collectionPathExpression->identificationVariable; | ||
34 | $assocField = $this->collectionPathExpression->field; | ||
35 | |||
36 | $class = $sqlWalker->getMetadataForDqlAlias($dqlAlias); | ||
37 | $assoc = $class->associationMappings[$assocField]; | ||
38 | $sql = 'SELECT COUNT(*) FROM '; | ||
39 | |||
40 | if ($assoc->isOneToMany()) { | ||
41 | $targetClass = $entityManager->getClassMetadata($assoc->targetEntity); | ||
42 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); | ||
43 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); | ||
44 | |||
45 | $sql .= $quoteStrategy->getTableName($targetClass, $platform) . ' ' . $targetTableAlias . ' WHERE '; | ||
46 | |||
47 | $owningAssoc = $targetClass->associationMappings[$assoc->mappedBy]; | ||
48 | assert($owningAssoc->isManyToOne()); | ||
49 | |||
50 | $first = true; | ||
51 | |||
52 | foreach ($owningAssoc->targetToSourceKeyColumns as $targetColumn => $sourceColumn) { | ||
53 | if ($first) { | ||
54 | $first = false; | ||
55 | } else { | ||
56 | $sql .= ' AND '; | ||
57 | } | ||
58 | |||
59 | $sql .= $targetTableAlias . '.' . $sourceColumn | ||
60 | . ' = ' | ||
61 | . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); | ||
62 | } | ||
63 | } else { // many-to-many | ||
64 | assert($assoc->isManyToMany()); | ||
65 | $owningAssoc = $entityManager->getMetadataFactory()->getOwningSide($assoc); | ||
66 | $joinTable = $owningAssoc->joinTable; | ||
67 | |||
68 | // SQL table aliases | ||
69 | $joinTableAlias = $sqlWalker->getSQLTableAlias($joinTable->name); | ||
70 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); | ||
71 | |||
72 | // join to target table | ||
73 | $targetClass = $entityManager->getClassMetadata($assoc->targetEntity); | ||
74 | $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform) . ' ' . $joinTableAlias . ' WHERE '; | ||
75 | |||
76 | $joinColumns = $assoc->isOwningSide() | ||
77 | ? $joinTable->joinColumns | ||
78 | : $joinTable->inverseJoinColumns; | ||
79 | |||
80 | $first = true; | ||
81 | |||
82 | foreach ($joinColumns as $joinColumn) { | ||
83 | if ($first) { | ||
84 | $first = false; | ||
85 | } else { | ||
86 | $sql .= ' AND '; | ||
87 | } | ||
88 | |||
89 | $sourceColumnName = $quoteStrategy->getColumnName( | ||
90 | $class->fieldNames[$joinColumn->referencedColumnName], | ||
91 | $class, | ||
92 | $platform, | ||
93 | ); | ||
94 | |||
95 | $sql .= $joinTableAlias . '.' . $joinColumn->name | ||
96 | . ' = ' | ||
97 | . $sourceTableAlias . '.' . $sourceColumnName; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | return '(' . $sql . ')'; | ||
102 | } | ||
103 | |||
104 | public function parse(Parser $parser): void | ||
105 | { | ||
106 | $parser->match(TokenType::T_IDENTIFIER); | ||
107 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
108 | |||
109 | $this->collectionPathExpression = $parser->CollectionValuedPathExpression(); | ||
110 | |||
111 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
112 | } | ||
113 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/SqrtFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/SqrtFunction.php new file mode 100644 index 0000000..e643663 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/SqrtFunction.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | use function sprintf; | ||
13 | |||
14 | /** | ||
15 | * "SQRT" "(" SimpleArithmeticExpression ")" | ||
16 | * | ||
17 | * @link www.doctrine-project.org | ||
18 | */ | ||
19 | class SqrtFunction extends FunctionNode | ||
20 | { | ||
21 | public Node|string $simpleArithmeticExpression; | ||
22 | |||
23 | public function getSql(SqlWalker $sqlWalker): string | ||
24 | { | ||
25 | return sprintf( | ||
26 | 'SQRT(%s)', | ||
27 | $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression), | ||
28 | ); | ||
29 | } | ||
30 | |||
31 | public function parse(Parser $parser): void | ||
32 | { | ||
33 | $parser->match(TokenType::T_IDENTIFIER); | ||
34 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
35 | |||
36 | $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
37 | |||
38 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
39 | } | ||
40 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/SubstringFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/SubstringFunction.php new file mode 100644 index 0000000..5744f08 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/SubstringFunction.php | |||
@@ -0,0 +1,58 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | /** | ||
13 | * "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | ||
14 | * | ||
15 | * @link www.doctrine-project.org | ||
16 | */ | ||
17 | class SubstringFunction extends FunctionNode | ||
18 | { | ||
19 | public Node $stringPrimary; | ||
20 | |||
21 | public Node|string $firstSimpleArithmeticExpression; | ||
22 | public Node|string|null $secondSimpleArithmeticExpression = null; | ||
23 | |||
24 | public function getSql(SqlWalker $sqlWalker): string | ||
25 | { | ||
26 | $optionalSecondSimpleArithmeticExpression = null; | ||
27 | if ($this->secondSimpleArithmeticExpression !== null) { | ||
28 | $optionalSecondSimpleArithmeticExpression = $sqlWalker->walkSimpleArithmeticExpression($this->secondSimpleArithmeticExpression); | ||
29 | } | ||
30 | |||
31 | return $sqlWalker->getConnection()->getDatabasePlatform()->getSubstringExpression( | ||
32 | $sqlWalker->walkStringPrimary($this->stringPrimary), | ||
33 | $sqlWalker->walkSimpleArithmeticExpression($this->firstSimpleArithmeticExpression), | ||
34 | $optionalSecondSimpleArithmeticExpression, | ||
35 | ); | ||
36 | } | ||
37 | |||
38 | public function parse(Parser $parser): void | ||
39 | { | ||
40 | $parser->match(TokenType::T_IDENTIFIER); | ||
41 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
42 | |||
43 | $this->stringPrimary = $parser->StringPrimary(); | ||
44 | |||
45 | $parser->match(TokenType::T_COMMA); | ||
46 | |||
47 | $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
48 | |||
49 | $lexer = $parser->getLexer(); | ||
50 | if ($lexer->isNextToken(TokenType::T_COMMA)) { | ||
51 | $parser->match(TokenType::T_COMMA); | ||
52 | |||
53 | $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); | ||
54 | } | ||
55 | |||
56 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
57 | } | ||
58 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/SumFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/SumFunction.php new file mode 100644 index 0000000..588dce9 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/SumFunction.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\AggregateExpression; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | |||
11 | /** | ||
12 | * "SUM" "(" ["DISTINCT"] StringPrimary ")" | ||
13 | */ | ||
14 | final class SumFunction extends FunctionNode | ||
15 | { | ||
16 | private AggregateExpression $aggregateExpression; | ||
17 | |||
18 | public function getSql(SqlWalker $sqlWalker): string | ||
19 | { | ||
20 | return $this->aggregateExpression->dispatch($sqlWalker); | ||
21 | } | ||
22 | |||
23 | public function parse(Parser $parser): void | ||
24 | { | ||
25 | $this->aggregateExpression = $parser->AggregateExpression(); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/TrimFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/TrimFunction.php new file mode 100644 index 0000000..e0a3e99 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/TrimFunction.php | |||
@@ -0,0 +1,119 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\DBAL\Platforms\TrimMode; | ||
8 | use Doctrine\ORM\Query\AST\Node; | ||
9 | use Doctrine\ORM\Query\Parser; | ||
10 | use Doctrine\ORM\Query\SqlWalker; | ||
11 | use Doctrine\ORM\Query\TokenType; | ||
12 | |||
13 | use function assert; | ||
14 | use function strcasecmp; | ||
15 | |||
16 | /** | ||
17 | * "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | ||
18 | * | ||
19 | * @link www.doctrine-project.org | ||
20 | */ | ||
21 | class TrimFunction extends FunctionNode | ||
22 | { | ||
23 | public bool $leading = false; | ||
24 | public bool $trailing = false; | ||
25 | public bool $both = false; | ||
26 | public string|false $trimChar = false; | ||
27 | public Node $stringPrimary; | ||
28 | |||
29 | public function getSql(SqlWalker $sqlWalker): string | ||
30 | { | ||
31 | $stringPrimary = $sqlWalker->walkStringPrimary($this->stringPrimary); | ||
32 | $platform = $sqlWalker->getConnection()->getDatabasePlatform(); | ||
33 | $trimMode = $this->getTrimMode(); | ||
34 | |||
35 | if ($this->trimChar !== false) { | ||
36 | return $platform->getTrimExpression( | ||
37 | $stringPrimary, | ||
38 | $trimMode, | ||
39 | $platform->quoteStringLiteral($this->trimChar), | ||
40 | ); | ||
41 | } | ||
42 | |||
43 | return $platform->getTrimExpression($stringPrimary, $trimMode); | ||
44 | } | ||
45 | |||
46 | public function parse(Parser $parser): void | ||
47 | { | ||
48 | $lexer = $parser->getLexer(); | ||
49 | |||
50 | $parser->match(TokenType::T_IDENTIFIER); | ||
51 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
52 | |||
53 | $this->parseTrimMode($parser); | ||
54 | |||
55 | if ($lexer->isNextToken(TokenType::T_STRING)) { | ||
56 | $parser->match(TokenType::T_STRING); | ||
57 | |||
58 | assert($lexer->token !== null); | ||
59 | $this->trimChar = $lexer->token->value; | ||
60 | } | ||
61 | |||
62 | if ($this->leading || $this->trailing || $this->both || ($this->trimChar !== false)) { | ||
63 | $parser->match(TokenType::T_FROM); | ||
64 | } | ||
65 | |||
66 | $this->stringPrimary = $parser->StringPrimary(); | ||
67 | |||
68 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
69 | } | ||
70 | |||
71 | /** @psalm-return TrimMode::* */ | ||
72 | private function getTrimMode(): TrimMode|int | ||
73 | { | ||
74 | if ($this->leading) { | ||
75 | return TrimMode::LEADING; | ||
76 | } | ||
77 | |||
78 | if ($this->trailing) { | ||
79 | return TrimMode::TRAILING; | ||
80 | } | ||
81 | |||
82 | if ($this->both) { | ||
83 | return TrimMode::BOTH; | ||
84 | } | ||
85 | |||
86 | return TrimMode::UNSPECIFIED; | ||
87 | } | ||
88 | |||
89 | private function parseTrimMode(Parser $parser): void | ||
90 | { | ||
91 | $lexer = $parser->getLexer(); | ||
92 | assert($lexer->lookahead !== null); | ||
93 | $value = $lexer->lookahead->value; | ||
94 | |||
95 | if (strcasecmp('leading', $value) === 0) { | ||
96 | $parser->match(TokenType::T_LEADING); | ||
97 | |||
98 | $this->leading = true; | ||
99 | |||
100 | return; | ||
101 | } | ||
102 | |||
103 | if (strcasecmp('trailing', $value) === 0) { | ||
104 | $parser->match(TokenType::T_TRAILING); | ||
105 | |||
106 | $this->trailing = true; | ||
107 | |||
108 | return; | ||
109 | } | ||
110 | |||
111 | if (strcasecmp('both', $value) === 0) { | ||
112 | $parser->match(TokenType::T_BOTH); | ||
113 | |||
114 | $this->both = true; | ||
115 | |||
116 | return; | ||
117 | } | ||
118 | } | ||
119 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Functions/UpperFunction.php b/vendor/doctrine/orm/src/Query/AST/Functions/UpperFunction.php new file mode 100644 index 0000000..1ecef66 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Functions/UpperFunction.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST\Functions; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Node; | ||
8 | use Doctrine\ORM\Query\Parser; | ||
9 | use Doctrine\ORM\Query\SqlWalker; | ||
10 | use Doctrine\ORM\Query\TokenType; | ||
11 | |||
12 | use function sprintf; | ||
13 | |||
14 | /** | ||
15 | * "UPPER" "(" StringPrimary ")" | ||
16 | * | ||
17 | * @link www.doctrine-project.org | ||
18 | */ | ||
19 | class UpperFunction extends FunctionNode | ||
20 | { | ||
21 | public Node $stringPrimary; | ||
22 | |||
23 | public function getSql(SqlWalker $sqlWalker): string | ||
24 | { | ||
25 | return sprintf( | ||
26 | 'UPPER(%s)', | ||
27 | $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary), | ||
28 | ); | ||
29 | } | ||
30 | |||
31 | public function parse(Parser $parser): void | ||
32 | { | ||
33 | $parser->match(TokenType::T_IDENTIFIER); | ||
34 | $parser->match(TokenType::T_OPEN_PARENTHESIS); | ||
35 | |||
36 | $this->stringPrimary = $parser->StringPrimary(); | ||
37 | |||
38 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); | ||
39 | } | ||
40 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/GeneralCaseExpression.php b/vendor/doctrine/orm/src/Query/AST/GeneralCaseExpression.php new file mode 100644 index 0000000..39d760a --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/GeneralCaseExpression.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class GeneralCaseExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $whenClauses */ | ||
17 | public function __construct( | ||
18 | public array $whenClauses, | ||
19 | public mixed $elseScalarExpression = null, | ||
20 | ) { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkGeneralCaseExpression($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/GroupByClause.php b/vendor/doctrine/orm/src/Query/AST/GroupByClause.php new file mode 100644 index 0000000..eb0f1b9 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/GroupByClause.php | |||
@@ -0,0 +1,20 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class GroupByClause extends Node | ||
10 | { | ||
11 | /** @param mixed[] $groupByItems */ | ||
12 | public function __construct(public array $groupByItems) | ||
13 | { | ||
14 | } | ||
15 | |||
16 | public function dispatch(SqlWalker $walker): string | ||
17 | { | ||
18 | return $walker->walkGroupByClause($this); | ||
19 | } | ||
20 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/HavingClause.php b/vendor/doctrine/orm/src/Query/AST/HavingClause.php new file mode 100644 index 0000000..0d4d821 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/HavingClause.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class HavingClause extends Node | ||
10 | { | ||
11 | public function __construct(public ConditionalExpression|Phase2OptimizableConditional $conditionalExpression) | ||
12 | { | ||
13 | } | ||
14 | |||
15 | public function dispatch(SqlWalker $walker): string | ||
16 | { | ||
17 | return $walker->walkHavingClause($this); | ||
18 | } | ||
19 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/IdentificationVariableDeclaration.php b/vendor/doctrine/orm/src/Query/AST/IdentificationVariableDeclaration.php new file mode 100644 index 0000000..c4c7cca --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/IdentificationVariableDeclaration.php | |||
@@ -0,0 +1,28 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class IdentificationVariableDeclaration extends Node | ||
15 | { | ||
16 | /** @param mixed[] $joins */ | ||
17 | public function __construct( | ||
18 | public RangeVariableDeclaration|null $rangeVariableDeclaration = null, | ||
19 | public IndexBy|null $indexBy = null, | ||
20 | public array $joins = [], | ||
21 | ) { | ||
22 | } | ||
23 | |||
24 | public function dispatch(SqlWalker $walker): string | ||
25 | { | ||
26 | return $walker->walkIdentificationVariableDeclaration($this); | ||
27 | } | ||
28 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/InListExpression.php b/vendor/doctrine/orm/src/Query/AST/InListExpression.php new file mode 100644 index 0000000..dc0f32b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/InListExpression.php | |||
@@ -0,0 +1,23 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class InListExpression extends Node | ||
10 | { | ||
11 | /** @param non-empty-list<mixed> $literals */ | ||
12 | public function __construct( | ||
13 | public ArithmeticExpression $expression, | ||
14 | public array $literals, | ||
15 | public bool $not = false, | ||
16 | ) { | ||
17 | } | ||
18 | |||
19 | public function dispatch(SqlWalker $walker): string | ||
20 | { | ||
21 | return $walker->walkInListExpression($this); | ||
22 | } | ||
23 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/InSubselectExpression.php b/vendor/doctrine/orm/src/Query/AST/InSubselectExpression.php new file mode 100644 index 0000000..1128285 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/InSubselectExpression.php | |||
@@ -0,0 +1,22 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class InSubselectExpression extends Node | ||
10 | { | ||
11 | public function __construct( | ||
12 | public ArithmeticExpression $expression, | ||
13 | public Subselect $subselect, | ||
14 | public bool $not = false, | ||
15 | ) { | ||
16 | } | ||
17 | |||
18 | public function dispatch(SqlWalker $walker): string | ||
19 | { | ||
20 | return $walker->walkInSubselectExpression($this); | ||
21 | } | ||
22 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/IndexBy.php b/vendor/doctrine/orm/src/Query/AST/IndexBy.php new file mode 100644 index 0000000..3d90265 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/IndexBy.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * IndexBy ::= "INDEX" "BY" SingleValuedPathExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class IndexBy extends Node | ||
15 | { | ||
16 | public function __construct(public PathExpression $singleValuedPathExpression) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | public function dispatch(SqlWalker $walker): string | ||
21 | { | ||
22 | $walker->walkIndexBy($this); | ||
23 | |||
24 | return ''; | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/InputParameter.php b/vendor/doctrine/orm/src/Query/AST/InputParameter.php new file mode 100644 index 0000000..a8e0a3b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/InputParameter.php | |||
@@ -0,0 +1,35 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\QueryException; | ||
8 | use Doctrine\ORM\Query\SqlWalker; | ||
9 | |||
10 | use function is_numeric; | ||
11 | use function strlen; | ||
12 | use function substr; | ||
13 | |||
14 | class InputParameter extends Node | ||
15 | { | ||
16 | public bool $isNamed; | ||
17 | public string $name; | ||
18 | |||
19 | /** @throws QueryException */ | ||
20 | public function __construct(string $value) | ||
21 | { | ||
22 | if (strlen($value) === 1) { | ||
23 | throw QueryException::invalidParameterFormat($value); | ||
24 | } | ||
25 | |||
26 | $param = substr($value, 1); | ||
27 | $this->isNamed = ! is_numeric($param); | ||
28 | $this->name = $param; | ||
29 | } | ||
30 | |||
31 | public function dispatch(SqlWalker $walker): string | ||
32 | { | ||
33 | return $walker->walkInputParameter($this); | ||
34 | } | ||
35 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/InstanceOfExpression.php b/vendor/doctrine/orm/src/Query/AST/InstanceOfExpression.php new file mode 100644 index 0000000..3a4e75f --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/InstanceOfExpression.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") | ||
11 | * InstanceOfParameter ::= AbstractSchemaName | InputParameter | ||
12 | * | ||
13 | * @link www.doctrine-project.org | ||
14 | */ | ||
15 | class InstanceOfExpression extends Node | ||
16 | { | ||
17 | /** @param non-empty-list<InputParameter|string> $value */ | ||
18 | public function __construct( | ||
19 | public string $identificationVariable, | ||
20 | public array $value, | ||
21 | public bool $not = false, | ||
22 | ) { | ||
23 | } | ||
24 | |||
25 | public function dispatch(SqlWalker $walker): string | ||
26 | { | ||
27 | return $walker->walkInstanceOfExpression($this); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Join.php b/vendor/doctrine/orm/src/Query/AST/Join.php new file mode 100644 index 0000000..34ce830 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Join.php | |||
@@ -0,0 +1,34 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression | ||
11 | * ["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression] | ||
12 | * | ||
13 | * @link www.doctrine-project.org | ||
14 | */ | ||
15 | class Join extends Node | ||
16 | { | ||
17 | final public const JOIN_TYPE_LEFT = 1; | ||
18 | final public const JOIN_TYPE_LEFTOUTER = 2; | ||
19 | final public const JOIN_TYPE_INNER = 3; | ||
20 | |||
21 | public ConditionalExpression|Phase2OptimizableConditional|null $conditionalExpression = null; | ||
22 | |||
23 | /** @psalm-param self::JOIN_TYPE_* $joinType */ | ||
24 | public function __construct( | ||
25 | public int $joinType, | ||
26 | public Node|null $joinAssociationDeclaration = null, | ||
27 | ) { | ||
28 | } | ||
29 | |||
30 | public function dispatch(SqlWalker $walker): string | ||
31 | { | ||
32 | return $walker->walkJoin($this); | ||
33 | } | ||
34 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/JoinAssociationDeclaration.php b/vendor/doctrine/orm/src/Query/AST/JoinAssociationDeclaration.php new file mode 100644 index 0000000..e08d7f5 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/JoinAssociationDeclaration.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class JoinAssociationDeclaration extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public JoinAssociationPathExpression $joinAssociationPathExpression, | ||
18 | public string $aliasIdentificationVariable, | ||
19 | public IndexBy|null $indexBy, | ||
20 | ) { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkJoinAssociationDeclaration($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/JoinAssociationPathExpression.php b/vendor/doctrine/orm/src/Query/AST/JoinAssociationPathExpression.php new file mode 100644 index 0000000..230be36 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/JoinAssociationPathExpression.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | /** | ||
8 | * JoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField) | ||
9 | * | ||
10 | * @link www.doctrine-project.org | ||
11 | */ | ||
12 | class JoinAssociationPathExpression extends Node | ||
13 | { | ||
14 | public function __construct( | ||
15 | public string $identificationVariable, | ||
16 | public string $associationField, | ||
17 | ) { | ||
18 | } | ||
19 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/JoinClassPathExpression.php b/vendor/doctrine/orm/src/Query/AST/JoinClassPathExpression.php new file mode 100644 index 0000000..cc92782 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/JoinClassPathExpression.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * JoinClassPathExpression ::= AbstractSchemaName ["AS"] AliasIdentificationVariable | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class JoinClassPathExpression extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public mixed $abstractSchemaName, | ||
18 | public mixed $aliasIdentificationVariable, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkJoinPathExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/JoinVariableDeclaration.php b/vendor/doctrine/orm/src/Query/AST/JoinVariableDeclaration.php new file mode 100644 index 0000000..bf76695 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/JoinVariableDeclaration.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * JoinVariableDeclaration ::= Join [IndexBy] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class JoinVariableDeclaration extends Node | ||
15 | { | ||
16 | public function __construct(public Join $join, public IndexBy|null $indexBy) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | public function dispatch(SqlWalker $walker): string | ||
21 | { | ||
22 | return $walker->walkJoinVariableDeclaration($this); | ||
23 | } | ||
24 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/LikeExpression.php b/vendor/doctrine/orm/src/Query/AST/LikeExpression.php new file mode 100644 index 0000000..e3f67f8 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/LikeExpression.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\AST\Functions\FunctionNode; | ||
8 | use Doctrine\ORM\Query\SqlWalker; | ||
9 | |||
10 | /** | ||
11 | * LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char] | ||
12 | * | ||
13 | * @link www.doctrine-project.org | ||
14 | */ | ||
15 | class LikeExpression extends Node | ||
16 | { | ||
17 | public function __construct( | ||
18 | public Node|string $stringExpression, | ||
19 | public InputParameter|FunctionNode|PathExpression|Literal $stringPattern, | ||
20 | public Literal|null $escapeChar = null, | ||
21 | public bool $not = false, | ||
22 | ) { | ||
23 | } | ||
24 | |||
25 | public function dispatch(SqlWalker $walker): string | ||
26 | { | ||
27 | return $walker->walkLikeExpression($this); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Literal.php b/vendor/doctrine/orm/src/Query/AST/Literal.php new file mode 100644 index 0000000..9ec2036 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Literal.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | class Literal extends Node | ||
10 | { | ||
11 | final public const STRING = 1; | ||
12 | final public const BOOLEAN = 2; | ||
13 | final public const NUMERIC = 3; | ||
14 | |||
15 | /** @psalm-param self::* $type */ | ||
16 | public function __construct( | ||
17 | public int $type, | ||
18 | public mixed $value, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkLiteral($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/NewObjectExpression.php b/vendor/doctrine/orm/src/Query/AST/NewObjectExpression.php new file mode 100644 index 0000000..7383c48 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/NewObjectExpression.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class NewObjectExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $args */ | ||
17 | public function __construct(public string $className, public array $args) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkNewObject($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Node.php b/vendor/doctrine/orm/src/Query/AST/Node.php new file mode 100644 index 0000000..cdb5855 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Node.php | |||
@@ -0,0 +1,85 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | use Stringable; | ||
9 | |||
10 | use function get_debug_type; | ||
11 | use function get_object_vars; | ||
12 | use function is_array; | ||
13 | use function is_object; | ||
14 | use function str_repeat; | ||
15 | use function var_export; | ||
16 | |||
17 | use const PHP_EOL; | ||
18 | |||
19 | /** | ||
20 | * Abstract class of an AST node. | ||
21 | * | ||
22 | * @link www.doctrine-project.org | ||
23 | */ | ||
24 | abstract class Node implements Stringable | ||
25 | { | ||
26 | /** | ||
27 | * Double-dispatch method, supposed to dispatch back to the walker. | ||
28 | * | ||
29 | * Implementation is not mandatory for all nodes. | ||
30 | * | ||
31 | * @throws ASTException | ||
32 | */ | ||
33 | public function dispatch(SqlWalker $walker): string | ||
34 | { | ||
35 | throw ASTException::noDispatchForNode($this); | ||
36 | } | ||
37 | |||
38 | /** | ||
39 | * Dumps the AST Node into a string representation for information purpose only. | ||
40 | */ | ||
41 | public function __toString(): string | ||
42 | { | ||
43 | return $this->dump($this); | ||
44 | } | ||
45 | |||
46 | public function dump(mixed $value): string | ||
47 | { | ||
48 | static $ident = 0; | ||
49 | |||
50 | $str = ''; | ||
51 | |||
52 | if ($value instanceof Node) { | ||
53 | $str .= get_debug_type($value) . '(' . PHP_EOL; | ||
54 | $props = get_object_vars($value); | ||
55 | |||
56 | foreach ($props as $name => $prop) { | ||
57 | $ident += 4; | ||
58 | $str .= str_repeat(' ', $ident) . '"' . $name . '": ' | ||
59 | . $this->dump($prop) . ',' . PHP_EOL; | ||
60 | $ident -= 4; | ||
61 | } | ||
62 | |||
63 | $str .= str_repeat(' ', $ident) . ')'; | ||
64 | } elseif (is_array($value)) { | ||
65 | $ident += 4; | ||
66 | $str .= 'array('; | ||
67 | $some = false; | ||
68 | |||
69 | foreach ($value as $k => $v) { | ||
70 | $str .= PHP_EOL . str_repeat(' ', $ident) . '"' | ||
71 | . $k . '" => ' . $this->dump($v) . ','; | ||
72 | $some = true; | ||
73 | } | ||
74 | |||
75 | $ident -= 4; | ||
76 | $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; | ||
77 | } elseif (is_object($value)) { | ||
78 | $str .= 'instanceof(' . get_debug_type($value) . ')'; | ||
79 | } else { | ||
80 | $str .= var_export($value, true); | ||
81 | } | ||
82 | |||
83 | return $str; | ||
84 | } | ||
85 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/NullComparisonExpression.php b/vendor/doctrine/orm/src/Query/AST/NullComparisonExpression.php new file mode 100644 index 0000000..e60cb04 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/NullComparisonExpression.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class NullComparisonExpression extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public Node|string $expression, | ||
18 | public bool $not = false, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkNullComparisonExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/NullIfExpression.php b/vendor/doctrine/orm/src/Query/AST/NullIfExpression.php new file mode 100644 index 0000000..6fffeeb --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/NullIfExpression.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class NullIfExpression extends Node | ||
15 | { | ||
16 | public function __construct(public mixed $firstExpression, public mixed $secondExpression) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | public function dispatch(SqlWalker $walker): string | ||
21 | { | ||
22 | return $walker->walkNullIfExpression($this); | ||
23 | } | ||
24 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/OrderByClause.php b/vendor/doctrine/orm/src/Query/AST/OrderByClause.php new file mode 100644 index 0000000..f6d7a67 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/OrderByClause.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class OrderByClause extends Node | ||
15 | { | ||
16 | /** @param OrderByItem[] $orderByItems */ | ||
17 | public function __construct(public array $orderByItems) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkOrderByClause($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/OrderByItem.php b/vendor/doctrine/orm/src/Query/AST/OrderByItem.php new file mode 100644 index 0000000..64b3f40 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/OrderByItem.php | |||
@@ -0,0 +1,38 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | use function strtoupper; | ||
10 | |||
11 | /** | ||
12 | * OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"] | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class OrderByItem extends Node | ||
17 | { | ||
18 | public string $type; | ||
19 | |||
20 | public function __construct(public mixed $expression) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | public function isAsc(): bool | ||
25 | { | ||
26 | return strtoupper($this->type) === 'ASC'; | ||
27 | } | ||
28 | |||
29 | public function isDesc(): bool | ||
30 | { | ||
31 | return strtoupper($this->type) === 'DESC'; | ||
32 | } | ||
33 | |||
34 | public function dispatch(SqlWalker $walker): string | ||
35 | { | ||
36 | return $walker->walkOrderByItem($this); | ||
37 | } | ||
38 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/ParenthesisExpression.php b/vendor/doctrine/orm/src/Query/AST/ParenthesisExpression.php new file mode 100644 index 0000000..cda6d19 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/ParenthesisExpression.php | |||
@@ -0,0 +1,22 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * ParenthesisExpression ::= "(" ArithmeticPrimary ")" | ||
11 | */ | ||
12 | class ParenthesisExpression extends Node | ||
13 | { | ||
14 | public function __construct(public Node $expression) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | public function dispatch(SqlWalker $walker): string | ||
19 | { | ||
20 | return $walker->walkParenthesisExpression($this); | ||
21 | } | ||
22 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/PathExpression.php b/vendor/doctrine/orm/src/Query/AST/PathExpression.php new file mode 100644 index 0000000..4a56fcd --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/PathExpression.php | |||
@@ -0,0 +1,39 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression | ||
11 | * SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression | ||
12 | * StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression | ||
13 | * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField | ||
14 | * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField | ||
15 | * StateField ::= {EmbeddedClassStateField "."}* SimpleStateField | ||
16 | * SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField | ||
17 | */ | ||
18 | class PathExpression extends Node | ||
19 | { | ||
20 | final public const TYPE_COLLECTION_VALUED_ASSOCIATION = 2; | ||
21 | final public const TYPE_SINGLE_VALUED_ASSOCIATION = 4; | ||
22 | final public const TYPE_STATE_FIELD = 8; | ||
23 | |||
24 | /** @psalm-var self::TYPE_*|null */ | ||
25 | public int|null $type = null; | ||
26 | |||
27 | /** @psalm-param int-mask-of<self::TYPE_*> $expectedType */ | ||
28 | public function __construct( | ||
29 | public int $expectedType, | ||
30 | public string $identificationVariable, | ||
31 | public string|null $field = null, | ||
32 | ) { | ||
33 | } | ||
34 | |||
35 | public function dispatch(SqlWalker $walker): string | ||
36 | { | ||
37 | return $walker->walkPathExpression($this); | ||
38 | } | ||
39 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Phase2OptimizableConditional.php b/vendor/doctrine/orm/src/Query/AST/Phase2OptimizableConditional.php new file mode 100644 index 0000000..276f8f8 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Phase2OptimizableConditional.php | |||
@@ -0,0 +1,17 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | /** | ||
8 | * Marks types that can be used in place of a ConditionalExpression as a phase | ||
9 | * 2 optimization. | ||
10 | * | ||
11 | * @internal | ||
12 | * | ||
13 | * @psalm-inheritors ConditionalPrimary|ConditionalFactor|ConditionalTerm | ||
14 | */ | ||
15 | interface Phase2OptimizableConditional | ||
16 | { | ||
17 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/QuantifiedExpression.php b/vendor/doctrine/orm/src/Query/AST/QuantifiedExpression.php new file mode 100644 index 0000000..90331cd --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/QuantifiedExpression.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | use function strtoupper; | ||
10 | |||
11 | /** | ||
12 | * QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class QuantifiedExpression extends Node | ||
17 | { | ||
18 | public string $type; | ||
19 | |||
20 | public function __construct(public Subselect $subselect) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | public function isAll(): bool | ||
25 | { | ||
26 | return strtoupper($this->type) === 'ALL'; | ||
27 | } | ||
28 | |||
29 | public function isAny(): bool | ||
30 | { | ||
31 | return strtoupper($this->type) === 'ANY'; | ||
32 | } | ||
33 | |||
34 | public function isSome(): bool | ||
35 | { | ||
36 | return strtoupper($this->type) === 'SOME'; | ||
37 | } | ||
38 | |||
39 | public function dispatch(SqlWalker $walker): string | ||
40 | { | ||
41 | return $walker->walkQuantifiedExpression($this); | ||
42 | } | ||
43 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/RangeVariableDeclaration.php b/vendor/doctrine/orm/src/Query/AST/RangeVariableDeclaration.php new file mode 100644 index 0000000..59bd5c8 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/RangeVariableDeclaration.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class RangeVariableDeclaration extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public string $abstractSchemaName, | ||
18 | public string $aliasIdentificationVariable, | ||
19 | public bool $isRoot = true, | ||
20 | ) { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkRangeVariableDeclaration($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SelectClause.php b/vendor/doctrine/orm/src/Query/AST/SelectClause.php new file mode 100644 index 0000000..ad50e67 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SelectClause.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SelectClause extends Node | ||
15 | { | ||
16 | /** @param mixed[] $selectExpressions */ | ||
17 | public function __construct( | ||
18 | public array $selectExpressions, | ||
19 | public bool $isDistinct, | ||
20 | ) { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkSelectClause($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SelectExpression.php b/vendor/doctrine/orm/src/Query/AST/SelectExpression.php new file mode 100644 index 0000000..f09f3cd --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SelectExpression.php | |||
@@ -0,0 +1,28 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | | ||
11 | * (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable] | ||
12 | * | ||
13 | * @link www.doctrine-project.org | ||
14 | */ | ||
15 | class SelectExpression extends Node | ||
16 | { | ||
17 | public function __construct( | ||
18 | public mixed $expression, | ||
19 | public string|null $fieldIdentificationVariable, | ||
20 | public bool $hiddenAliasResultVariable = false, | ||
21 | ) { | ||
22 | } | ||
23 | |||
24 | public function dispatch(SqlWalker $walker): string | ||
25 | { | ||
26 | return $walker->walkSelectExpression($this); | ||
27 | } | ||
28 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SelectStatement.php b/vendor/doctrine/orm/src/Query/AST/SelectStatement.php new file mode 100644 index 0000000..399462f --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SelectStatement.php | |||
@@ -0,0 +1,32 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SelectStatement extends Node | ||
15 | { | ||
16 | public WhereClause|null $whereClause = null; | ||
17 | |||
18 | public GroupByClause|null $groupByClause = null; | ||
19 | |||
20 | public HavingClause|null $havingClause = null; | ||
21 | |||
22 | public OrderByClause|null $orderByClause = null; | ||
23 | |||
24 | public function __construct(public SelectClause $selectClause, public FromClause $fromClause) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | public function dispatch(SqlWalker $walker): string | ||
29 | { | ||
30 | return $walker->walkSelectStatement($this); | ||
31 | } | ||
32 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SimpleArithmeticExpression.php b/vendor/doctrine/orm/src/Query/AST/SimpleArithmeticExpression.php new file mode 100644 index 0000000..ae7ca44 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SimpleArithmeticExpression.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SimpleArithmeticExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $arithmeticTerms */ | ||
17 | public function __construct(public array $arithmeticTerms) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkSimpleArithmeticExpression($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SimpleCaseExpression.php b/vendor/doctrine/orm/src/Query/AST/SimpleCaseExpression.php new file mode 100644 index 0000000..b3764ba --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SimpleCaseExpression.php | |||
@@ -0,0 +1,28 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END" | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SimpleCaseExpression extends Node | ||
15 | { | ||
16 | /** @param mixed[] $simpleWhenClauses */ | ||
17 | public function __construct( | ||
18 | public PathExpression|null $caseOperand = null, | ||
19 | public array $simpleWhenClauses = [], | ||
20 | public mixed $elseScalarExpression = null, | ||
21 | ) { | ||
22 | } | ||
23 | |||
24 | public function dispatch(SqlWalker $walker): string | ||
25 | { | ||
26 | return $walker->walkSimpleCaseExpression($this); | ||
27 | } | ||
28 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SimpleSelectClause.php b/vendor/doctrine/orm/src/Query/AST/SimpleSelectClause.php new file mode 100644 index 0000000..0259e3b --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SimpleSelectClause.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SimpleSelectClause extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public SimpleSelectExpression $simpleSelectExpression, | ||
18 | public bool $isDistinct = false, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkSimpleSelectClause($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SimpleSelectExpression.php b/vendor/doctrine/orm/src/Query/AST/SimpleSelectExpression.php new file mode 100644 index 0000000..97e8f08 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SimpleSelectExpression.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | ||
11 | * | (AggregateExpression [["AS"] FieldAliasIdentificationVariable]) | ||
12 | * | ||
13 | * @link www.doctrine-project.org | ||
14 | */ | ||
15 | class SimpleSelectExpression extends Node | ||
16 | { | ||
17 | public string|null $fieldIdentificationVariable = null; | ||
18 | |||
19 | public function __construct(public Node|string $expression) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | public function dispatch(SqlWalker $walker): string | ||
24 | { | ||
25 | return $walker->walkSimpleSelectExpression($this); | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SimpleWhenClause.php b/vendor/doctrine/orm/src/Query/AST/SimpleWhenClause.php new file mode 100644 index 0000000..892165a --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SimpleWhenClause.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SimpleWhenClause extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public mixed $caseScalarExpression = null, | ||
18 | public mixed $thenScalarExpression = null, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkWhenClauseExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/Subselect.php b/vendor/doctrine/orm/src/Query/AST/Subselect.php new file mode 100644 index 0000000..8ff8595 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/Subselect.php | |||
@@ -0,0 +1,32 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class Subselect extends Node | ||
15 | { | ||
16 | public WhereClause|null $whereClause = null; | ||
17 | |||
18 | public GroupByClause|null $groupByClause = null; | ||
19 | |||
20 | public HavingClause|null $havingClause = null; | ||
21 | |||
22 | public OrderByClause|null $orderByClause = null; | ||
23 | |||
24 | public function __construct(public SimpleSelectClause $simpleSelectClause, public SubselectFromClause $subselectFromClause) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | public function dispatch(SqlWalker $walker): string | ||
29 | { | ||
30 | return $walker->walkSubselect($this); | ||
31 | } | ||
32 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SubselectFromClause.php b/vendor/doctrine/orm/src/Query/AST/SubselectFromClause.php new file mode 100644 index 0000000..7cf01e2 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SubselectFromClause.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class SubselectFromClause extends Node | ||
15 | { | ||
16 | /** @param mixed[] $identificationVariableDeclarations */ | ||
17 | public function __construct(public array $identificationVariableDeclarations) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public function dispatch(SqlWalker $walker): string | ||
22 | { | ||
23 | return $walker->walkSubselectFromClause($this); | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/SubselectIdentificationVariableDeclaration.php b/vendor/doctrine/orm/src/Query/AST/SubselectIdentificationVariableDeclaration.php new file mode 100644 index 0000000..eadf6bc --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/SubselectIdentificationVariableDeclaration.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | /** | ||
8 | * SubselectIdentificationVariableDeclaration ::= AssociationPathExpression ["AS"] AliasIdentificationVariable | ||
9 | * | ||
10 | * @link www.doctrine-project.org | ||
11 | */ | ||
12 | class SubselectIdentificationVariableDeclaration | ||
13 | { | ||
14 | public function __construct( | ||
15 | public PathExpression $associationPathExpression, | ||
16 | public string $aliasIdentificationVariable, | ||
17 | ) { | ||
18 | } | ||
19 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/TypedExpression.php b/vendor/doctrine/orm/src/Query/AST/TypedExpression.php new file mode 100644 index 0000000..d7cf76f --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/TypedExpression.php | |||
@@ -0,0 +1,15 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\DBAL\Types\Type; | ||
8 | |||
9 | /** | ||
10 | * Provides an API for resolving the type of a Node | ||
11 | */ | ||
12 | interface TypedExpression | ||
13 | { | ||
14 | public function getReturnType(): Type; | ||
15 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/UpdateClause.php b/vendor/doctrine/orm/src/Query/AST/UpdateClause.php new file mode 100644 index 0000000..cafcff0 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/UpdateClause.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}* | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class UpdateClause extends Node | ||
15 | { | ||
16 | public string $aliasIdentificationVariable; | ||
17 | |||
18 | /** @param mixed[] $updateItems */ | ||
19 | public function __construct( | ||
20 | public string $abstractSchemaName, | ||
21 | public array $updateItems, | ||
22 | ) { | ||
23 | } | ||
24 | |||
25 | public function dispatch(SqlWalker $walker): string | ||
26 | { | ||
27 | return $walker->walkUpdateClause($this); | ||
28 | } | ||
29 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/UpdateItem.php b/vendor/doctrine/orm/src/Query/AST/UpdateItem.php new file mode 100644 index 0000000..b540593 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/UpdateItem.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * UpdateItem ::= [IdentificationVariable "."] {StateField | SingleValuedAssociationField} "=" NewValue | ||
11 | * NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | | ||
12 | * EnumPrimary | SimpleEntityExpression | "NULL" | ||
13 | * | ||
14 | * @link www.doctrine-project.org | ||
15 | */ | ||
16 | class UpdateItem extends Node | ||
17 | { | ||
18 | public function __construct(public PathExpression $pathExpression, public InputParameter|ArithmeticExpression|null $newValue) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkUpdateItem($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/UpdateStatement.php b/vendor/doctrine/orm/src/Query/AST/UpdateStatement.php new file mode 100644 index 0000000..7ea5076 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/UpdateStatement.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * UpdateStatement = UpdateClause [WhereClause] | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class UpdateStatement extends Node | ||
15 | { | ||
16 | public WhereClause|null $whereClause = null; | ||
17 | |||
18 | public function __construct(public UpdateClause $updateClause) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkUpdateStatement($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/WhenClause.php b/vendor/doctrine/orm/src/Query/AST/WhenClause.php new file mode 100644 index 0000000..9bf194e --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/WhenClause.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class WhenClause extends Node | ||
15 | { | ||
16 | public function __construct( | ||
17 | public ConditionalExpression|Phase2OptimizableConditional $caseConditionExpression, | ||
18 | public mixed $thenScalarExpression = null, | ||
19 | ) { | ||
20 | } | ||
21 | |||
22 | public function dispatch(SqlWalker $walker): string | ||
23 | { | ||
24 | return $walker->walkWhenClauseExpression($this); | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/doctrine/orm/src/Query/AST/WhereClause.php b/vendor/doctrine/orm/src/Query/AST/WhereClause.php new file mode 100644 index 0000000..e4d7b66 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/AST/WhereClause.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Query\AST; | ||
6 | |||
7 | use Doctrine\ORM\Query\SqlWalker; | ||
8 | |||
9 | /** | ||
10 | * WhereClause ::= "WHERE" ConditionalExpression | ||
11 | * | ||
12 | * @link www.doctrine-project.org | ||
13 | */ | ||
14 | class WhereClause extends Node | ||
15 | { | ||
16 | public function __construct(public ConditionalExpression|Phase2OptimizableConditional $conditionalExpression) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | public function dispatch(SqlWalker $walker): string | ||
21 | { | ||
22 | return $walker->walkWhereClause($this); | ||
23 | } | ||
24 | } | ||