You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql-table-scan.ts — the shared scanner every SQL path in the project uses — captures table names after FROM, JOIN, INTO and UPDATE only.
Missing: CREATE TABLE, ALTER TABLE, DROP TABLE, and the Access-specific IN "otra.accdb" clause that points a query at an external database file. That last one is a cross-backend edge with no representation in the graph today.
Proposed fix
Extend the clause set with the three DDL verbs, each carrying access: 'write'.
Add the IN "<path>" clause as a distinct capture. The target is an external database file, not a table, so it gets its own representation — decided: emit a file-kind node for the external backend, keyed on the normalized path, with metadata: { external: true, backendPath }, and a references edge to it tagged synthesizedBy: 'vba-external-backend'.
file is the honest kind: it is a file, just not one this index parsed. It needs no new NodeKind, and metadata.external keeps it distinguishable from indexed files in every query.
This module is shared by vba/sql-wrapper.ts, vba-form-extractor.ts and sql-query-extractor.ts. Every change is a change to all three.
Risk
This is the one module every SQL path shares, and its reserved-word reject list is the project's main defence against emitting WHERE as a table. Regression-test the reject list explicitly, not incidentally.
Acceptance criteria
CREATE TABLE TbNueva (...) -> write reference to TbNueva
DROP TABLE TbVieja -> write reference to TbVieja
SELECT * FROM T IN "C:\datos\otra.accdb" -> one external file node with external: true plus a vba-external-backend reference; T still resolves as a table
The same external path named from two different queries converges on one file node
Every existing reserved-word rejection still holds — re-run the full reject-list test suite
sqlTablesReferenced rises; no reserved word appears among the new names
Summary
sql-table-scan.ts— the shared scanner every SQL path in the project uses — captures table names afterFROM,JOIN,INTOandUPDATEonly.Missing:
CREATE TABLE,ALTER TABLE,DROP TABLE, and the Access-specificIN "otra.accdb"clause that points a query at an external database file. That last one is a cross-backend edge with no representation in the graph today.Proposed fix
Extend the clause set with the three DDL verbs, each carrying
access: 'write'.Add the
IN "<path>"clause as a distinct capture. The target is an external database file, not a table, so it gets its own representation — decided: emit afile-kind node for the external backend, keyed on the normalized path, withmetadata: { external: true, backendPath }, and areferencesedge to it taggedsynthesizedBy: 'vba-external-backend'.fileis the honest kind: it is a file, just not one this index parsed. It needs no newNodeKind, andmetadata.externalkeeps it distinguishable from indexed files in every query.This must agree with the linked-table origins in feat(vba): parameter nodes, and table fields from the Access ERD export #257 Half B, which represent the same thing from the Access structure export. Whichever issue lands first fixes the shape; the second adopts it.
This module is shared by
vba/sql-wrapper.ts,vba-form-extractor.tsandsql-query-extractor.ts. Every change is a change to all three.Risk
This is the one module every SQL path shares, and its reserved-word reject list is the project's main defence against emitting
WHEREas a table. Regression-test the reject list explicitly, not incidentally.Acceptance criteria
CREATE TABLE TbNueva (...)-> write reference toTbNuevaDROP TABLE TbVieja-> write reference toTbViejaSELECT * FROM T IN "C:\datos\otra.accdb"-> one externalfilenode withexternal: trueplus avba-external-backendreference;Tstill resolves as a tablesqlTablesReferencedrises; no reserved word appears among the new namesContext
Task T15 of
docs/vba-node-discovery-plan.md.