Skip to content

fix(ext/node): support numbered positional parameters in node:sqlite#31722

Merged
magurotuna merged 3 commits intodenoland:mainfrom
magurotuna:sqlite-numbered-param
Jan 1, 2026
Merged

fix(ext/node): support numbered positional parameters in node:sqlite#31722
magurotuna merged 3 commits intodenoland:mainfrom
magurotuna:sqlite-numbered-param

Conversation

@magurotuna
Copy link
Copy Markdown
Member

SQLite numbered positional parameters (?1, ?2, ?NNN) were incorrectly
treated as named parameters and skipped during binding, causing a
"column index out of range" error. This fix updates the parameter
binding logic to recognize that parameters whose names start with '?'
are positional and should be bound in order, just like anonymous
parameters (?).

Fixes #31719

SQLite numbered positional parameters (?1, ?2, ?NNN) were incorrectly
treated as named parameters and skipped during binding, causing a
"column index out of range" error. This fix updates the parameter
binding logic to recognize that parameters whose names start with '?'
are positional and should be bound in order, just like anonymous
parameters (?).
Copy link
Copy Markdown
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@magurotuna magurotuna merged commit d08d790 into denoland:main Jan 1, 2026
19 checks passed
@magurotuna magurotuna deleted the sqlite-numbered-param branch January 1, 2026 16:04
ayuusweetfish pushed a commit to ayuusweetfish/deno that referenced this pull request Jan 3, 2026
…enoland#31722)

SQLite numbered positional parameters (?1, ?2, ?NNN) were incorrectly
treated as named parameters and skipped during binding, causing a
"column index out of range" error. This fix updates the parameter
binding logic to recognize that parameters whose names start with '?'
are positional and should be bound in order, just like anonymous
parameters (?).

Fixes denoland#31719

(cherry picked from commit d08d790)
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.

node:sqlite: Numbered positional parameters (?1, ?2) cause "column index out of range" error

2 participants