-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a query parser #321
Comments
This is not really an update but more thoughts about the feature: I thought that it may be possible to have somewhat of an effect system where Queries with a Apart from that, I went through the possible sqlite statements to parse and want to restrict this parsing effort to just a few of them. Other statements would not make sense or are too complicated to get right. To include:
To (explicitly) exclude (for now):
Another thought I had right now: Another feature we can gain with a query parser is deriving the type to output for a @query function. I didn't think deeply about this yet. META: I should probably just start to code instead of writing novels here 😉 |
This sounds amazing! Thanks for your efforts. Did you look into the sqlparser package by any chance to find out if it can solve our problems?
This featured would be quite interesting and has actually been requested by users already (#94, #130) |
No I didn't and this seems far easier to work with than the antlr approach. I'll definitely look into it.
Yeah I made it sound like I just had that idea but in truth I knew it but had forgotten that this is also something we can do with the query parsing and wanted to add it, just so I wont forget it again. |
Here is a list of features that depend on the query parser being implemented:
|
I updated the issue text to summarize the current status. |
Awesome! Thanks for your investment! |
Introduction
This issue tracks the effort of adding a parser for SQLite queries, which will enable us to do static analysis on the queries, get dependencies of DatabaseViews, be aware of affected databases when allowing arbitrary queries and much more.
I have started implementing this for a prototype and want to build on the work done in #320 .
I updated the top post to better reflect the current status.
Roadmap/TODO
CREATE VIEW
and Views in sqlparser (Sqlparser: Add View support simolus3/drift#563)(Fix small issues in sqlparser variable support (named parameter binding over positional, support forinvalid, has to be solved from our side:@xyz
and$abc
variables))Old post, not really up2date anymore because I abandoned the antlr approach in favor of the much more mature sqlparser (as mentioned below):
The text was updated successfully, but these errors were encountered: