-
Notifications
You must be signed in to change notification settings - Fork 525
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
Interest in partial parsing and sql formatting? #1392
Comments
This is a great feature. SQL formatting, removing comments, and highlighting keywords are all very practical capabilities. If necessary, I can also contribute what I can. |
I think adding hooks (like offsets / spans into the AST) would fit into sqlparser-rs 's design I am not quite sure what you mean by "partial parse of a sql string" -- maybe you mean the parser would be able to produce an AST even for a partial SQL query? Text highlighting I think would be possible if the ast had spans (location in the original parsed query) -- I am not sure highlighting itself fits into the crate |
I think we only need to provide some built-in visitors like alibaba/druid to meet the needs, which will also help others learn and use sqlparser @alamb |
There is a basic visitor already: https://docs.rs/sqlparser/latest/sqlparser/ast/trait.Visitor.html, perhaps that is enough |
Of course, this is a small case for SQL engine developers. I want to provide some SqlUtils to attract more developers. I will try to do something. If there is progress, I will synchronize with everyone. |
Hello! I've been loving sqlparser-rs, I've been having a lot of fun using it with a tool I've been working on recently. As part of my work, I would like to do two things with sqlparser-rs that I don't think are supported right now. I'd like to be able to get a partial parse of a sql string back out, for use with code editors and text highlighting. Additionally, I would like to be able to format sql with my particular dialect as well eventually. Would you all be interested in me trying to contribute this back to the library somehow when I get around to it? Did I miss something somewhere hopefully? Thanks again for a great library.
The text was updated successfully, but these errors were encountered: