@prisma/query-plan-executor 7.2.0-dev.2 → 7.2.0-dev.20

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.
Files changed (2) hide show
  1. package/dist/index.js +121 -131
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -52566,9 +52566,9 @@ var require_safe_buffer = __commonJS({
52566
52566
  }
52567
52567
  });
52568
52568
 
52569
- // ../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/data-stream.js
52569
+ // ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js
52570
52570
  var require_data_stream = __commonJS({
52571
- "../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/data-stream.js"(exports2, module2) {
52571
+ "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports2, module2) {
52572
52572
  "use strict";
52573
52573
  var Buffer2 = require_safe_buffer().Buffer;
52574
52574
  var Stream = require("stream");
@@ -52615,40 +52615,6 @@ var require_data_stream = __commonJS({
52615
52615
  }
52616
52616
  });
52617
52617
 
52618
- // ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js
52619
- var require_buffer_equal_constant_time = __commonJS({
52620
- "../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports2, module2) {
52621
- "use strict";
52622
- var Buffer2 = require("buffer").Buffer;
52623
- var SlowBuffer = require("buffer").SlowBuffer;
52624
- module2.exports = bufferEq;
52625
- function bufferEq(a2, b2) {
52626
- if (!Buffer2.isBuffer(a2) || !Buffer2.isBuffer(b2)) {
52627
- return false;
52628
- }
52629
- if (a2.length !== b2.length) {
52630
- return false;
52631
- }
52632
- var c2 = 0;
52633
- for (var i2 = 0; i2 < a2.length; i2++) {
52634
- c2 |= a2[i2] ^ b2[i2];
52635
- }
52636
- return c2 === 0;
52637
- }
52638
- bufferEq.install = function() {
52639
- Buffer2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
52640
- return bufferEq(this, that);
52641
- };
52642
- };
52643
- var origBufEqual = Buffer2.prototype.equal;
52644
- var origSlowBufEqual = SlowBuffer.prototype.equal;
52645
- bufferEq.restore = function() {
52646
- Buffer2.prototype.equal = origBufEqual;
52647
- SlowBuffer.prototype.equal = origSlowBufEqual;
52648
- };
52649
- }
52650
- });
52651
-
52652
52618
  // ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
52653
52619
  var require_param_bytes_for_alg = __commonJS({
52654
52620
  "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js"(exports2, module2) {
@@ -52813,11 +52779,44 @@ var require_ecdsa_sig_formatter = __commonJS({
52813
52779
  }
52814
52780
  });
52815
52781
 
52816
- // ../../node_modules/.pnpm/jwa@1.4.1/node_modules/jwa/index.js
52782
+ // ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js
52783
+ var require_buffer_equal_constant_time = __commonJS({
52784
+ "../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports2, module2) {
52785
+ "use strict";
52786
+ var Buffer2 = require("buffer").Buffer;
52787
+ var SlowBuffer = require("buffer").SlowBuffer;
52788
+ module2.exports = bufferEq;
52789
+ function bufferEq(a2, b2) {
52790
+ if (!Buffer2.isBuffer(a2) || !Buffer2.isBuffer(b2)) {
52791
+ return false;
52792
+ }
52793
+ if (a2.length !== b2.length) {
52794
+ return false;
52795
+ }
52796
+ var c2 = 0;
52797
+ for (var i2 = 0; i2 < a2.length; i2++) {
52798
+ c2 |= a2[i2] ^ b2[i2];
52799
+ }
52800
+ return c2 === 0;
52801
+ }
52802
+ bufferEq.install = function() {
52803
+ Buffer2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
52804
+ return bufferEq(this, that);
52805
+ };
52806
+ };
52807
+ var origBufEqual = Buffer2.prototype.equal;
52808
+ var origSlowBufEqual = SlowBuffer.prototype.equal;
52809
+ bufferEq.restore = function() {
52810
+ Buffer2.prototype.equal = origBufEqual;
52811
+ SlowBuffer.prototype.equal = origSlowBufEqual;
52812
+ };
52813
+ }
52814
+ });
52815
+
52816
+ // ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js
52817
52817
  var require_jwa = __commonJS({
52818
- "../../node_modules/.pnpm/jwa@1.4.1/node_modules/jwa/index.js"(exports2, module2) {
52818
+ "../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module2) {
52819
52819
  "use strict";
52820
- var bufferEqual = require_buffer_equal_constant_time();
52821
52820
  var Buffer2 = require_safe_buffer().Buffer;
52822
52821
  var crypto7 = require("crypto");
52823
52822
  var formatEcdsa = require_ecdsa_sig_formatter();
@@ -52921,10 +52920,22 @@ var require_jwa = __commonJS({
52921
52920
  return fromBase64(sig);
52922
52921
  };
52923
52922
  }
52923
+ var bufferEqual;
52924
+ var timingSafeEqual = "timingSafeEqual" in crypto7 ? function timingSafeEqual2(a2, b2) {
52925
+ if (a2.byteLength !== b2.byteLength) {
52926
+ return false;
52927
+ }
52928
+ return crypto7.timingSafeEqual(a2, b2);
52929
+ } : function timingSafeEqual2(a2, b2) {
52930
+ if (!bufferEqual) {
52931
+ bufferEqual = require_buffer_equal_constant_time();
52932
+ }
52933
+ return bufferEqual(a2, b2);
52934
+ };
52924
52935
  function createHmacVerifier(bits) {
52925
52936
  return function verify(thing, signature, secret2) {
52926
52937
  var computedSig = createHmacSigner(bits)(thing, secret2);
52927
- return bufferEqual(Buffer2.from(signature), Buffer2.from(computedSig));
52938
+ return timingSafeEqual(Buffer2.from(signature), Buffer2.from(computedSig));
52928
52939
  };
52929
52940
  }
52930
52941
  function createKeySigner(bits) {
@@ -53014,7 +53025,7 @@ var require_jwa = __commonJS({
53014
53025
  es: createECDSAVerifer,
53015
53026
  none: createNoneVerifier
53016
53027
  };
53017
- var match2 = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);
53028
+ var match2 = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
53018
53029
  if (!match2)
53019
53030
  throw typeError(MSG_INVALID_ALGORITHM, algorithm);
53020
53031
  var algo = (match2[1] || match2[3]).toLowerCase();
@@ -53027,9 +53038,9 @@ var require_jwa = __commonJS({
53027
53038
  }
53028
53039
  });
53029
53040
 
53030
- // ../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/tostring.js
53041
+ // ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js
53031
53042
  var require_tostring = __commonJS({
53032
- "../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/tostring.js"(exports2, module2) {
53043
+ "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js"(exports2, module2) {
53033
53044
  "use strict";
53034
53045
  var Buffer2 = require("buffer").Buffer;
53035
53046
  module2.exports = function toString2(obj) {
@@ -53042,9 +53053,9 @@ var require_tostring = __commonJS({
53042
53053
  }
53043
53054
  });
53044
53055
 
53045
- // ../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/sign-stream.js
53056
+ // ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js
53046
53057
  var require_sign_stream = __commonJS({
53047
- "../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/sign-stream.js"(exports2, module2) {
53058
+ "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js"(exports2, module2) {
53048
53059
  "use strict";
53049
53060
  var Buffer2 = require_safe_buffer().Buffer;
53050
53061
  var DataStream = require_data_stream();
@@ -53072,7 +53083,12 @@ var require_sign_stream = __commonJS({
53072
53083
  return util2.format("%s.%s", securedInput, signature);
53073
53084
  }
53074
53085
  function SignStream(opts) {
53075
- var secret2 = opts.secret || opts.privateKey || opts.key;
53086
+ var secret2 = opts.secret;
53087
+ secret2 = secret2 == null ? opts.privateKey : secret2;
53088
+ secret2 = secret2 == null ? opts.key : secret2;
53089
+ if (/^hs/i.test(opts.header.alg) === true && secret2 == null) {
53090
+ throw new TypeError("secret must be a string or buffer or a KeyObject");
53091
+ }
53076
53092
  var secretStream = new DataStream(secret2);
53077
53093
  this.readable = true;
53078
53094
  this.header = opts.header;
@@ -53113,9 +53129,9 @@ var require_sign_stream = __commonJS({
53113
53129
  }
53114
53130
  });
53115
53131
 
53116
- // ../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/verify-stream.js
53132
+ // ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js
53117
53133
  var require_verify_stream = __commonJS({
53118
- "../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/lib/verify-stream.js"(exports2, module2) {
53134
+ "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js"(exports2, module2) {
53119
53135
  "use strict";
53120
53136
  var Buffer2 = require_safe_buffer().Buffer;
53121
53137
  var DataStream = require_data_stream();
@@ -53185,7 +53201,12 @@ var require_verify_stream = __commonJS({
53185
53201
  }
53186
53202
  function VerifyStream(opts) {
53187
53203
  opts = opts || {};
53188
- var secretOrKey = opts.secret || opts.publicKey || opts.key;
53204
+ var secretOrKey = opts.secret;
53205
+ secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
53206
+ secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
53207
+ if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) {
53208
+ throw new TypeError("secret must be a string or buffer or a KeyObject");
53209
+ }
53189
53210
  var secretStream = new DataStream(secretOrKey);
53190
53211
  this.readable = true;
53191
53212
  this.algorithm = opts.algorithm;
@@ -53224,9 +53245,9 @@ var require_verify_stream = __commonJS({
53224
53245
  }
53225
53246
  });
53226
53247
 
53227
- // ../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/index.js
53248
+ // ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js
53228
53249
  var require_jws = __commonJS({
53229
- "../../node_modules/.pnpm/jws@3.2.2/node_modules/jws/index.js"(exports2) {
53250
+ "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js"(exports2) {
53230
53251
  "use strict";
53231
53252
  var SignStream = require_sign_stream();
53232
53253
  var VerifyStream = require_verify_stream();
@@ -97752,7 +97773,7 @@ __export(index_exports, {
97752
97773
  module.exports = __toCommonJS(index_exports);
97753
97774
 
97754
97775
  // package.json
97755
- var version = "7.2.0-dev.2";
97776
+ var version = "7.2.0-dev.20";
97756
97777
 
97757
97778
  // ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
97758
97779
  function clampProp(e2, n2, t2, o2, r2) {
@@ -106195,6 +106216,8 @@ function getErrorCode(err) {
106195
106216
  return "P2002";
106196
106217
  case "ForeignKeyConstraintViolation":
106197
106218
  return "P2003";
106219
+ case "InvalidInputValue":
106220
+ return "P2007";
106198
106221
  case "UnsupportedNativeDataType":
106199
106222
  return "P2010";
106200
106223
  case "NullConstraintViolation":
@@ -106291,6 +106314,8 @@ function renderErrorMessage(err) {
106291
106314
  return `Error in external connector (id ${err.cause.id})`;
106292
106315
  case "TooManyConnections":
106293
106316
  return `Too many database connections opened: ${err.cause.cause}`;
106317
+ case "InvalidInputValue":
106318
+ return `Invalid input value: ${err.cause.message}`;
106294
106319
  case "sqlite":
106295
106320
  case "postgres":
106296
106321
  case "mysql":
@@ -106310,8 +106335,11 @@ function renderConstraint(constraint) {
106310
106335
  }
106311
106336
  return "(not available)";
106312
106337
  }
106313
- var DataMapperError = class extends Error {
106338
+ var DataMapperError = class extends UserFacingError {
106314
106339
  name = "DataMapperError";
106340
+ constructor(message, options) {
106341
+ super(message, "P2023", options);
106342
+ }
106315
106343
  };
106316
106344
  function applyDataMap(data, structure, enums) {
106317
106345
  switch (structure.type) {
@@ -106462,7 +106490,7 @@ function mapValue(value, columnName, scalarType, enums) {
106462
106490
  throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
106463
106491
  }
106464
106492
  }
106465
- if (Array.isArray(value)) {
106493
+ if (Array.isArray(value) || value instanceof Uint8Array) {
106466
106494
  for (const byte of value) {
106467
106495
  if (byte !== 0) return true;
106468
106496
  }
@@ -107133,17 +107161,6 @@ function serializeRawValue(value, type2) {
107133
107161
  throw new Error(`Cannot serialize value of type ${typeof value} as JsonArray`);
107134
107162
  }
107135
107163
  return value.map((v2) => serializeRawValue(v2, ColumnTypeEnum.Json));
107136
- case ColumnTypeEnum.Bytes:
107137
- if (Array.isArray(value)) {
107138
- return new Uint8Array(value);
107139
- } else {
107140
- throw new Error(`Cannot serialize value of type ${typeof value} as Bytes`);
107141
- }
107142
- case ColumnTypeEnum.BytesArray:
107143
- if (!Array.isArray(value)) {
107144
- throw new Error(`Cannot serialize value of type ${typeof value} as BytesArray`);
107145
- }
107146
- return value.map((v2) => serializeRawValue(v2, ColumnTypeEnum.Bytes));
107147
107164
  case ColumnTypeEnum.Boolean:
107148
107165
  switch (typeof value) {
107149
107166
  case "boolean":
@@ -109444,7 +109461,7 @@ var SpanProxy = class {
109444
109461
  parentId,
109445
109462
  attributes,
109446
109463
  links,
109447
- name: `prisma:engine:${this.#name}`,
109464
+ name: `prisma:accelerate:${this.#name}`,
109448
109465
  kind: serializeSpanKind(this.#kind),
109449
109466
  startTime: this.#startTime,
109450
109467
  endTime: instantToHrTime(endTime)
@@ -109695,9 +109712,6 @@ function mapArg(arg, argType) {
109695
109712
  if (typeof arg === "string" && argType.scalarType === "bytes") {
109696
109713
  return Buffer.from(arg, "base64");
109697
109714
  }
109698
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
109699
- return Buffer.from(arg);
109700
- }
109701
109715
  if (ArrayBuffer.isView(arg)) {
109702
109716
  return Buffer.from(arg.buffer, arg.byteOffset, arg.byteLength);
109703
109717
  }
@@ -109716,9 +109730,6 @@ function mapRow(row, fields) {
109716
109730
  case "DATETIME2":
109717
109731
  return (/* @__PURE__ */ new Date(`${value}Z`)).toISOString().replace(/(\.000)?Z$/, "+00:00");
109718
109732
  }
109719
- if (Buffer.isBuffer(value)) {
109720
- return Array.from(value);
109721
- }
109722
109733
  if (typeof value === "bigint") {
109723
109734
  return value.toString();
109724
109735
  }
@@ -109860,7 +109871,8 @@ function mapDriverError(error44) {
109860
109871
  kind: "mysql",
109861
109872
  code: error44.errno,
109862
109873
  message: error44.sqlMessage ?? "N/A",
109863
- state: error44.sqlState ?? "N/A"
109874
+ state: error44.sqlState ?? "N/A",
109875
+ cause: error44.cause?.message ?? void 0
109864
109876
  };
109865
109877
  }
109866
109878
  }
@@ -110599,9 +110611,6 @@ function mapArg2(arg, argType) {
110599
110611
  if (typeof arg === "string" && argType.scalarType === "bytes") {
110600
110612
  return Buffer.from(arg, "base64");
110601
110613
  }
110602
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
110603
- return Buffer.from(arg);
110604
- }
110605
110614
  if (ArrayBuffer.isView(arg)) {
110606
110615
  return Buffer.from(arg.buffer, arg.byteOffset, arg.byteLength);
110607
110616
  }
@@ -110625,9 +110634,6 @@ function mapRow2(row, columns) {
110625
110634
  }
110626
110635
  return value;
110627
110636
  }
110628
- if (Buffer.isBuffer(value)) {
110629
- return Array.from(value);
110630
- }
110631
110637
  if (typeof value === "string" && type2 === import_mssql3.default.UniqueIdentifier) {
110632
110638
  return value.toLowerCase();
110633
110639
  }
@@ -111272,18 +111278,10 @@ function normalize_xml(xml) {
111272
111278
  function toJson(json2) {
111273
111279
  return json2;
111274
111280
  }
111275
- function encodeBuffer(buffer) {
111276
- return Array.from(new Uint8Array(buffer));
111277
- }
111278
111281
  var parsePgBytes = getTypeParser(ScalarColumnType.BYTEA);
111279
- var parseBytesArray = getTypeParser(ArrayColumnType.BYTEA_ARRAY);
111280
- function normalizeByteaArray(serializedBytesArray) {
111281
- const buffers = parseBytesArray(serializedBytesArray);
111282
- return buffers.map((buf) => buf ? encodeBuffer(buf) : null);
111283
- }
111282
+ var normalizeByteaArray = getTypeParser(ArrayColumnType.BYTEA_ARRAY);
111284
111283
  function convertBytes(serializedBytes) {
111285
- const buffer = parsePgBytes(serializedBytes);
111286
- return encodeBuffer(buffer);
111284
+ return parsePgBytes(serializedBytes);
111287
111285
  }
111288
111286
  function normalizeBit(bit) {
111289
111287
  return bit;
@@ -111336,11 +111334,8 @@ function mapArg3(arg, argType) {
111336
111334
  if (typeof arg === "string" && argType.scalarType === "bytes") {
111337
111335
  return Buffer.from(arg, "base64");
111338
111336
  }
111339
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
111340
- return Buffer.from(arg);
111341
- }
111342
111337
  if (ArrayBuffer.isView(arg)) {
111343
- return Buffer.from(arg.buffer, arg.byteOffset, arg.byteLength);
111338
+ return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);
111344
111339
  }
111345
111340
  return arg;
111346
111341
  }
@@ -111420,6 +111415,11 @@ function mapDriverError3(error44) {
111420
111415
  kind: "ValueOutOfRange",
111421
111416
  cause: error44.message
111422
111417
  };
111418
+ case "22P02":
111419
+ return {
111420
+ kind: "InvalidInputValue",
111421
+ message: error44.message
111422
+ };
111423
111423
  case "23505": {
111424
111424
  const fields = error44.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
111425
111425
  return {
@@ -111864,59 +111864,49 @@ var App = class _App {
111864
111864
  * @param transactionId - Transaction ID if running within a transaction
111865
111865
  */
111866
111866
  async query(queryPlan, placeholderValues, comments, resourceLimits, transactionId) {
111867
- return await this.#tracingHandler.runInChildSpan("query", async () => {
111868
- const queryable = transactionId !== null ? await this.#transactionManager.getTransaction({ id: transactionId }, "query") : this.#db;
111869
- const sqlCommenter = comments && Object.keys(comments).length > 0 ? {
111870
- plugins: [() => comments],
111871
- // For pre-computed comments, we use a placeholder queryInfo since the actual
111872
- // query info was already used on the client side to compute the comments
111873
- queryInfo: { type: "single", action: "queryRaw", query: {} }
111874
- } : void 0;
111875
- const queryInterpreter = QueryInterpreter.forSql({
111876
- placeholderValues,
111877
- tracingHelper: this.#tracingHandler,
111878
- transactionManager: transactionId === null ? { enabled: true, manager: this.#transactionManager } : { enabled: false },
111879
- onQuery: logQuery,
111880
- sqlCommenter
111881
- });
111882
- const result = await Promise.race([
111883
- queryInterpreter.run(queryPlan, queryable),
111884
- import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
111885
- throw new ResourceLimitError("Query timeout exceeded");
111886
- })
111887
- ]);
111888
- return normalizeJsonProtocolValues(result);
111867
+ const queryable = transactionId !== null ? await this.#transactionManager.getTransaction({ id: transactionId }, "query") : this.#db;
111868
+ const sqlCommenter = comments && Object.keys(comments).length > 0 ? {
111869
+ plugins: [() => comments],
111870
+ // For pre-computed comments, we use a placeholder queryInfo since the actual
111871
+ // query info was already used on the client side to compute the comments
111872
+ queryInfo: { type: "single", action: "queryRaw", query: {} }
111873
+ } : void 0;
111874
+ const queryInterpreter = QueryInterpreter.forSql({
111875
+ placeholderValues,
111876
+ tracingHelper: this.#tracingHandler,
111877
+ transactionManager: transactionId === null ? { enabled: true, manager: this.#transactionManager } : { enabled: false },
111878
+ onQuery: logQuery,
111879
+ sqlCommenter
111889
111880
  });
111881
+ const result = await Promise.race([
111882
+ queryInterpreter.run(queryPlan, queryable),
111883
+ import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
111884
+ throw new ResourceLimitError("Query timeout exceeded");
111885
+ })
111886
+ ]);
111887
+ return normalizeJsonProtocolValues(result);
111890
111888
  }
111891
111889
  /**
111892
111890
  * Starts a new transaction.
111893
111891
  */
111894
111892
  async startTransaction(options, resourceLimits) {
111895
- return await this.#tracingHandler.runInChildSpan("start_transaction", () => {
111896
- const timeout = Math.min(options.timeout ?? Infinity, resourceLimits.maxTransactionTimeout.total("milliseconds"));
111897
- return this.#transactionManager.startTransaction({
111898
- ...options,
111899
- timeout
111900
- });
111893
+ const timeout = Math.min(options.timeout ?? Infinity, resourceLimits.maxTransactionTimeout.total("milliseconds"));
111894
+ return this.#transactionManager.startTransaction({
111895
+ ...options,
111896
+ timeout
111901
111897
  });
111902
111898
  }
111903
111899
  /**
111904
111900
  * Commits a transaction.
111905
111901
  */
111906
- async commitTransaction(transactionId) {
111907
- return await this.#tracingHandler.runInChildSpan(
111908
- "commit_transaction",
111909
- () => this.#transactionManager.commitTransaction(transactionId)
111910
- );
111902
+ commitTransaction(transactionId) {
111903
+ return this.#transactionManager.commitTransaction(transactionId);
111911
111904
  }
111912
111905
  /**
111913
111906
  * Rolls back a transaction.
111914
111907
  */
111915
- async rollbackTransaction(transactionId) {
111916
- return await this.#tracingHandler.runInChildSpan(
111917
- "rollback_transaction",
111918
- () => this.#transactionManager.rollbackTransaction(transactionId)
111919
- );
111908
+ rollbackTransaction(transactionId) {
111909
+ return this.#transactionManager.rollbackTransaction(transactionId);
111920
111910
  }
111921
111911
  /**
111922
111912
  * 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-dev.2",
3
+ "version": "7.2.0-dev.20",
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-mariadb": "7.2.0-dev.2",
24
- "@prisma/adapter-pg": "7.2.0-dev.2",
25
- "@prisma/adapter-mssql": "7.2.0-dev.2",
26
- "@prisma/client-engine-runtime": "7.2.0-dev.2",
27
- "@prisma/driver-adapter-utils": "7.2.0-dev.2"
23
+ "@prisma/adapter-pg": "7.2.0-dev.20",
24
+ "@prisma/adapter-mariadb": "7.2.0-dev.20",
25
+ "@prisma/adapter-mssql": "7.2.0-dev.20",
26
+ "@prisma/client-engine-runtime": "7.2.0-dev.20",
27
+ "@prisma/driver-adapter-utils": "7.2.0-dev.20"
28
28
  },
29
29
  "files": [
30
30
  "dist"