mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-28 08:06:53 +00:00
EQL - parsing order by clause
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
grammar EQL;
|
||||
|
||||
select_statement
|
||||
: select_clause? fetch_clause* where_clause? limit_clause?
|
||||
: select_clause? fetch_clause* where_clause? orderby_clause? limit_clause?
|
||||
;
|
||||
|
||||
select_clause
|
||||
@@ -20,6 +20,24 @@ where_clause
|
||||
: 'where' conditional_expression
|
||||
;
|
||||
|
||||
orderby_clause
|
||||
: 'order' 'by' orderby_property (',' orderby_property)*
|
||||
;
|
||||
|
||||
orderby_property
|
||||
: PATH_VARIABLE asc_desc? nulls_firstlast?
|
||||
;
|
||||
|
||||
nulls_firstlast
|
||||
: 'nulls' 'first'
|
||||
| 'nulls' 'last'
|
||||
;
|
||||
|
||||
asc_desc
|
||||
: 'asc'
|
||||
| 'desc'
|
||||
;
|
||||
|
||||
limit_clause
|
||||
: 'limit' NUMBER_LITERAL offset_clause?
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user