-
Notifications
You must be signed in to change notification settings - Fork 550
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
parse SQLite pragma statement #969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution @marhoily -- ideally this PR would have one more test, but otherwise it looks great.
Thanks again
@@ -24,6 +24,51 @@ use sqlparser::ast::*; | |||
use sqlparser::dialect::{GenericDialect, SQLiteDialect}; | |||
use sqlparser::tokenizer::Token; | |||
|
|||
#[test] | |||
fn pragma_no_value() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also add a test for the [schema-name '.'] pragma-name
variant as well?
like PRAGMA foo.cache_size = 5
?
I think it is ok to start with basic syntax support and then we an add more support as follow on PRs, incrementally. This is the model we have used over time to build up the library of sql parsing capability this library supports |
I took the liberty of merging this PR up from main and running |
Co-authored-by: Andrew Lamb <[email protected]>
Adds support for SQLite PRAGMA statement:
PRAGMA cache_size = 10
According to the docs this is not all the possible syntax variations. If someone reviews my changes, I could add more before merging.