@prisma/client-engine-runtime 6.16.0-dev.3 → 6.16.0-dev.30
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 +5 -14
- package/dist/index.mjs +5 -14
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1189,19 +1189,7 @@ var import_driver_adapter_utils2 = require("@prisma/driver-adapter-utils");
|
|
|
1189
1189
|
function serializeSql(resultSet) {
|
|
1190
1190
|
return resultSet.rows.map(
|
|
1191
1191
|
(row) => row.reduce((acc, value, index) => {
|
|
1192
|
-
|
|
1193
|
-
let nested = acc;
|
|
1194
|
-
for (let i = 0; i < splitByDot.length; i++) {
|
|
1195
|
-
const key = splitByDot[i];
|
|
1196
|
-
if (i === splitByDot.length - 1) {
|
|
1197
|
-
nested[key] = value;
|
|
1198
|
-
} else {
|
|
1199
|
-
if (nested[key] === void 0) {
|
|
1200
|
-
nested[key] = {};
|
|
1201
|
-
}
|
|
1202
|
-
nested = nested[key];
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1192
|
+
acc[resultSet.columnNames[index]] = value;
|
|
1205
1193
|
return acc;
|
|
1206
1194
|
}, {})
|
|
1207
1195
|
);
|
|
@@ -1957,6 +1945,7 @@ var TransactionManager = class {
|
|
|
1957
1945
|
this.transactions.set(transaction.id, transaction);
|
|
1958
1946
|
let hasTimedOut = false;
|
|
1959
1947
|
const startTimer = setTimeout(() => hasTimedOut = true, validatedOptions.maxWait);
|
|
1948
|
+
startTimer.unref();
|
|
1960
1949
|
transaction.transaction = await this.driverAdapter.startTransaction(validatedOptions.isolationLevel).catch(rethrowAsUserFacing);
|
|
1961
1950
|
clearTimeout(startTimer);
|
|
1962
1951
|
switch (transaction.status) {
|
|
@@ -2036,7 +2025,7 @@ var TransactionManager = class {
|
|
|
2036
2025
|
}
|
|
2037
2026
|
#startTransactionTimeout(transactionId, timeout) {
|
|
2038
2027
|
const timeoutStartedAt = Date.now();
|
|
2039
|
-
|
|
2028
|
+
const timer = setTimeout(async () => {
|
|
2040
2029
|
debug("Transaction timed out.", { transactionId, timeoutStartedAt, timeout });
|
|
2041
2030
|
const tx = this.transactions.get(transactionId);
|
|
2042
2031
|
if (tx && ["running", "waiting"].includes(tx.status)) {
|
|
@@ -2045,6 +2034,8 @@ var TransactionManager = class {
|
|
|
2045
2034
|
debug("Transaction already committed or rolled back when timeout happened.", transactionId);
|
|
2046
2035
|
}
|
|
2047
2036
|
}, timeout);
|
|
2037
|
+
timer.unref();
|
|
2038
|
+
return timer;
|
|
2048
2039
|
}
|
|
2049
2040
|
async #closeTransaction(tx, status) {
|
|
2050
2041
|
const createClosingPromise = async () => {
|
package/dist/index.mjs
CHANGED
|
@@ -1139,19 +1139,7 @@ import { ColumnTypeEnum } from "@prisma/driver-adapter-utils";
|
|
|
1139
1139
|
function serializeSql(resultSet) {
|
|
1140
1140
|
return resultSet.rows.map(
|
|
1141
1141
|
(row) => row.reduce((acc, value, index) => {
|
|
1142
|
-
|
|
1143
|
-
let nested = acc;
|
|
1144
|
-
for (let i = 0; i < splitByDot.length; i++) {
|
|
1145
|
-
const key = splitByDot[i];
|
|
1146
|
-
if (i === splitByDot.length - 1) {
|
|
1147
|
-
nested[key] = value;
|
|
1148
|
-
} else {
|
|
1149
|
-
if (nested[key] === void 0) {
|
|
1150
|
-
nested[key] = {};
|
|
1151
|
-
}
|
|
1152
|
-
nested = nested[key];
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1142
|
+
acc[resultSet.columnNames[index]] = value;
|
|
1155
1143
|
return acc;
|
|
1156
1144
|
}, {})
|
|
1157
1145
|
);
|
|
@@ -1907,6 +1895,7 @@ var TransactionManager = class {
|
|
|
1907
1895
|
this.transactions.set(transaction.id, transaction);
|
|
1908
1896
|
let hasTimedOut = false;
|
|
1909
1897
|
const startTimer = setTimeout(() => hasTimedOut = true, validatedOptions.maxWait);
|
|
1898
|
+
startTimer.unref();
|
|
1910
1899
|
transaction.transaction = await this.driverAdapter.startTransaction(validatedOptions.isolationLevel).catch(rethrowAsUserFacing);
|
|
1911
1900
|
clearTimeout(startTimer);
|
|
1912
1901
|
switch (transaction.status) {
|
|
@@ -1986,7 +1975,7 @@ var TransactionManager = class {
|
|
|
1986
1975
|
}
|
|
1987
1976
|
#startTransactionTimeout(transactionId, timeout) {
|
|
1988
1977
|
const timeoutStartedAt = Date.now();
|
|
1989
|
-
|
|
1978
|
+
const timer = setTimeout(async () => {
|
|
1990
1979
|
debug("Transaction timed out.", { transactionId, timeoutStartedAt, timeout });
|
|
1991
1980
|
const tx = this.transactions.get(transactionId);
|
|
1992
1981
|
if (tx && ["running", "waiting"].includes(tx.status)) {
|
|
@@ -1995,6 +1984,8 @@ var TransactionManager = class {
|
|
|
1995
1984
|
debug("Transaction already committed or rolled back when timeout happened.", transactionId);
|
|
1996
1985
|
}
|
|
1997
1986
|
}, timeout);
|
|
1987
|
+
timer.unref();
|
|
1988
|
+
return timer;
|
|
1998
1989
|
}
|
|
1999
1990
|
async #closeTransaction(tx, status) {
|
|
2000
1991
|
const createClosingPromise = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.16.0-dev.
|
|
3
|
+
"version": "6.16.0-dev.30",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"nanoid": "5.1.5",
|
|
32
32
|
"ulid": "3.0.0",
|
|
33
33
|
"uuid": "11.1.0",
|
|
34
|
-
"@prisma/debug": "6.16.0-dev.
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.16.0-dev.
|
|
34
|
+
"@prisma/debug": "6.16.0-dev.30",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.16.0-dev.30"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|