Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.7k
SQLite bind booleans #57862
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Type
Projects
- StatusShow more project fieldsAwaiting Triage
What is the problem this feature will solve?
Currently, all booleans need to be transformed from
trueto1andfalseto0to bind them as SQLite parameters.Trying to use a boolean results in an error:
What is the feature you are proposing to solve the problem?
SQLite supports booleans! I propose automatically transforming booleans to numbers, in the same way SQLite treats the boolean keywords:
Please note I only propose automatic conversion for boolean parameters to 0 and 1, not the other way around parsing results to booleans.
What alternatives have you considered?
Writing a wrapper or manually handling the conversion.