-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Description
What is the problem this feature will solve?
In JS, we have two different oddballs null
and undefined
. In SQL, they are represented as NULL
.
Inserting them to database makes them coerced to NULL
; however selecting to JS realm always produces null
s, which is not always desirable.
What is the feature you are proposing to solve the problem?
Similarly to statement.setReadBigInts(enabled)
, we can have statement.setReadNullAsUndefined()
to make reads return NULL
s as undefined
instead of null
.
Also we can have database-wide readNullAsUndefined
option in new DatabaseSync(path[, options])
What alternatives have you considered?
Drowning in boilerplate code.
humarkx
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Type
Projects
Status
Awaiting Triage