forked from cornucopia-rs/cornucopia
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
parserA provlem with sql parsing.A provlem with sql parsing.
Description
Taken from a comment I made in the query parser a while ago. I'll probably forget about it at some point if it's not documented here.
clorinde/clorinde/src/parser.rs
Lines 464 to 468 in 5aeaaa6
| // TODO(bug): Using none_of(";") breaks on the first semicolon it encounters, even if that semicolon is inside: | |
| // - String literals: 'text with ; in it' | |
| // - Dollar-quoted strings: $$text with ; in it$$ | |
| // - Comments: -- comment with ; in it | |
| // We need proper SQL token awareness to know if a semicolon is part of these constructs or if it's the actual query terminator. |
The most robust solution is to use a proper parser like https://github.com/pganalyze/pg_query.rs, there could also be other things we replace chumsky with from it.
Metadata
Metadata
Assignees
Labels
parserA provlem with sql parsing.A provlem with sql parsing.