Skip to content

feat(sql-editor): variables with @set, secrets, and per-connection overrides#100

Merged
huyplb merged 3 commits into
mainfrom
feat/sql-editor-variables-v3
Jul 24, 2026
Merged

feat(sql-editor): variables with @set, secrets, and per-connection overrides#100
huyplb merged 3 commits into
mainfrom
feat/sql-editor-variables-v3

Conversation

@huyplb

@huyplb huyplb commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add SQL Editor global variables: scalar / list / table with ${{name}} and ${{name.col}}, sidebar management, autocomplete, hover, and grid capture.
  • Support -- @set auto-capture (reattached across statement splits), sequential per-statement runs, and amber UI warnings on @set failures.
  • v3: secret masking (session-only values), per-connection overrides, table preview, export/import JSON; docs in USER_GUIDE.

Test plan

  • Unit tests: sql-variables.test.ts (36) + sqlEditorTabLogic.test.ts (reattach @set)
  • cd apps/web && npx tsc --noEmit
  • Manual: create scalar/list/table; ${{ autocomplete; -- @set above SELECT creates vars
  • Manual: secret masked in sidebar/hover; value cleared after reload
  • Manual: per-connection override changes only that destination’s substituted SQL
  • Manual: failed @set shows amber banner; export/import JSON round-trip

Made with Cursor

huyplb and others added 3 commits July 24, 2026 00:14
…nnection overrides

Let users reuse ${{name}} / ${{name.col}} across queries, capture results via -- @set or the grid, mask secrets session-only, override values per destination, and export/import variable JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
… regexes

Add detect-unsafe-regex exemptions for bounded ${{…}} / @set patterns, remove
invalid react-hooks disable comments, and parse typed tokens without regex.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@huyplb
huyplb merged commit 6475fcc into main Jul 24, 2026
9 checks passed
@huyplb
huyplb deleted the feat/sql-editor-variables-v3 branch July 24, 2026 06:33
@tedious-code tedious-code deleted a comment from cursor Bot Jul 24, 2026
@tedious-code tedious-code deleted a comment from cursor Bot Jul 24, 2026
@tedious-code tedious-code deleted a comment from cursor Bot Jul 24, 2026
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