EQL - parsing fetch clause with lazy/query option

This commit is contained in:
Robin Bygrave
2016-07-13 13:04:38 +12:00
parent be6754bd06
commit 45d7e3cafd
11 changed files with 1209 additions and 500 deletions
+39 -2
View File
@@ -17,7 +17,7 @@ where_clause
;
fetch_path
: 'fetch' PATH_VARIABLE fetch_property_set?
: 'fetch' fetch_option? PATH_VARIABLE fetch_property_set?
;
fetch_property_set
@@ -30,8 +30,34 @@ fetch_property_group
fetch_property
: PATH_VARIABLE
| fetch_query_hint
| fetch_lazy_hint
;
fetch_query_hint
: '+' fetch_query_option
;
fetch_lazy_hint
: '+' fetch_lazy_option
;
fetch_option
: fetch_query_option
| fetch_lazy_option
;
fetch_query_option
: 'query' (fetch_batch_size)?
;
fetch_lazy_option
: 'lazy' (fetch_batch_size)?
;
fetch_batch_size
: '(' NUMBER_LITERAL ')'
;
conditional_expression
: (conditional_term) ('or' conditional_term)*
@@ -153,7 +179,18 @@ BOOLEAN_LITERAL
;
NUMBER_LITERAL
: [0-9]+ '.'? [0-9]*;
: '-'? DOUBLE
| '-'? INT
| ZERO
;
DOUBLE
: [0-9]+ '.' [0-9]*;
INT
: [1-9] [0-9]*;
ZERO : '0';
STRING_LITERAL
: '\'' ( ~'\'' | '\'\'' )* '\''