Open
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
Type
Projects
Status
Awaiting Triage