-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Description
What is the problem this feature will solve?
At the moment the only way to pass sqlite anonymous parameters is via the stack. This presents a problem as you can encounter a RangeError: Maximum call stack size exceeded
when passing parameters.
Example
node --stack-size=50 # lowered to simulate the exception
import { DatabaseSync } from 'node:sqlite'
const numbers = Array.from({ length: 1000 }, (_, index) => index)
console.log(
JSON.parse(
new DatabaseSync(':memory:')
.prepare(`select json_array(${numbers.map(() => '?')}) as numbers`)
.get(...numbers).numbers
)
)
What is the feature you are proposing to solve the problem?
Consider providing functionality for binding anonymous parameters to SQLite queries without having to place them on the stack.
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Type
Projects
Status
Awaiting Triage