Skip to content

Commit

Permalink
clean up the orderby_item rule
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking authored and lukasj committed Mar 28, 2024
1 parent f1904da commit a5f9aa2
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions spec/src/main/asciidoc/ch04-query-language.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3038,14 +3038,16 @@ The syntax of the ORDER BY clause is:

----
orderby_clause ::= ORDER BY orderby_item {, orderby_item}*
orderby_item ::=
{state_field_path_expression | general_identification_variable | result_variable | scalar_expression}
[ASC | DESC]
[NULLS {FIRST | LAST}]
orderby_item ::= orderby_expression [ASC | DESC] [NULLS {FIRST | LAST}]
orderby_expression ::=
state_field_path_expression |
general_identification_variable |
result_variable |
scalar_expression
----

The ORDER BY clause specifies a list of items. Each `orderby_item` must be
one of the following:
The ORDER BY clause specifies a list of items. Each `orderby_expression`
must be one of the following:

1. A `state_field_path_expression` evaluating to an orderable state field
of an entity or embeddable class abstract schema type designated in the
Expand Down Expand Up @@ -3336,10 +3338,12 @@ groupby_clause ::= GROUP BY groupby_item {, groupby_item}*
groupby_item ::= single_valued_path_expression | identification_variable
having_clause ::= HAVING conditional_expression
orderby_clause ::= ORDER BY orderby_item {, orderby_item}*
orderby_item ::=
{state_field_path_expression | general_identification_variable | result_variable | scalar_expression}
[ASC | DESC]
[NULLS {FIRST | LAST}]
orderby_item ::= orderby_expression [ASC | DESC] [NULLS {FIRST | LAST}]
orderby_expression ::=
state_field_path_expression |
general_identification_variable |
result_variable |
scalar_expression
subquery ::= simple_select_clause subquery_from_clause [where_clause]
[groupby_clause] [having_clause]
subquery_from_clause ::=
Expand Down

0 comments on commit a5f9aa2

Please sign in to comment.