We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65bc3d4 commit b5806f4Copy full SHA for b5806f4
1 file changed
packages/pg/lib/result.js
@@ -64,12 +64,9 @@ class Result {
64
const row = { ...this._prebuiltEmptyResultObject }
65
for (let i = 0, len = rowData.length; i < len; i++) {
66
const rawValue = rowData[i]
67
- const field = this.fields[i].name
68
if (rawValue !== null) {
69
- const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue
70
- row[field] = this._parsers[i](v)
71
- } else {
72
- row[field] = null
+ const field = this.fields[i]
+ row[field.name] = this._parsers[i](field.format === 'binary' ? Buffer.from(rawValue) : rawValue)
73
}
74
75
return row
0 commit comments