proto.io 0.0.191 → 0.0.193
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.
|
@@ -1027,15 +1027,17 @@ class PostgresClientDriver {
|
|
|
1027
1027
|
return utilsJs.asyncStream(async function* () {
|
|
1028
1028
|
const client = db instanceof pg.Pool ? await db.connect() : db;
|
|
1029
1029
|
const stream = new QueryStream(text, values, { batchSize });
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1030
|
+
yield* utilsJs.IteratorPool(Number.MAX_SAFE_INTEGER, async function* () {
|
|
1031
|
+
client.query(stream);
|
|
1032
|
+
try {
|
|
1033
|
+
yield* stream;
|
|
1034
|
+
}
|
|
1035
|
+
finally {
|
|
1036
|
+
stream.destroy();
|
|
1037
|
+
if (db instanceof pg.Pool)
|
|
1038
|
+
client.release();
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1039
1041
|
});
|
|
1040
1042
|
}
|
|
1041
1043
|
async version() {
|