fix(sql-pglite): support parameterless SQL scripts - #8145
Open
k70suK3-k06a7ash1 wants to merge 1 commit into
Open
k70suK3-k06a7ash1 wants to merge 1 commit into
k70suK3-k06a7ash1 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 572c141 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
k70suK3-k06a7ash1
requested a deployment
to
fork
September 9, 2026 11:42 — with
GitHub Actions
Waiting
k70suK3-k06a7ash1
requested a deployment
to
fork
September 9, 2026 11:42 — with
GitHub Actions
Waiting
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
|
When will this PR be merged? |
|
@tim-smart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parameterless SQL scripts currently fail through the PGlite row-query interface with
cannot insert multiple commands into a prepared statement(SQLSTATE42601). For example:The adapter always calls PGlite's single-statement
queryAPI. This change separates execution into an internalScript | Parameterizedtagged union: parameterless SQL usesexec, while statements with a non-empty parameter array keep usingquerywith bound values. SQL is passed intact, including semicolons inside literals, comments and dollar-quoted blocks.Scripts return the final statement's rows, or an empty array when there are no rows. This applies to ordinary row queries,
.unpreparedand.stream, preserving result-name transformations and SQL error classification. The.raw,.valuesand.valuesUnpreparedpaths retain their existing single-statement behavior.This was originally encountered with the combined index creation in
SqlMessageStorageon4.0.0-rc.112. Currentmainalready executes those indexes separately; the regression tests here reproduce the remaining adapter limitation directly.Validation:
42601.pnpm test --run packages/sql/pglite/test: 7 files, 41 tests passed, covering DDL, final/empty results, execution modes, parameter binding, SQL quoting, failure atomicity, transaction rollback and result transformations.pnpm check,pnpm lint-fixandgit diff --checkpassed.@effect/sql-pglite.