sqlite-parser
sqlite-parser copied to clipboard
JavaScript implentation of SQLite 3 query parser
Any suggestions on how I can have sqlite-parser to allow for an "/" in the table names just like "."? DB2 has libraries that can contain '/' in the table...
I've added a `console.log(location())` inside `bind_parameter` predicate, and for a simple query like below ```sql select foo.*, ? as bar, upper(a) as A ``` `bind_parameter` is evaluated 4 times. I've...
In a select statement, reconstituting any expression that isn't aliased must take some recursion to drill down and glue it back together. Up at the statement[i].result[i] level, would it be...
This will really help in testing different queries and hence it will be possible to write an extensive and exhaustive test suite with it.
Adding in nodes to handle comments is needed to support other tooling that uses the parser to apply transformations to the entire codebase. If we were to apply a refactoring...
## Input ``` javascript { "type": "definition", "variant": "constraint", "definition": [ { "type": "constraint", "variant": "foreign key", "references": { "type": "identifier", "variant": "table", "name": "hives" } } ], "columns": [...
 When switching on type you need to use strings because of the whitespace in some of the names. This isn't too important but would be a nice to have....
It's probably more an academic problem than a real life issue ... trailing spaces from table or column names do not make it into the AST, e.g. ``` select "a...
I'd be great if after parsing, I could simply reference (for example) results.readFrom and results.writtenTo to know which tables will be touched and how, accurately factoring subqueries into the process.