@prisma/client-engine-runtime 6.11.0-dev.9 → 6.11.0-integration-fix-generator-ts-pre-preview.1
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 +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -230,6 +230,12 @@ function mapValue(value, columnName, resultType, enums) {
|
|
|
230
230
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
+
if (value instanceof Uint8Array) {
|
|
234
|
+
for (const byte of value) {
|
|
235
|
+
if (byte !== 0) return true;
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
233
239
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
234
240
|
}
|
|
235
241
|
case "Decimal":
|
|
@@ -1435,17 +1441,16 @@ var TransactionManager = class {
|
|
|
1435
1441
|
transaction: void 0
|
|
1436
1442
|
};
|
|
1437
1443
|
this.transactions.set(transaction.id, transaction);
|
|
1438
|
-
|
|
1439
|
-
|
|
1444
|
+
const startTimer = setTimeout(() => transaction.status = "timed_out", validatedOptions.maxWait);
|
|
1445
|
+
transaction.transaction = await this.driverAdapter.startTransaction(validatedOptions.isolationLevel);
|
|
1446
|
+
clearTimeout(startTimer);
|
|
1440
1447
|
switch (transaction.status) {
|
|
1441
1448
|
case "waiting":
|
|
1442
|
-
transaction.transaction = startedTransaction;
|
|
1443
|
-
clearTimeout(transaction.timer);
|
|
1444
|
-
transaction.timer = void 0;
|
|
1445
1449
|
transaction.status = "running";
|
|
1446
1450
|
transaction.timer = this.startTransactionTimeout(transaction.id, validatedOptions.timeout);
|
|
1447
1451
|
return { id: transaction.id };
|
|
1448
1452
|
case "timed_out":
|
|
1453
|
+
await this.closeTransaction(transaction, "timed_out");
|
|
1449
1454
|
throw new TransactionStartTimeoutError();
|
|
1450
1455
|
case "running":
|
|
1451
1456
|
case "committed":
|
package/dist/index.mjs
CHANGED
|
@@ -182,6 +182,12 @@ function mapValue(value, columnName, resultType, enums) {
|
|
|
182
182
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
+
if (value instanceof Uint8Array) {
|
|
186
|
+
for (const byte of value) {
|
|
187
|
+
if (byte !== 0) return true;
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
185
191
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
186
192
|
}
|
|
187
193
|
case "Decimal":
|
|
@@ -1387,17 +1393,16 @@ var TransactionManager = class {
|
|
|
1387
1393
|
transaction: void 0
|
|
1388
1394
|
};
|
|
1389
1395
|
this.transactions.set(transaction.id, transaction);
|
|
1390
|
-
|
|
1391
|
-
|
|
1396
|
+
const startTimer = setTimeout(() => transaction.status = "timed_out", validatedOptions.maxWait);
|
|
1397
|
+
transaction.transaction = await this.driverAdapter.startTransaction(validatedOptions.isolationLevel);
|
|
1398
|
+
clearTimeout(startTimer);
|
|
1392
1399
|
switch (transaction.status) {
|
|
1393
1400
|
case "waiting":
|
|
1394
|
-
transaction.transaction = startedTransaction;
|
|
1395
|
-
clearTimeout(transaction.timer);
|
|
1396
|
-
transaction.timer = void 0;
|
|
1397
1401
|
transaction.status = "running";
|
|
1398
1402
|
transaction.timer = this.startTransactionTimeout(transaction.id, validatedOptions.timeout);
|
|
1399
1403
|
return { id: transaction.id };
|
|
1400
1404
|
case "timed_out":
|
|
1405
|
+
await this.closeTransaction(transaction, "timed_out");
|
|
1401
1406
|
throw new TransactionStartTimeoutError();
|
|
1402
1407
|
case "running":
|
|
1403
1408
|
case "committed":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.11.0-
|
|
3
|
+
"version": "6.11.0-integration-fix-generator-ts-pre-preview.1",
|
|
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.11.0-
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.11.0-
|
|
34
|
+
"@prisma/debug": "6.11.0-integration-fix-generator-ts-pre-preview.1",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.11.0-integration-fix-generator-ts-pre-preview.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|