-
Notifications
You must be signed in to change notification settings - Fork 606
README: update for recent improvements #128
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
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.
LGTM! I had some thoughts while reading this, noted in the comments.
|
||
## Example | ||
|
||
The current code is capable of parsing some trivial SELECT and CREATE TABLE statements. | ||
To parse a simple `SELECT` statement: |
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.
I've recently tried to create a new app using this crate and I instinctively tried to copy-paste the code from README to main.rs. I think adding the required imports would be helpful:
/*
use sqlparser::dialect::GenericDialect;
use sqlparser::parser::Parser;
*/
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.
Good idea. Done.
|
||
If you are assessing whether this project will be suitable for your needs, | ||
you'll likely need to experimentally verify whether it supports the subset of | ||
SQL that you need. Please file issues about any unsupported queries that you |
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.
Perhaps we should request PRs when possible, and issues - preferably with relevant bits of the grammar and/or testcases - otherwise? I feel this is more of a "we can share our efforts" project, rather than "we have some free resources to implement this for you". If that's the case, we should be upfront about this.
We could also add a link to a typical PR implementing a new syntax (once there is one after the renames in 0.4)
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.
Agreed on all points. I've adjusted this section a bit, but added the bulk of your recommendations to the "Contributing" section below.
README.md
Outdated
## Design | ||
|
||
This parser is implemented using the [Pratt Parser](https://tdop.github.io/) design, which is a top-down operator-precedence parser. | ||
This parser is implemented using the [Pratt Parser] design, which is a top-down |
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.
I didn't read the paper carefully, but I believe the Pratt parser is what we use to parse expressions (I found https://eli.thegreenplace.net/2010/01/02/top-down-operator-precedence-parsing more useful to understand the technique), otherwise what we have is hand-coded recursive descent parser. Right?
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.
Yes, all true. Updated accordingly.
Remove outdated bits that claim shoddy SQL support and code structure--we're much better on those fronts now! Also add a few paragraphs about the current state of SQL compliance, why it's hard to say anything detailed about SQL compliance, and what our long-term goals are.
Excellent, thank you! |
Remove outdated bits that claim shoddy SQL support and code
structure--we're much better on those fronts now! Also add a few
paragraphs about the current state of SQL compliance, why it's hard to
say anything detailed about SQL compliance, and what our long-term goals
are.
Motivated by #125.