Skip to content

fix(editor): capture quoted identifiers in qualified table references#1586

Open
xantiagoma wants to merge 1 commit into
TableProApp:mainfrom
xantiagoma:fix/editor-quoted-qualified-table-refs
Open

fix(editor): capture quoted identifiers in qualified table references#1586
xantiagoma wants to merge 1 commit into
TableProApp:mainfrom
xantiagoma:fix/editor-quoted-qualified-table-refs

Conversation

@xantiagoma
Copy link
Copy Markdown
Contributor

Summary

Fixes the SQL Context Analyzer failure currently red on main ("Strips quoting from the captured schema segment", added in the #1581 squash).

The table-reference regexes captured names with ([\w.]+), which cannot cross a quoted segment — FROM "sales".orders captured only sales, so the schema was lost and the test failed. The capture class now includes quote characters, and both the parsed table name and the schema segment strip `, ", and ':

SELECT * FROM "sales".orders      -- schema=sales, table=orders ✓
SELECT * FROM db."schema"."tbl" t -- schema=schema, table=tbl, alias=t ✓

Testing

  • SQLContextAnalyzerTests (including the four schema-segment tests) and SQLContextAnalyzerCaseInsensitiveTests pass locally
  • swiftlint lint --strict clean

Related: #1581, unblocks CI for #1580

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xantiagoma
Copy link
Copy Markdown
Contributor Author

The failing check is unrelated to this PR: the SQL Context Analyzer suite (which this PR fixes) now passes here.

The remaining failure is the ExecuteQueryTool suite, which has been failing identically on every main run since ad82403 (fix(editor): make statement splitting dollar-quote aware for PostgreSQL). Same two issues both there and here: error.code is -32602 instead of requestCancelled (-32002), and progress notifications never fire (methods.count == 0).

First failing main run with the same errors: https://github.com/TableProApp/TablePro/actions/runs/26887465313

Happy to look into that one separately if useful.

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