Skip to content
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

Enable SQL features selectively #1201

Open
vszakd opened this issue Apr 4, 2024 · 2 comments
Open

Enable SQL features selectively #1201

vszakd opened this issue Apr 4, 2024 · 2 comments

Comments

@vszakd
Copy link

vszakd commented Apr 4, 2024

Hello,
given the breadth of the parser, it would be nice if it would be possible to selectively enable features on an opt-in basis.

Let's imagine an application where only a subset of SQL is supported. In this case, the application would need to check for every possible unsupported feature manually (e.g. if I don't support windowing in queries, I would need to check if the named_window field in the Select gets populated and abort).

It would be interesting, instead, to decide beforehand which feature set is to be supported, so that only "valid" SQL gets parsed and arrives to the application.

Thanks.

@alamb
Copy link
Collaborator

alamb commented Apr 10, 2024

I agree this is interesting, though I am not sure how easy it would be to add to the current crate

@vszakd
Copy link
Author

vszakd commented Apr 11, 2024

Setting the granularity at the keyword level, maybe we can try to modify the define_keyboard macro and the parse* functions so that they return false (not matching) when a keyword is disabled by configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants