Documentation
¶
Overview ¶
Package refs answers one question about a query: which relations does it READ. That is all dependency inference needs, and it is deliberately less than a parser knows.
WHY NOT A PARSER. The spike behind #58 measured five, against official parsers as the oracle. memefish parsed 6 of 447 real BigQuery statements; go-pgquery is the Postgres oracle and weighs 14 MB with 70 packages; cockroachdb-parser is 37 MB and does not build without cgo. This reads 99.3% of 1,543 fresh Postgres statements and 26 of 26 fresh BigQuery, in 1.9 MB with nothing outside the standard library.
WHAT IT CANNOT DO, so nobody discovers it as a bug: `(TABLE x)` forms, uncommon clause keywords that take a relation-looking name, and anything that builds its SQL at runtime. A model that hits one declares the edge with `depends_on:` in its header, which is why that field exists.
The thirty cases in testdata were labelled by hand BEFORE any candidate ran, and the extractor was written afterwards -- so passing them is not evidence that it works, it is the floor that says it has not regressed. The evidence is in spikes/sql-parser/VERDICT.md, against SQL nobody chose.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.