ms705 / nom-sql

Rust SQL parser written using nom
MIT License
232 stars 41 forks source link

Support selecting literals only #56

Open tomharmon opened 4 years ago

tomharmon commented 4 years ago

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 from @spazm (on the bump nom to v5 PR): nested_selection could attempt to parse with something more specific than field_definition_expr like field_definition_literals(hypothetical) which would parse without the FROM (or FROM as optional).