News of the day: I extended a node package (nquery / github) to enable it to parse more of the SQL that is actually used in my apps. Nquery is great but a little to narrower minded.
75% of my queries now parse ok.
I think after I add the syntax for case/when/else I'll be closer to 90%...
Why do I need to parse SQL? I want to interpret the SQL statements to integrate them automatically with a data abstraction layer...