nom-sql
nom-sql copied to clipboard
Rust SQL parser written using nom
With nom 6.0 and the latest nightly Rust release, the compilation failed. After update nom to the latest, it works
Without this, `select * from;` parses successfully, even though it shouldn't.
Currently, when parse fails, the user only gets a very uninformative error string as a result. It would be nice to have a custom error type with useful functionality ,...
In standard SQL you may select literals without a table, eg `SELECT 1 + 1;`. This is not supported by `nom-sql` but in a perfect world it would be. comment...
In master (and on the incoming `bump nom to v5` PR), `compound_selection` will match unbalanced paren pairs. We only want "(nested)" or "nested" to match, but using opt for both...
Currently on master: https://github.com/ms705/nom-sql/blob/026473b277586e07359ae4a591dca5a39e74a349/src/order.rs#L58 In `src/order.rs`, the order by clause allows for trailing commas, which is technically invalid SQL. Eg, `"select * from users order by name ascage desc,\n"` will...
As mentioned in the comments of `arithmetic.rs`, operator precedence is not currently supported and neither is nested arithmetic expressions. I plan on eventually submitting a PR to support this but...
Kinda hacked in again… All this would deserve tests, kinda pushing as I go :( Sorry
It would be nice to be able to parse SQL statements with comments in them. #### Example ```sql create--blah blah table--blah blah tt--blah blah (--blah blah x--blah blah )--blah blah...
Hi! Thank you for this great library. I am trying to use it to parse [wikipedia dumps](https://dumps.wikimedia.org/) in my project [wikipedia-externallinks-fast-extraction](https://github.com/lovasoa/wikipedia-externallinks-fast-extraction). Unfortunately, they contain [mysql escape characters](https://dev.mysql.com/doc/refman/8.0/en/string-literals.html) that are currently...