pub fn tables_in_sql(sql: &str) -> Vec<String>Expand description
Table names a SQL string literal STATICALLY reaches — the Db analog of the Net host /
Exec command / Fs path literal surface (feeds allow Db in <scope> <table>…, AS-EFF-008).
Conservative by construction, because a wrong capture here would FABRICATE: the string must
open with a SQL statement keyword, and only identifiers in table position are taken —
FROM/JOIN anywhere, INTO anywhere, statement-leading UPDATE/TRUNCATE, and
TABLE (create/drop/alter), skipping ONLY/IF NOT EXISTS. UPDATE mid-statement is
deliberately ignored (FOR UPDATE SKIP LOCKED must not yield a table “skip”). A
dynamically-built query yields nothing — the gate’s opaque case — never a guess.
Output is lower-cased, quote/backtick-stripped, schema.table kept qualified, deduped.
SPEC §2 pins this algorithm token-for-token across engines; the cross-impl vector battery
(candor-spec conformance/tables/vectors.json, run.sh Part 4b) enforces the JVM/TS mirrors.