Skip to content
Snippets Groups Projects
Commit 29ffce7d authored by Artur Sabirov's avatar Artur Sabirov
Browse files
parent b3a98360
No related branches found
No related tags found
1 merge request!485query.ebnf(select): sync with query.pest
......@@ -10,19 +10,13 @@ cte ::= ('WITH'
cte ('(' column (',' column)* ')')? 'AS' '(' (select | values) ')'
(',' cte ('(' column (',' column)* ')')? 'AS' '(' (select | values) ')')*
)? select
select ::= 'SELECT' 'DISTINCT'? ((projection (',' projection)*))
'FROM' scan
(
('INNER' | ('LEFT' ('OUTER')?))? 'JOIN' (
(scan)
)
'ON' expression
)*
select ::= 'SELECT' 'DISTINCT'? projection (',' projection)* 'FROM' scan
(( 'INNER' | 'LEFT' 'OUTER'? )? 'JOIN' scan 'ON' expression)*
('WHERE' expression)?
('GROUP' 'BY' expression (',' expression)*)?
('HAVING' expression)?
('ORDER' 'BY' (expression ('ASC' | 'DESC')?) (',' expression ('ASC' | 'DESC')?)*)?
((('UNION' 'ALL'?) | ('EXCEPT' 'DISTINCT'?)) select)*
('ORDER' 'BY' expression ('ASC' | 'DESC')? (',' expression ('ASC' | 'DESC')?)*)?
(('UNION' 'ALL'? | 'EXCEPT' 'DISTINCT'?) select)?
projection ::= (table '.')? '*' | expression (('AS')? name)? | aggregate
scan ::= (table | '(' (select | values) ')') ('AS'? name)?
expression ::= (table '.')? column
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment