Skip to content

feat(sql): index Dysflow saved Access queries (queries/*.sql) - #15

Closed
ardelperal wants to merge 1 commit into
feat/vba-enums-constsfrom
feat/vba-sql-queries
Closed

feat(sql): index Dysflow saved Access queries (queries/*.sql)#15
ardelperal wants to merge 1 commit into
feat/vba-enums-constsfrom
feat/vba-sql-queries

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

Slice 2 of 2 (chained on #14). Closes the other high-value VBA-for-Access gap: the saved-query/data layer.

What

Dysflow exports saved Access QueryDefs as queries/.sql + a queries.json manifest. CodeGraph did not recognize .sql at all, so the data layer was invisible and VBA-vs-table usage couldn't be traced.

Changes

  • New SqlQueryExtractor: a 'query' node per .sql + 'references' edges to tables it names (FROM/JOIN/INTO/UPDATE; bracketed names like [Order Details] unwrapped; deduped), tagged synthesizedBy 'sql-query-table'.
  • New Language 'sql' + NodeKind 'query'; routed in the tree-sitter dispatch.
  • Detection gated on a sibling queries.json (per decision) so non-Access repos are untouched: .sql stays out of EXTENSION_MAP (isSourceFile stays false), and every discovery path admits a .sql only when its dir carries the manifest — the git-ls-files scan, the non-git fs walk, the incremental git-status sync, and the file watcher.

Tests (strict TDD)

  • extraction-sql-query.test.ts — extractor output shape (9 cases), red then green.
  • sql-query-discovery-gate.test.ts — E2E: a .sql with sibling queries.json is indexed; one without is ignored (proves zero collateral for non-Access repos).
  • Real-fixtures E2E extended with src/queries/ (Dysflow layout) — exercises the git-ls-files path.
  • Full suite: only the pre-existing Windows-flaky failures (frameworks-integration JVM, mcp-roots EPERM) remain, identical to baseline. tsc clean.

Note

Chained on #14 (feat/vba-enums-consts). Merge #14 first; GitHub will auto-retarget this PR to main.

Dysflow exports each saved Access QueryDef as queries/<Name>.sql plus a
queries.json manifest. CodeGraph did not recognize .sql at all, so the
app's entire saved-query/data layer was invisible.

Add SqlQueryExtractor: emits a 'query' node per .sql file + 'references'
edges to the tables it names (FROM/JOIN/INTO/UPDATE, bracketed names
unwrapped, deduped), tagged synthesizedBy 'sql-query-table'.

Detection is gated on a sibling queries.json so non-Access repos are
unaffected: .sql stays out of EXTENSION_MAP (isSourceFile false), and the
directory-discovery walk + git-ls-files path + incremental sync + watcher
each only admit a .sql when its dir carries the manifest.

Adds Language 'sql' and NodeKind 'query'; routes 'sql' in tree-sitter
dispatch. Tests: extractor unit suite, a discovery-gate E2E (manifest
present vs absent), and a real-fixtures query under src/queries/.
@ardelperal
ardelperal deleted the branch feat/vba-enums-consts June 30, 2026 07:32
@ardelperal ardelperal closed this Jun 30, 2026
@ardelperal
ardelperal deleted the feat/vba-sql-queries branch June 30, 2026 07:33
ardelperal added a commit that referenced this pull request Jul 3, 2026
- vba-graph-connectivity-fixes (PR #14, 9b1787a; affected issues #12, #13)
- vba-api-declarations (PR #31, 9b614b7; issue #15)
- 2026-06-30-vba-event-tracer (PR #36, 393b14d)
- 2026-06-30-vba-sql-impact (PR #38, ba25ef4)

The artifact folders had been left in openspec/changes/ after their PRs landed on main; an openspec list now reports them as still-active, which masks the true state of the SDD pipeline. Move to archive/ alongside the other finished changes and update [Unreleased] to record the hygiene. Pure docs/text move, zero product-code impact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant