Ensure converter functions are run in the correct order
This commit is contained in:
parent
f590b5bb51
commit
3e65b9894f
|
@ -161,18 +161,6 @@ class ResultSet {
|
|||
}
|
||||
}
|
||||
|
||||
// create objects, if desired
|
||||
if (this._impl.outFormat === constants.OUT_FORMAT_OBJECT) {
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const origRow = rows[i];
|
||||
const newRow = rows[i] = {};
|
||||
const metaData = this._impl.metaData;
|
||||
for (let j = 0; j < metaData.length; j++) {
|
||||
newRow[metaData[j].name] = origRow[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// run any conversion functions, if applicable
|
||||
// NOTE: we mark the connection as no longer in progress before making
|
||||
// calls to the converter function; this is needed to allow calls against
|
||||
|
@ -194,6 +182,18 @@ class ResultSet {
|
|||
}
|
||||
}
|
||||
|
||||
// create objects, if desired
|
||||
if (this._impl.outFormat === constants.OUT_FORMAT_OBJECT) {
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const origRow = rows[i];
|
||||
const newRow = rows[i] = {};
|
||||
const metaData = this._impl.metaData;
|
||||
for (let j = 0; j < metaData.length; j++) {
|
||||
newRow[metaData[j].name] = origRow[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue