ygrek / sqlgg

SQL Guided (code) Generator
https://ygrek.org/p/sqlgg/
GNU General Public License v2.0
62 stars 20 forks source link

sql: support full select syntax in subqueries #64

Closed cyberhuman closed 5 years ago

cyberhuman commented 5 years ago

The following worked:

$ sqlgg -
select 1 union select 2;

The following did not work because subqueries were limited to select_core grammar:

$ sqlgg -
select * from (select 1 union select 2);
==> select * from (select 1 union select 2)
Position 1:29 Tokens: union select 2)
Error: Sqlgg.Sql_parser.MenhirBasics.Error
Errors encountered, no code generated