You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(sqlite): option to avoid pushing parameters to the stack #57932
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'constnumbers=Array.from({length: 1000},(_,index)=>index)console.log(JSON.parse(newDatabaseSync(':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.
This is not causing a real problem, it's just hypothetical at the moment.
I've run into a similar problem before in a query builder where I was pushing fragments to an array using sql.push(...fragments) and the alternative in that scenario is for (const fragment of fragments) sql.push(fragment).
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-staleIssues and PRs exempt from automated stale handling.
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.
Activity
cjihrig commentedon Apr 19, 2025
Two questions:
aidant commentedon Apr 19, 2025
sql.push(...fragments)and the alternative in that scenario isfor (const fragment of fragments) sql.push(fragment).jlarmstrongiv commentedon Apr 30, 2025
That’s great to know! I regularly have queries where I insert thousands of variables. I usually just hit the SQLite limit of 2000 columns per table.
github-actions commentedon Nov 3, 2025
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
github-actions commentedon Dec 4, 2025
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.
For more information on how the project manages feature requests, please consult the feature request management document.