Skip to content

Fix SQL macros parser handling and add coverage#220

Closed
Gimyoonsoo wants to merge 1 commit into
outerbase:mainfrom
Gimyoonsoo:algora-71-websocket-sql-tests
Closed

Fix SQL macros parser handling and add coverage#220
Gimyoonsoo wants to merge 1 commit into
outerbase:mainfrom
Gimyoonsoo:algora-71-websocket-sql-tests

Conversation

@Gimyoonsoo
Copy link
Copy Markdown

/claim #71

Summary

  • Normalize node-sql-parser output in the SQL macros plugin so single-statement parses and multi-statement parses are handled consistently.
  • Fix the preventSelectStar guard for single SELECT * statements, which were previously allowed when astify() returned an object instead of an array.
  • Add focused Vitest coverage for SQL macros plugin behavior: missing data source passthrough, external data source passthrough, non-admin SELECT * rejection, admin exception, and $_exclude(...) expansion.

Verification

  • node_modules\.bin\vitest.exe run plugins\sql-macros\index.test.ts
  • node_modules\.bin\prettier.exe --check plugins\sql-macros\index.ts plugins\sql-macros\index.test.ts
  • git diff --check
  • Attempted full node_modules\.bin\vitest.exe run; it still fails in existing src/rls/index.test.ts assertions, with this new SQL macros test file passing in that run.

@Gimyoonsoo Gimyoonsoo closed this May 15, 2026
@Gimyoonsoo Gimyoonsoo deleted the algora-71-websocket-sql-tests branch May 15, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant