Skip to content

fix(sqlite): split named queries without trailing semicolons - #4555

Open
lumbrjx wants to merge 1 commit into
sqlc-dev:mainfrom
lumbrjx:fix/sqlite-named-query-boundaries
Open

fix(sqlite): split named queries without trailing semicolons#4555
lumbrjx wants to merge 1 commit into
sqlc-dev:mainfrom
lumbrjx:fix/sqlite-named-query-boundaries

Conversation

@lumbrjx

@lumbrjx lumbrjx commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Fix SQLite query files containing multiple named queries when an earlier query omits its trailing semicolon.

The SQLite parser now treats a subsequent -- name: annotation as a query boundary while preserving source offsets. This prevents the preceding query from absorbing the next annotation and SQL.

Fixes #4552

Testing

  • make start
  • make test

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.

sqlite engine: query missing trailing semicolon before next -name query causes "duplicate query name" (parser misparses query boundary)

1 participant