René's URL Explorer Experiment


Title: sqlite: bind parameters the same way `better-sqlite3` does. · Issue #67353 · nodejs/node · GitHub

Open Graph Title: sqlite: bind parameters the same way `better-sqlite3` does. · Issue #67353 · nodejs/node

X Title: sqlite: bind parameters the same way `better-sqlite3` does. · Issue #67353 · nodejs/node

Description: What is the problem this feature will solve? Hey 👋 Currently, node:sqlite is close to being a drop-in replacement for better-sqlite3 in query builders, ORMs and drivers, which is great, except parameters are bound differently. Integratio...

Open Graph Description: What is the problem this feature will solve? Hey 👋 Currently, node:sqlite is close to being a drop-in replacement for better-sqlite3 in query builders, ORMs and drivers, which is great, except para...

X Description: What is the problem this feature will solve? Hey 👋 Currently, node:sqlite is close to being a drop-in replacement for better-sqlite3 in query builders, ORMs and drivers, which is great, except para...

Opengraph URL: https://github.com/nodejs/node/issues/67353

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: bind parameters the same way `better-sqlite3` does.","articleBody":"### What is the problem this feature will solve?\n\nHey 👋\n\nCurrently, `node:sqlite` is close to being a drop-in replacement for `better-sqlite3` in query builders, ORMs and drivers, which is great, except parameters are bound differently. Integrations written against `better-sqlite3` pass parameters as an array, e.g. Kysely, Knex and Prisma 7:\n\nhttps://github.com/kysely-org/kysely/blob/67263069a242600e914e8a9e03b118e8cbf4267c/src/dialect/sqlite/sqlite-driver.ts#L117\nhttps://github.com/knex/knex/blob/e25d54bcb707714a17f5a5744eba5c4246bb4d1d/lib/dialects/better-sqlite3/index.js#L52\nhttps://github.com/prisma/prisma/blob/0b596ffecfcc55e37d6a7095c03193e2d28b8090/packages/adapter-better-sqlite3/src/better-sqlite3.ts#L90\n\n`node:sqlite` treats an array as a named parameters object, with keys `'0'`, `'1'`, etc., so none of them can accept a `node:sqlite` `Database` without changes, and wrappers have to adapt every call, e.g. MikroORM 7:\n\nhttps://github.com/mikro-orm/mikro-orm/blob/14737a2349c834dbb39e1dc82bd5adf32fb2531c/packages/sql/src/dialects/sqlite/NodeSqliteDialect.ts#L32-L33\n\n`better-sqlite3` flattens arrays into anonymous parameters, in any position, and accepts a single named parameters object in any position:\n\nhttps://github.com/WiseLibs/better-sqlite3/blob/dbc2ea1165fef1f599b9be12faea33fa5e9d7ffb/src/util/binder.cpp#L165-L186\n\n`node:sqlite` only treats the first argument as a potential named parameters object:\n\nhttps://github.com/nodejs/node/blob/18b32a3b1552e199a01f1a8d9fd64aa756d3b75b/src/node_sqlite.cc#L3859-L3860\n\n```js\nimport { Database } from 'node:sqlite'\n\nconst db = new Database(':memory:')\n\ndb.prepare('select ? as a, ? as b').all([1, 2])\n// Error: Unknown named parameter '0'\n\ndb.prepare('select ? as a, ? as b, ? as c').all(1, [2, 3])\n// Error: Provided value cannot be bound to SQLite parameter 2.\n\ndb.prepare('select :x as x, ? as a').all(2, { x: 1 })\n// Error: Provided value cannot be bound to SQLite parameter 3.\n\nconst stmt = db.prepare('select ? as a, ? as b')\nstmt.setAllowUnknownNamedParameters(true)\nstmt.all([1, 2])\n// [ { a: null, b: null } ] 😬\n```\n\n| | `better-sqlite3` | `node:sqlite` |\n|---|---|---|\n| `all(1, 2)` | ✅ | ✅ |\n| `all([1, 2])` | ✅ | ❌ `Unknown named parameter '0'` |\n| `all([1, 2], 3)` | ✅ | ❌ `Unknown named parameter '0'` |\n| `all(1, [2, 3])` | ✅ | ❌ `Provided value cannot be bound to SQLite parameter 2.` |\n| `all([1], [2, 3])` | ✅ | ❌ `Unknown named parameter '0'` |\n| `all({ x: 1 }, 2)` | ✅ | ✅ |\n| `all(2, { x: 1 })` | ✅ | ❌ `Provided value cannot be bound to SQLite parameter 3.` |\n| `all([2, 3], { x: 1 })` | ✅ | ❌ `Unknown named parameter '0'` |\n| `all({ x: 1 }, [2, 3])` | ✅ | ❌ `Provided value cannot be bound to SQLite parameter 2.` |\n\nThis was raised from a different angle (stack size) in #57932, which was closed as stale.\n\n### What is the feature you are proposing to solve the problem?\n\n`all()`, `get()`, `iterate()` and `run()` should bind parameters the same way `better-sqlite3` does: arrays are flattened into anonymous parameters, in any position, and a single plain object, in any position, is named parameters.\n\nEvery call shape this changes currently throws, or silently binds `NULL` with `setAllowUnknownNamedParameters(true)`, so no working code relies on the current behavior.\n\nTogether with #67352 (`reader`), this lets Kysely's `better-sqlite3` dialect run on a `node:sqlite` `Database` as is: migrations, `insert ... returning`, raw queries, streaming, transactions and introspection all pass with just those two differences shimmed.\n\n### What alternatives have you considered?\n\nOnly accepting an array as the first argument. It covers the most common call shape, but integrations that use the other shapes would still need changes.\n\nSpreading in userland, `statement.all(...parameters)`. It works up to SQLite's default limit of 32766 parameters, but it's exactly the downstream change we want to avoid: every `better-sqlite3`-based integration has to special-case `node:sqlite`, and switching their call sites to spread breaks wrappers that implement the array signature.\n","author":{"url":"https://github.com/igalklebanov","@type":"Person","name":"igalklebanov"},"datePublished":"2026-11-08T22:55:33Z","url":"https://github.com/nodejs/node/issues/67353"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8a6c2909-ce32-bcf0-3478-9104e5ebb568
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE52E:24645:C02F90:FD9AB6:6B01C49B
html-safe-noncef5128ce2bc368c51eb7133b08a2b9836ebe05dc086e5e8c853548243ec1221e1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTJFOjI0NjQ1OkMwMkY5MDpGRDlBQjY6NkIwMUM0OUIiLCJ2aXNpdG9yX2lkIjoiMzY1NzY2MTQ0NDYxNjQ3MTcwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacec96befefd9032a28c8dc9ab4ce690b4f40fb6f6ebc9eff5e1c5fe9b23da4694
hovercard-subject-tagissue:6276646599
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/67353/issue_layout
twitter:imagehttps://opengraph.githubassets.com/44d48ed986496f8beeb07ede622c5c48e6ed2df1dcd2337a72737b2eb2b468f3/nodejs/node/issues/67353
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/44d48ed986496f8beeb07ede622c5c48e6ed2df1dcd2337a72737b2eb2b468f3/nodejs/node/issues/67353
og:image:altWhat is the problem this feature will solve? Hey 👋 Currently, node:sqlite is close to being a drop-in replacement for better-sqlite3 in query builders, ORMs and drivers, which is great, except para...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameigalklebanov
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/67353#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67353
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67353
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/67353
Reloadhttps://github.com/nodejs/node/issues/67353
Reloadhttps://github.com/nodejs/node/issues/67353
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues637 (637)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67353
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67353
sqlite: bind parameters the same way better-sqlite3 does.https://github.com/nodejs/node/issues/67353#top
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
sqliteIssues and PRs related to the SQLite subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22sqlite%22
https://github.com/igalklebanov
igalklebanovhttps://github.com/igalklebanov
on Nov 8, 2026https://github.com/nodejs/node/issues/67353#issue-6276646599
https://github.com/kysely-org/kysely/blob/67263069a242600e914e8a9e03b118e8cbf4267c/src/dialect/sqlite/sqlite-driver.ts#L117https://github.com/kysely-org/kysely/blob/67263069a242600e914e8a9e03b118e8cbf4267c/src/dialect/sqlite/sqlite-driver.ts#L117
https://github.com/knex/knex/blob/e25d54bcb707714a17f5a5744eba5c4246bb4d1d/lib/dialects/better-sqlite3/index.js#L52https://github.com/knex/knex/blob/e25d54bcb707714a17f5a5744eba5c4246bb4d1d/lib/dialects/better-sqlite3/index.js#L52
https://github.com/prisma/prisma/blob/0b596ffecfcc55e37d6a7095c03193e2d28b8090/packages/adapter-better-sqlite3/src/better-sqlite3.ts#L90https://github.com/prisma/prisma/blob/0b596ffecfcc55e37d6a7095c03193e2d28b8090/packages/adapter-better-sqlite3/src/better-sqlite3.ts#L90
https://github.com/mikro-orm/mikro-orm/blob/14737a2349c834dbb39e1dc82bd5adf32fb2531c/packages/sql/src/dialects/sqlite/NodeSqliteDialect.ts#L32-L33https://github.com/mikro-orm/mikro-orm/blob/14737a2349c834dbb39e1dc82bd5adf32fb2531c/packages/sql/src/dialects/sqlite/NodeSqliteDialect.ts#L32-L33
https://github.com/WiseLibs/better-sqlite3/blob/dbc2ea1165fef1f599b9be12faea33fa5e9d7ffb/src/util/binder.cpp#L165-L186https://github.com/WiseLibs/better-sqlite3/blob/dbc2ea1165fef1f599b9be12faea33fa5e9d7ffb/src/util/binder.cpp#L165-L186
node/src/node_sqlite.cchttps://github.com/nodejs/node/blob/18b32a3b1552e199a01f1a8d9fd64aa756d3b75b/src/node_sqlite.cc#L3859-L3860
18b32a3https://github.com/nodejs/node/commit/18b32a3b1552e199a01f1a8d9fd64aa756d3b75b
#57932https://github.com/nodejs/node/issues/57932
#67352https://github.com/nodejs/node/issues/67352
MikeMcC399https://github.com/MikeMcC399
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
sqliteIssues and PRs related to the SQLite subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22sqlite%22
on Nov 9, 2026https://github.com/nodejs/node/issues/67353#event-35547291901
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Nov 9, 2026https://github.com/nodejs/node/issues/67353#event-35547294435
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Nov 9, 2026https://github.com/nodejs/node/issues/67353
https://github.com/araujogui
araujoguihttps://github.com/araujogui
on Nov 20, 2026https://github.com/nodejs/node/issues/67353#issuecomment-7041826588
https://github.com/igalklebanov
igalklebanovhttps://github.com/igalklebanov
on Nov 20, 2026https://github.com/nodejs/node/issues/67353#issuecomment-7043920225
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/67353
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67353
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
sqliteIssues and PRs related to the SQLite subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22sqlite%22
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.