Added support to CaseExpression.
This commit is contained in:
parent
60ed7769cd
commit
189c729f15
@ -1469,6 +1469,7 @@ Conditional Expressions
|
|||||||
InExpression | NullComparisonExpression | ExistsExpression |
|
InExpression | NullComparisonExpression | ExistsExpression |
|
||||||
EmptyCollectionComparisonExpression | CollectionMemberExpression
|
EmptyCollectionComparisonExpression | CollectionMemberExpression
|
||||||
|
|
||||||
|
|
||||||
Collection Expressions
|
Collection Expressions
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -1505,7 +1506,7 @@ Arithmetic Expressions
|
|||||||
ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
|
ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
|
||||||
ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
|
ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
|
||||||
| FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
|
| FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
|
||||||
| FunctionsReturningDatetime | IdentificationVariable | InputParameter
|
| FunctionsReturningDatetime | IdentificationVariable | InputParameter | CaseExpression
|
||||||
|
|
||||||
Scalar and Type Expressions
|
Scalar and Type Expressions
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -1513,9 +1514,9 @@ Scalar and Type Expressions
|
|||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression
|
ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression
|
||||||
BooleanPrimary | EntityTypeExpression
|
BooleanPrimary | EntityTypeExpression | CaseExpression
|
||||||
StringExpression ::= StringPrimary | "(" Subselect ")"
|
StringExpression ::= StringPrimary | "(" Subselect ")"
|
||||||
StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression
|
StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression | CaseExpression
|
||||||
BooleanExpression ::= BooleanPrimary | "(" Subselect ")"
|
BooleanExpression ::= BooleanPrimary | "(" Subselect ")"
|
||||||
BooleanPrimary ::= StateFieldPathExpression | boolean | InputParameter
|
BooleanPrimary ::= StateFieldPathExpression | boolean | InputParameter
|
||||||
EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression
|
EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression
|
||||||
@ -1535,6 +1536,20 @@ Aggregate Expressions
|
|||||||
AggregateExpression ::= ("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" |
|
AggregateExpression ::= ("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" |
|
||||||
"COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"
|
"COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"
|
||||||
|
|
||||||
|
Case Expressions
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
|
||||||
|
CaseExpression ::= GeneralCaseExpression | SimpleCaseExpression | CoalesceExpression | NullifExpression
|
||||||
|
GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END"
|
||||||
|
WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression
|
||||||
|
SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END"
|
||||||
|
CaseOperand ::= StateFieldPathExpression | TypeDiscriminator
|
||||||
|
SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression
|
||||||
|
CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")"
|
||||||
|
NullifExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")"
|
||||||
|
|
||||||
Other Expressions
|
Other Expressions
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user