Currently using a really bare-bones character by character parsing approach to get going quickly, but this has a lot of obvious problems:
Lots of advanced syntax is not supported
We're probably getting stuff wrong when we see strings that contain syntax
We're probably getting stuff wrong when we see comment is ... stuff that contains syntax
https://github.com/pganalyze/pg_query.rs might do some of the heavy lifting here, although it appears to link with libpq (or perhaps some part of the server?) so it might be heavy weight.
Essentially we should reimplement most of the whole sqltext module, using some library for parsing SQL.
Currently using a really bare-bones character by character parsing approach to get going quickly, but this has a lot of obvious problems:
comment is ...
stuff that contains syntaxhttps://github.com/pganalyze/pg_query.rs might do some of the heavy lifting here, although it appears to link with libpq (or perhaps some part of the server?) so it might be heavy weight.
Essentially we should reimplement most of the whole
sqltext
module, using some library for parsing SQL.