Title: SQLite bind booleans · Issue #57862 · nodejs/node · GitHub
Open Graph Title: SQLite bind booleans · Issue #57862 · nodejs/node
X Title: SQLite bind booleans · Issue #57862 · nodejs/node
Description: What is the problem this feature will solve? Currently, all booleans need to be transformed from true to 1 and false to 0 to bind them as SQLite parameters. Trying to use a boolean results in an error: TypeError: Provided value cannot be...
Open Graph Description: What is the problem this feature will solve? Currently, all booleans need to be transformed from true to 1 and false to 0 to bind them as SQLite parameters. Trying to use a boolean results in an er...
X Description: What is the problem this feature will solve? Currently, all booleans need to be transformed from true to 1 and false to 0 to bind them as SQLite parameters. Trying to use a boolean results in an er...
Opengraph URL: https://github.com/nodejs/node/issues/57862
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SQLite bind booleans","articleBody":"### What is the problem this feature will solve?\n\nCurrently, all booleans need to be transformed from `true` to `1` and `false` to `0` to bind them as SQLite parameters.\n\nTrying to use a boolean results in an error:\n\n```\nTypeError: Provided value cannot be bound to SQLite parameter 1.\n\ncode: 'ERR_INVALID_ARG_TYPE'\n```\n\n### What is the feature you are proposing to solve the problem?\n\nSQLite [supports](https://sqlite.org/datatype3.html#boolean_datatype) booleans! I propose automatically transforming booleans to numbers, in the same way SQLite treats the boolean keywords:\n\n> SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true).\n\n> SQLite recognizes the keywords \"TRUE\" and \"FALSE\", as of version 3.23.0 (2018-04-02) but those keywords are really just alternative spellings for the integer literals 1 and 0 respectively.\n\nPlease note I only propose automatic conversion for boolean parameters to 0 and 1, not the other way around parsing results to booleans.\n\n### What alternatives have you considered?\n\nWriting a wrapper or manually handling the conversion.","author":{"url":"https://github.com/jlarmstrongiv","@type":"Person","name":"jlarmstrongiv"},"datePublished":"2025-04-13T12:23:02Z","url":"https://github.com/nodejs/node/issues/57862"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d9930923-2921-d66d-ed2b-b862f2281063 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DFF2:19E603:4BB1EF:625FB0:6AED24A9 |
| html-safe-nonce | 202777b6ad72f6712cd8d59b6b5b80232e4c72472270877b1c08476216fbab65 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkYyOjE5RTYwMzo0QkIxRUY6NjI1RkIwOjZBRUQyNEE5IiwidmlzaXRvcl9pZCI6IjY1NDc5MjExODYzNzE0Nzg2OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5d27decaa98b55a78c51a9619103becd98883b1d712d3b04c46871254f662429 |
| hovercard-subject-tag | issue:2991233063 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/57862/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68793b1618d6810cc03506b474766279c89411c73e4232b2522b204709415930/nodejs/node/issues/57862 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68793b1618d6810cc03506b474766279c89411c73e4232b2522b204709415930/nodejs/node/issues/57862 |
| og:image:alt | What is the problem this feature will solve? Currently, all booleans need to be transformed from true to 1 and false to 0 to bind them as SQLite parameters. Trying to use a boolean results in an er... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jlarmstrongiv |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width