We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3898f5d commit a8f9b7dCopy full SHA for a8f9b7d
lib/result.js
@@ -11,7 +11,8 @@ var Result = function(rowMode) {
11
this.fields = [];
12
this._parsers = [];
13
this.RowCtor = null;
14
- if(rowMode == "array") {
+ this.rowAsArray = rowMode == "array";
15
+ if(this.rowAsArray) {
16
this.parseRow = this._parseRowAsArray;
17
}
18
};
@@ -93,7 +94,9 @@ Result.prototype.addFields = function(fieldDescriptions) {
93
94
//results in ~60% speedup on large query result sets
95
ctorBody += inlineParser(desc.name, i);
96
- this.RowCtor = Function("parsers", "rowData", ctorBody);
97
+ if(!this.rowAsArray) {
98
+ this.RowCtor = Function("parsers", "rowData", ctorBody);
99
+ }
100
101
102
module.exports = Result;
0 commit comments