mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-23 09:47:12 -05:00
sql/sqlite.ts: Fix NULL handling
This commit is contained in:
parent
b096a79f95
commit
125e4d8ca7
|
|
@ -45,7 +45,13 @@ function _postprocess(obj: MixedRow): Row {
|
|||
const result = {};
|
||||
|
||||
for (const [k, v] of Object.entries(obj)) {
|
||||
result[k] = v.toString();
|
||||
// Return NULL values as js null, everything else as a string.
|
||||
|
||||
if (v === null) {
|
||||
result[k] = null;
|
||||
} else {
|
||||
result[k] = v.toString();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user