@bdkinc/knex-ibmi 0.3.13 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -466,24 +466,22 @@ var DB2Client = class extends import_knex.knex.Client {
|
|
|
466
466
|
if (error) {
|
|
467
467
|
this.printError(JSON.stringify(error, null, 2));
|
|
468
468
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
cursor.fetch((error2, result) => {
|
|
473
|
-
if (error2) {
|
|
474
|
-
console.log(JSON.stringify(error2, null, 2));
|
|
475
|
-
}
|
|
476
|
-
if (!cursor.noData) {
|
|
477
|
-
this.push(result);
|
|
478
|
-
}
|
|
479
|
-
});
|
|
469
|
+
cursor.fetch((error2, result) => {
|
|
470
|
+
if (error2) {
|
|
471
|
+
console.log(JSON.stringify(error2, null, 2));
|
|
480
472
|
}
|
|
473
|
+
const readableStream = new import_node_stream.Readable({
|
|
474
|
+
objectMode: true,
|
|
475
|
+
read() {
|
|
476
|
+
this.push(result);
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
readableStream.on("error", (err) => {
|
|
480
|
+
reject(err);
|
|
481
|
+
stream.emit("error", err);
|
|
482
|
+
});
|
|
483
|
+
readableStream.pipe(stream);
|
|
481
484
|
});
|
|
482
|
-
readableStream.on("error", (err) => {
|
|
483
|
-
reject(err);
|
|
484
|
-
stream.emit("error", err);
|
|
485
|
-
});
|
|
486
|
-
readableStream.pipe(stream);
|
|
487
485
|
}
|
|
488
486
|
);
|
|
489
487
|
});
|