Skip to content

Commit 32fbe37

Browse files
committed
perf(pg-native): avoid unnecessary call to ntuples
1 parent 65bc3d4 commit 32fbe37

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/pg-native/lib/build-result.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ class Result {
3333
}
3434

3535
consumeRows(pq) {
36-
const tupleCount = pq.ntuples()
37-
this.rows = new Array(tupleCount)
38-
for (let i = 0; i < tupleCount; i++) {
36+
this.rows = new Array(this.rowCount)
37+
for (let i = 0; i < this.rowCount; i++) {
3938
this.rows[i] = this._arrayMode ? this.consumeRowAsArray(pq, i) : this.consumeRowAsObject(pq, i)
4039
}
4140
}

0 commit comments

Comments
 (0)