@prisma/query-plan-executor 7.2.0-integration-fix-sqlite-deadlock-fix.2 → 7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.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 +33 -41
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -97773,7 +97773,7 @@ __export(index_exports, {
|
|
|
97773
97773
|
module.exports = __toCommonJS(index_exports);
|
|
97774
97774
|
|
|
97775
97775
|
// package.json
|
|
97776
|
-
var version = "7.2.0-integration-
|
|
97776
|
+
var version = "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1";
|
|
97777
97777
|
|
|
97778
97778
|
// ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
|
|
97779
97779
|
function clampProp(e2, n2, t2, o2, r2) {
|
|
@@ -107859,14 +107859,16 @@ var TransactionManager = class {
|
|
|
107859
107859
|
const abortController = new AbortController();
|
|
107860
107860
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
107861
107861
|
startTimer?.unref?.();
|
|
107862
|
+
const startTransactionPromise = this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing);
|
|
107862
107863
|
transaction.transaction = await Promise.race([
|
|
107863
|
-
|
|
107864
|
+
startTransactionPromise.finally(() => clearTimeout(startTimer)),
|
|
107864
107865
|
once(abortController.signal, "abort").then(() => void 0)
|
|
107865
107866
|
]);
|
|
107866
107867
|
this.transactions.set(transaction.id, transaction);
|
|
107867
107868
|
switch (transaction.status) {
|
|
107868
107869
|
case "waiting":
|
|
107869
107870
|
if (abortController.signal.aborted) {
|
|
107871
|
+
void startTransactionPromise.then((tx) => tx.rollback()).catch((e2) => debug3("error in discarded transaction:", e2));
|
|
107870
107872
|
await this.#closeTransaction(transaction, "timed_out");
|
|
107871
107873
|
throw new TransactionStartTimeoutError();
|
|
107872
107874
|
}
|
|
@@ -109470,7 +109472,7 @@ var SpanProxy = class {
|
|
|
109470
109472
|
parentId,
|
|
109471
109473
|
attributes,
|
|
109472
109474
|
links,
|
|
109473
|
-
name: `prisma:
|
|
109475
|
+
name: `prisma:accelerate:${this.#name}`,
|
|
109474
109476
|
kind: serializeSpanKind(this.#kind),
|
|
109475
109477
|
startTime: this.#startTime,
|
|
109476
109478
|
endTime: instantToHrTime(endTime)
|
|
@@ -111895,59 +111897,49 @@ var App = class _App {
|
|
|
111895
111897
|
* @param transactionId - Transaction ID if running within a transaction
|
|
111896
111898
|
*/
|
|
111897
111899
|
async query(queryPlan, placeholderValues, comments, resourceLimits, transactionId) {
|
|
111898
|
-
|
|
111899
|
-
|
|
111900
|
-
|
|
111901
|
-
|
|
111902
|
-
|
|
111903
|
-
|
|
111904
|
-
|
|
111905
|
-
|
|
111906
|
-
|
|
111907
|
-
|
|
111908
|
-
|
|
111909
|
-
|
|
111910
|
-
|
|
111911
|
-
sqlCommenter
|
|
111912
|
-
});
|
|
111913
|
-
const result = await Promise.race([
|
|
111914
|
-
queryInterpreter.run(queryPlan, queryable),
|
|
111915
|
-
import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
|
|
111916
|
-
throw new ResourceLimitError("Query timeout exceeded");
|
|
111917
|
-
})
|
|
111918
|
-
]);
|
|
111919
|
-
return normalizeJsonProtocolValues(result);
|
|
111900
|
+
const queryable = transactionId !== null ? await this.#transactionManager.getTransaction({ id: transactionId }, "query") : this.#db;
|
|
111901
|
+
const sqlCommenter = comments && Object.keys(comments).length > 0 ? {
|
|
111902
|
+
plugins: [() => comments],
|
|
111903
|
+
// For pre-computed comments, we use a placeholder queryInfo since the actual
|
|
111904
|
+
// query info was already used on the client side to compute the comments
|
|
111905
|
+
queryInfo: { type: "single", action: "queryRaw", query: {} }
|
|
111906
|
+
} : void 0;
|
|
111907
|
+
const queryInterpreter = QueryInterpreter.forSql({
|
|
111908
|
+
placeholderValues,
|
|
111909
|
+
tracingHelper: this.#tracingHandler,
|
|
111910
|
+
transactionManager: transactionId === null ? { enabled: true, manager: this.#transactionManager } : { enabled: false },
|
|
111911
|
+
onQuery: logQuery,
|
|
111912
|
+
sqlCommenter
|
|
111920
111913
|
});
|
|
111914
|
+
const result = await Promise.race([
|
|
111915
|
+
queryInterpreter.run(queryPlan, queryable),
|
|
111916
|
+
import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
|
|
111917
|
+
throw new ResourceLimitError("Query timeout exceeded");
|
|
111918
|
+
})
|
|
111919
|
+
]);
|
|
111920
|
+
return normalizeJsonProtocolValues(result);
|
|
111921
111921
|
}
|
|
111922
111922
|
/**
|
|
111923
111923
|
* Starts a new transaction.
|
|
111924
111924
|
*/
|
|
111925
111925
|
async startTransaction(options, resourceLimits) {
|
|
111926
|
-
|
|
111927
|
-
|
|
111928
|
-
|
|
111929
|
-
|
|
111930
|
-
timeout
|
|
111931
|
-
});
|
|
111926
|
+
const timeout = Math.min(options.timeout ?? Infinity, resourceLimits.maxTransactionTimeout.total("milliseconds"));
|
|
111927
|
+
return this.#transactionManager.startTransaction({
|
|
111928
|
+
...options,
|
|
111929
|
+
timeout
|
|
111932
111930
|
});
|
|
111933
111931
|
}
|
|
111934
111932
|
/**
|
|
111935
111933
|
* Commits a transaction.
|
|
111936
111934
|
*/
|
|
111937
|
-
|
|
111938
|
-
return
|
|
111939
|
-
"commit_transaction",
|
|
111940
|
-
() => this.#transactionManager.commitTransaction(transactionId)
|
|
111941
|
-
);
|
|
111935
|
+
commitTransaction(transactionId) {
|
|
111936
|
+
return this.#transactionManager.commitTransaction(transactionId);
|
|
111942
111937
|
}
|
|
111943
111938
|
/**
|
|
111944
111939
|
* Rolls back a transaction.
|
|
111945
111940
|
*/
|
|
111946
|
-
|
|
111947
|
-
return
|
|
111948
|
-
"rollback_transaction",
|
|
111949
|
-
() => this.#transactionManager.rollbackTransaction(transactionId)
|
|
111950
|
-
);
|
|
111941
|
+
rollbackTransaction(transactionId) {
|
|
111942
|
+
return this.#transactionManager.rollbackTransaction(transactionId);
|
|
111951
111943
|
}
|
|
111952
111944
|
/**
|
|
111953
111945
|
* Retrieves connection information necessary for building the queries.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/query-plan-executor",
|
|
3
|
-
"version": "7.2.0-integration-
|
|
3
|
+
"version": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"temporal-polyfill": "0.3.0",
|
|
21
21
|
"vitest": "3.2.4",
|
|
22
22
|
"zod": "4.1.3",
|
|
23
|
-
"@prisma/adapter-pg": "7.2.0-integration-
|
|
24
|
-
"@prisma/adapter-
|
|
25
|
-
"@prisma/adapter-
|
|
26
|
-
"@prisma/client-engine-runtime": "7.2.0-integration-
|
|
27
|
-
"@prisma/
|
|
23
|
+
"@prisma/adapter-pg": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
24
|
+
"@prisma/adapter-mssql": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
25
|
+
"@prisma/driver-adapter-utils": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
26
|
+
"@prisma/client-engine-runtime": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
27
|
+
"@prisma/adapter-mariadb": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|