@prisma/orm-family-sql 8.0.0-rc.24-dev.39 → 8.0.0-rc.24-dev.41
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/{aggregate-descriptor-registry-oSsBuRHQ.mjs → aggregate-descriptor-registry-CRgsKIJY.mjs} +2 -2
- package/dist/{aggregate-descriptor-registry-oSsBuRHQ.mjs.map → aggregate-descriptor-registry-CRgsKIJY.mjs.map} +1 -1
- package/dist/{ast-BpFfUmb_.mjs → ast-B1GOjYn-.mjs} +2 -2
- package/dist/ast-B1GOjYn-.mjs.map +1 -0
- package/dist/{ast-DvD53wSW.d.mts → ast-DZnTuPWA.d.mts} +3 -3
- package/dist/{ast-DvD53wSW.d.mts.map → ast-DZnTuPWA.d.mts.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +7 -7
- package/dist/builder__runtime.mjs +39 -23
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +5 -5
- package/dist/{codec-descriptor-registry-UiFDvDj4.mjs → codec-descriptor-registry-CQ9M2B3L.mjs} +4 -2
- package/dist/codec-descriptor-registry-CQ9M2B3L.mjs.map +1 -0
- package/dist/collection-methods-CO0bz9PJ.d.mts +1 -0
- package/dist/{collection-methods-As4pXm7B-3xgTSoyU.d.mts → collection-methods-HlRizYfF-DKdq47dN.d.mts} +3 -3
- package/dist/{collection-methods-As4pXm7B-3xgTSoyU.d.mts.map → collection-methods-HlRizYfF-DKdq47dN.d.mts.map} +1 -1
- package/dist/{config-types-CFByuvww.mjs → config-types-tSsDtIC-.mjs} +2 -2
- package/dist/{config-types-CFByuvww.mjs.map → config-types-tSsDtIC-.mjs.map} +1 -1
- package/dist/{contract-builder-DIb0oV8O.mjs → contract-builder-piV2RUop.mjs} +3 -3
- package/dist/{contract-builder-DIb0oV8O.mjs.map → contract-builder-piV2RUop.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +5 -5
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/contract__validators.mjs +1 -1
- package/dist/{control-BdGTPj7m.mjs → control-Cxrfn6YO.mjs} +28 -16
- package/dist/control-Cxrfn6YO.mjs.map +1 -0
- package/dist/{control-BwL5tCj4.d.mts → control-DaBIvroP.d.mts} +6 -6
- package/dist/{control-BwL5tCj4.d.mts.map → control-DaBIvroP.d.mts.map} +1 -1
- package/dist/{control-adapter-0z3ce44U-BQ26ercw.d.mts → control-adapter-0z3ce44U-OE4VID0O.d.mts} +4 -4
- package/dist/{control-adapter-0z3ce44U-BQ26ercw.d.mts.map → control-adapter-0z3ce44U-OE4VID0O.d.mts.map} +1 -1
- package/dist/{control-adapter-DRLco_j0.d.mts → control-adapter-CC_Vys2q.d.mts} +2 -2
- package/dist/{control-adapter-DRLco_j0.d.mts.map → control-adapter-CC_Vys2q.d.mts.map} +1 -1
- package/dist/{db-by-MuHF2-B7uz_0VW.d.mts → db-by-MuHF2-Dz4IwRsO.d.mts} +10 -10
- package/dist/{db-by-MuHF2-B7uz_0VW.d.mts.map → db-by-MuHF2-Dz4IwRsO.d.mts.map} +1 -1
- package/dist/{ddl-types-D93zTpm9-DhSkpX0K.d.mts → ddl-types-BpNk9lrL-5rXDLalb.d.mts} +3 -3
- package/dist/{ddl-types-D93zTpm9-DhSkpX0K.d.mts.map → ddl-types-BpNk9lrL-5rXDLalb.d.mts.map} +1 -1
- package/dist/{derived-checks-9Ku2scaj-0iT0uU_6.mjs → derived-checks-9Ku2scaj-BkBpXofB.mjs} +2 -2
- package/dist/{derived-checks-9Ku2scaj-0iT0uU_6.mjs.map → derived-checks-9Ku2scaj-BkBpXofB.mjs.map} +1 -1
- package/dist/{diff-DZHlisyY.d.mts → diff-ox1r2eqR.d.mts} +2 -2
- package/dist/{diff-DZHlisyY.d.mts.map → diff-ox1r2eqR.d.mts.map} +1 -1
- package/dist/{exports-BLvDBaFs-DZPo5Hei.mjs → exports-D4xgPPzV-BWjldMmf.mjs} +33 -39
- package/dist/exports-D4xgPPzV-BWjldMmf.mjs.map +1 -0
- package/dist/{expression-DYRYmkMl-BMKxN8Wf.d.mts → expression-CbgzZLXY-Bzqi0ZTM.d.mts} +4 -4
- package/dist/{expression-DYRYmkMl-BMKxN8Wf.d.mts.map → expression-CbgzZLXY-Bzqi0ZTM.d.mts.map} +1 -1
- package/dist/expression-DBDD1QR1.d.mts +2 -0
- package/dist/{expression-VJWwxbUB-BtNDaTCt.d.mts → expression-DKXV5hFJ-4ZqJOTJH.d.mts} +4 -4
- package/dist/expression-DKXV5hFJ-4ZqJOTJH.d.mts.map +1 -0
- package/dist/{expression-impl-C5Ha-fXs-CxXn8gDo.mjs → expression-impl-D9Le3c2y-MF0Fctq9.mjs} +3 -3
- package/dist/{expression-impl-C5Ha-fXs-CxXn8gDo.mjs.map → expression-impl-D9Le3c2y-MF0Fctq9.mjs.map} +1 -1
- package/dist/family.d.mts +6 -6
- package/dist/family.mjs +4 -4
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +2 -2
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/{functions-DGketpiK.mjs → functions-BV4CyVZ0.mjs} +3 -3
- package/dist/{functions-DGketpiK.mjs.map → functions-BV4CyVZ0.mjs.map} +1 -1
- package/dist/functions-CF7EOqOH.d.mts +1 -0
- package/dist/{generator-functions-Bze9nVHL-BK4YIqLK.mjs → generator-functions-Bze9nVHL-EURgrMFd.mjs} +3 -3
- package/dist/{generator-functions-Bze9nVHL-BK4YIqLK.mjs.map → generator-functions-Bze9nVHL-EURgrMFd.mjs.map} +1 -1
- package/dist/{index-CI6diFcZ.d.mts → index-Dlup-3Az.d.mts} +30 -32
- package/dist/index-Dlup-3Az.d.mts.map +1 -0
- package/dist/index-reference-j3KdvbVm.d.mts +1 -0
- package/dist/{index-reference-CjvRzUh1-CG0Ouv6i.d.mts → index-reference-kUL7aEBI-DYcs4N7J.d.mts} +3 -3
- package/dist/{index-reference-CjvRzUh1-CG0Ouv6i.d.mts.map → index-reference-kUL7aEBI-DYcs4N7J.d.mts.map} +1 -1
- package/dist/{interpreter-DoQwVOyS-jsuDJlaX.mjs → interpreter-CMHH_zlH-BOZVPx6S.mjs} +10 -10
- package/dist/interpreter-CMHH_zlH-BOZVPx6S.mjs.map +1 -0
- package/dist/{middleware-DzFPUERE-C6RrGmcp.d.mts → middleware-BZYekCO2-DeY82fwI.d.mts} +3 -3
- package/dist/{middleware-DzFPUERE-C6RrGmcp.d.mts.map → middleware-BZYekCO2-DeY82fwI.d.mts.map} +1 -1
- package/dist/middleware-Q-P3nMQA.d.mts +1 -0
- package/dist/{migration-BUWF9_Tx.d.mts → migration-aQa4CVb-.d.mts} +2 -2
- package/dist/{migration-BUWF9_Tx.d.mts.map → migration-aQa4CVb-.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +17 -17
- package/dist/orm-client.mjs +21 -18
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{plan-Dv6v5_y4-CGWEjfCv.d.mts → plan-Dd6M8olW-Dynb9vKp.d.mts} +3 -3
- package/dist/{plan-Dv6v5_y4-CGWEjfCv.d.mts.map → plan-Dd6M8olW-Dynb9vKp.d.mts.map} +1 -1
- package/dist/plan-G5_dBmgg.d.mts +2 -0
- package/dist/{psl-field-resolution-CpxUePg1-DIrhHYx0.mjs → psl-field-resolution-CpxUePg1-CTitB6W5.mjs} +3 -3
- package/dist/{psl-field-resolution-CpxUePg1-DIrhHYx0.mjs.map → psl-field-resolution-CpxUePg1-CTitB6W5.mjs.map} +1 -1
- package/dist/{query-lane-context-BetHj4j--D3S5nucp.d.mts → query-lane-context-D4U6ox8I-CGLC-1HK.d.mts} +5 -5
- package/dist/{query-lane-context-BetHj4j--D3S5nucp.d.mts.map → query-lane-context-D4U6ox8I-CGLC-1HK.d.mts.map} +1 -1
- package/dist/query-lane-context-TQxP0UjW.d.mts +1 -0
- package/dist/relational-core.d.mts +13 -13
- package/dist/relational-core.mjs +4 -4
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +2 -2
- package/dist/relational-core__contract-free.mjs +13 -4
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__functions.d.mts +2 -2
- package/dist/relational-core__functions.mjs +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs → sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs} +2 -2
- package/dist/{sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs.map → sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs.map} +1 -1
- package/dist/{sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts → sql-execution-plan-BKmtONvF-bBXCQ0s1.d.mts} +3 -3
- package/dist/sql-execution-plan-BKmtONvF-bBXCQ0s1.d.mts.map +1 -0
- package/dist/{transaction-state-B4FVsvO7-DpvKYHSB.d.mts → transaction-state-B4FVsvO7-C0kgrpwC.d.mts} +9 -9
- package/dist/{transaction-state-B4FVsvO7-DpvKYHSB.d.mts.map → transaction-state-B4FVsvO7-C0kgrpwC.d.mts.map} +1 -1
- package/dist/{types-DEbNJhyS-CY7Ye2vN.d.mts → types-BseDMzbO-jM1a1F4N.d.mts} +5 -3
- package/dist/{types-DEbNJhyS-CY7Ye2vN.d.mts.map → types-BseDMzbO-jM1a1F4N.d.mts.map} +1 -1
- package/dist/{types-DzQmUrUm-ColHE4Av.mjs → types-BtItVHx6-BEDme1ZL.mjs} +15 -14
- package/dist/types-BtItVHx6-BEDme1ZL.mjs.map +1 -0
- package/dist/{types-CGr02DOy-CQsUdKCe.d.mts → types-CMSRIhJK-D0oiijer.d.mts} +6 -6
- package/dist/{types-CGr02DOy-CQsUdKCe.d.mts.map → types-CMSRIhJK-D0oiijer.d.mts.map} +1 -1
- package/dist/{types-CWvmfrfd-HPIh55bi.d.mts → types-CWvmfrfd-u6aEmYg4.d.mts} +2 -2
- package/dist/{types-CWvmfrfd-HPIh55bi.d.mts.map → types-CWvmfrfd-u6aEmYg4.d.mts.map} +1 -1
- package/dist/types-ClvFL9_q.d.mts +1 -0
- package/dist/{validators-CcR6gGf_.mjs → validators-_FcNfyor.mjs} +8 -5
- package/dist/validators-_FcNfyor.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/ast-BpFfUmb_.mjs.map +0 -1
- package/dist/codec-descriptor-registry-UiFDvDj4.mjs.map +0 -1
- package/dist/collection-methods-CS1e16Ij.d.mts +0 -1
- package/dist/control-BdGTPj7m.mjs.map +0 -1
- package/dist/exports-BLvDBaFs-DZPo5Hei.mjs.map +0 -1
- package/dist/expression-Bz8uEh8W.d.mts +0 -2
- package/dist/expression-VJWwxbUB-BtNDaTCt.d.mts.map +0 -1
- package/dist/functions-gl3PL1so.d.mts +0 -1
- package/dist/index-CI6diFcZ.d.mts.map +0 -1
- package/dist/index-reference-X_kA2mV8.d.mts +0 -1
- package/dist/interpreter-DoQwVOyS-jsuDJlaX.mjs.map +0 -1
- package/dist/middleware-CcDThETr.d.mts +0 -1
- package/dist/plan-BjX90QC6.d.mts +0 -2
- package/dist/query-lane-context-DgxWaKr-.d.mts +0 -1
- package/dist/sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts.map +0 -1
- package/dist/types-BFCrGkhG.d.mts +0 -1
- package/dist/types-DzQmUrUm-ColHE4Av.mjs.map +0 -1
- package/dist/validators-CcR6gGf_.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
|
|
|
2
2
|
import "./types-CXRxo_TK.mjs";
|
|
3
3
|
import { S as SqlSchemaIRNode } from "./types-fmtEmvj3-B0fQaVes.mjs";
|
|
4
4
|
import "./types-B-dwfOwQ.mjs";
|
|
5
|
-
import { t as CodecControlHooks } from "./types-CWvmfrfd-
|
|
5
|
+
import { t as CodecControlHooks } from "./types-CWvmfrfd-u6aEmYg4.mjs";
|
|
6
6
|
import { t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
|
|
7
7
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
8
8
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
@@ -114,4 +114,4 @@ declare function verifySqlSchemaByDiff(input: VerifySqlSchemaByDiffInput): Verif
|
|
|
114
114
|
declare function arraysEqual(a: readonly string[], b: readonly string[]): boolean;
|
|
115
115
|
//#endregion
|
|
116
116
|
export { VerifySqlSchemaByDiffInput as a, classifySqlDiffIssue as c, verifySqlSchemaByDiff as d, StorageTypeVerdictInput as i, computeSqlDiffVerdict as l, SqlDiffVerdictInput as n, arraysEqual as o, StorageTypeVerdict as r, classifyDiffSubjectGranularity as s, SqlDiffVerdict as t, computeStorageTypeVerdict as u };
|
|
117
|
-
//# sourceMappingURL=diff-
|
|
117
|
+
//# sourceMappingURL=diff-ox1r2eqR.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-
|
|
1
|
+
{"version":3,"file":"diff-ox1r2eqR.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/diff.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAkBiB,+BAA+B,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;;;;;;;;;;;;;iBAarH,qBAAqB,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;UAClH;;WAEC,iBAAiB;;WAEjB,uBAAuB,OAAO,oBAAoB;WAClD;WACA,sBAAsB;;WAEtB,gBAAgB,qBAAqB;;UAEtC;WACC,mBAAmB;WACnB,mBAAmB;;;;;;;;;iBASb,sBAAsB,OAAO,sBAAsB;UAC1D;WACC,UAAU,SAAS;;;;;;;WAOnB,gBAAgB;aACd,QAAQ;;WAEV,YAAY,oBAAoB;;;;;;;;;UASjC;WACC,mBAAmB;WACnB,mBAAmB;;iBAEb,0BAA0B,OAAO,0BAA0B;UAClE;WACC,UAAU,SAAS;WACnB,QAAQ;WACR;WACA,qBAAqB,cAAc;;WAEnC,YAAY;;WAEZ,gBAAgB,qBAAqB;;;;;;;;;iBAS/B,sBAAsB,OAAO,6BAA6B;;;;;;;;;;;;;;iBAc1D,YAAY,sBAAsB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as createSqlOperationRegistry } from "./dist-CHz1hF8M.mjs";
|
|
2
|
-
import { j as PreparedParamRef, q as isQueryAst } from "./types-
|
|
2
|
+
import { j as PreparedParamRef, q as isQueryAst } from "./types-BtItVHx6-BEDme1ZL.mjs";
|
|
3
3
|
import { t as collectOrderedParamRefs } from "./util-DixeJBri-Cad7x5ec.mjs";
|
|
4
4
|
import { t as createSqlParamRefMutator } from "./middleware-qY3R0WsS-8GWtk_Bf.mjs";
|
|
5
|
-
import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-
|
|
6
|
-
import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-
|
|
5
|
+
import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-CRgsKIJY.mjs";
|
|
6
|
+
import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-CQ9M2B3L.mjs";
|
|
7
7
|
import { a as runPreparedQuery, c as transactionStart, i as runPreparedExecute, l as wasRefusedBeforeBegin, n as preparedStatementExecute, o as settlementOf, r as preparedStatementQuery, s as transactionSettlement, t as createTransactionStart } from "./transaction-state-BfXhs7D7-DhmbySW9.mjs";
|
|
8
8
|
import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
9
9
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -18,7 +18,7 @@ import { checkContractComponentRequirements, mergeCapabilityMatrices } from "@pr
|
|
|
18
18
|
import { AsyncIterableResult, RuntimeCore, applyMutationDefaults, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createContextBeneath, executeStatement, raceAgainstAbort, runtimeError as runtimeError$1, startClientActivity, startTransactionActivity, streamStatement } from "@prisma/orm-framework/components/runtime";
|
|
19
19
|
import { createExecutionStack } from "@prisma/orm-framework/components/execution";
|
|
20
20
|
import { hashContent } from "@prisma/orm-framework/utils/hash-content";
|
|
21
|
-
//#region ../../../2-sql-family/5-runtime/dist/exports-
|
|
21
|
+
//#region ../../../2-sql-family/5-runtime/dist/exports-D4xgPPzV.mjs
|
|
22
22
|
/** The symbol-keyed member through which a runtime, connection, transaction, `withTransaction` context or activity handle starts activities; user-facing types do not show it. */
|
|
23
23
|
const activitySource = Symbol("activitySource");
|
|
24
24
|
function hasActivitySourceMember(target) {
|
|
@@ -1318,7 +1318,6 @@ var TransactionBase = class {
|
|
|
1318
1318
|
});
|
|
1319
1319
|
throw error;
|
|
1320
1320
|
}
|
|
1321
|
-
this.runtime.markHeld(this.driverTx, driverSavepoint);
|
|
1322
1321
|
return new Savepoint(this.runtime, driverSavepoint, activity, this.stack, entry, this.rootTransaction);
|
|
1323
1322
|
}
|
|
1324
1323
|
logDroppedError(error) {
|
|
@@ -1641,7 +1640,6 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1641
1640
|
#transactionWorkOn = /* @__PURE__ */ new WeakMap();
|
|
1642
1641
|
#openActivityHandles = 0;
|
|
1643
1642
|
#refusing = false;
|
|
1644
|
-
#heldQueryables = /* @__PURE__ */ new WeakSet();
|
|
1645
1643
|
#preparedStatementHandles = /* @__PURE__ */ new WeakMap();
|
|
1646
1644
|
#holdFinishedChildren;
|
|
1647
1645
|
#transactions = /* @__PURE__ */ new WeakMap();
|
|
@@ -1669,9 +1667,6 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1669
1667
|
unregister: (queryable, transaction) => {
|
|
1670
1668
|
if (this.#transactions.get(queryable) === transaction) this.#transactions.delete(queryable);
|
|
1671
1669
|
},
|
|
1672
|
-
markHeld: (driverTx, driverSavepoint) => {
|
|
1673
|
-
if (this.#heldQueryables.has(driverTx)) this.#heldQueryables.add(driverSavepoint);
|
|
1674
|
-
},
|
|
1675
1670
|
onConnectionReleased: (connection, teardown) => {
|
|
1676
1671
|
this.#transactionWorkOn.set(connection, teardown);
|
|
1677
1672
|
}
|
|
@@ -1879,7 +1874,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1879
1874
|
})
|
|
1880
1875
|
};
|
|
1881
1876
|
}
|
|
1882
|
-
/** The activity route of a held connection that `owner` wraps: its statements run on `connection`, and its transactions begin there. */
|
|
1877
|
+
/** The activity route of a held connection that `owner` wraps: its statements run on `connection`, and its transactions begin there. A held connection must come from {@link acquireRawConnection}. */
|
|
1883
1878
|
connectionRoute(connection, owner) {
|
|
1884
1879
|
const openTransaction = this.#transactions.get(connection);
|
|
1885
1880
|
return this.queryableRoute(connection, "connection", () => openTransaction?.activity, {
|
|
@@ -1903,7 +1898,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1903
1898
|
if (!state.clean) await connection.destroy(state.reason).catch(() => void 0);
|
|
1904
1899
|
}
|
|
1905
1900
|
}
|
|
1906
|
-
/** The `activitySource` member of a held connection that `owner()` wraps. */
|
|
1901
|
+
/** The `activitySource` member of a held connection that `owner()` wraps. A held connection must come from {@link acquireRawConnection}. */
|
|
1907
1902
|
connectionActivitySource(connection, owner) {
|
|
1908
1903
|
return {
|
|
1909
1904
|
startActivity: (activity) => this.startActivityOnRoute(this.connectionRoute(connection, owner()), activity, void 0),
|
|
@@ -1969,12 +1964,13 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1969
1964
|
};
|
|
1970
1965
|
}
|
|
1971
1966
|
/**
|
|
1972
|
-
* Returns a raw driver connection. SQL issued on it runs below the middleware/codec/telemetry pipeline. It carries its own lifecycle (`release`/`destroy`/`beginTransaction`); the caller owns disposal. It follows the runtime's close rule for connections: see {@link Runtime.close}. Pass the `activityParent` of the activity it is acquired for, so it is admitted after `close()` while that activity is open.
|
|
1967
|
+
* Returns a raw driver connection, after the contract marker check has finished through the driver; it rejects with the marker read's error, such as `CONTRACT.MARKER_READ_FAILED`, and takes no connection when that read fails. Every connection the runtime or a subclass holds must come from here, so the check never waits for a connection its caller holds. SQL issued on it runs below the middleware/codec/telemetry pipeline. It carries its own lifecycle (`release`/`destroy`/`beginTransaction`); the caller owns disposal. It follows the runtime's close rule for connections: see {@link Runtime.close}. Pass the `activityParent` of the activity it is acquired for, so it is admitted after `close()` while that activity is open.
|
|
1973
1968
|
*/
|
|
1974
1969
|
async acquireRawConnection(options) {
|
|
1975
1970
|
const endOperation = this.beginOperation(this.driver, options);
|
|
1976
1971
|
let connection;
|
|
1977
1972
|
try {
|
|
1973
|
+
await this.ensureMarkerChecked();
|
|
1978
1974
|
connection = await this.driver.acquireConnection();
|
|
1979
1975
|
} finally {
|
|
1980
1976
|
endOperation();
|
|
@@ -2009,18 +2005,18 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2009
2005
|
await iterator.return?.();
|
|
2010
2006
|
}
|
|
2011
2007
|
}
|
|
2012
|
-
async setupDriverExecution(exec
|
|
2008
|
+
async setupDriverExecution(exec) {
|
|
2013
2009
|
this.familyAdapter.validatePlan(exec, this.contract);
|
|
2014
2010
|
this._pendingTelemetry = null;
|
|
2015
2011
|
this._telemetryCache = null;
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2012
|
+
await this.ensureMarkerChecked();
|
|
2013
|
+
}
|
|
2014
|
+
ensureMarkerChecked() {
|
|
2015
|
+
this.verifyMarkerPromise ??= this.verifyMarker().catch((error) => {
|
|
2016
|
+
this.verifyMarkerPromise = null;
|
|
2017
|
+
throw error;
|
|
2018
|
+
});
|
|
2019
|
+
return this.verifyMarkerPromise;
|
|
2024
2020
|
}
|
|
2025
2021
|
beginActivityWork(parent) {
|
|
2026
2022
|
const endOperation = this.beginOperation(this.driver, { activityParent: parent });
|
|
@@ -2060,10 +2056,10 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2060
2056
|
getListDecoder() {
|
|
2061
2057
|
return sqlNativeArrayListDecoder;
|
|
2062
2058
|
}
|
|
2063
|
-
async *streamDecodedRows(run, exec, createDecodeContext, driverCall, codecCtx,
|
|
2059
|
+
async *streamDecodedRows(run, exec, createDecodeContext, driverCall, codecCtx, transaction, onDriverAnswered) {
|
|
2064
2060
|
const rowDecodeContext = createDecodeContext();
|
|
2065
2061
|
transaction?.assertOpen();
|
|
2066
|
-
await this.setupDriverExecution(exec
|
|
2062
|
+
await this.setupDriverExecution(exec);
|
|
2067
2063
|
const startedAt = Date.now();
|
|
2068
2064
|
let telemetryOutcome = null;
|
|
2069
2065
|
try {
|
|
@@ -2126,7 +2122,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2126
2122
|
});
|
|
2127
2123
|
return this.encodeDraftParams(draftWithMutations, codecCtx);
|
|
2128
2124
|
}
|
|
2129
|
-
/** Query rows against a caller-supplied queryable through the shared preparation pipeline. */
|
|
2125
|
+
/** Query rows against a caller-supplied queryable through the shared preparation pipeline. A held connection must come from {@link acquireRawConnection}. */
|
|
2130
2126
|
queryAgainstQueryable(plan, queryable, options) {
|
|
2131
2127
|
this.ensureCodecRegistryValidated();
|
|
2132
2128
|
const self = this;
|
|
@@ -2145,7 +2141,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2145
2141
|
yield* self.streamDecodedRows(run, exec, () => buildDecodeContext(exec.ast, self.contractCodecs), () => queryable.query({
|
|
2146
2142
|
sql: exec.sql,
|
|
2147
2143
|
params: exec.params
|
|
2148
|
-
}), codecCtx,
|
|
2144
|
+
}), codecCtx, transaction, endOperation);
|
|
2149
2145
|
});
|
|
2150
2146
|
} finally {
|
|
2151
2147
|
endOperation();
|
|
@@ -2153,7 +2149,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2153
2149
|
};
|
|
2154
2150
|
return new AsyncIterableResult(generator());
|
|
2155
2151
|
}
|
|
2156
|
-
/** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. */
|
|
2152
|
+
/** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. A held connection must come from {@link acquireRawConnection}. */
|
|
2157
2153
|
async executeStatisticsAgainstQueryable(plan, queryable, options) {
|
|
2158
2154
|
const endOperation = this.beginOperation(queryable, options);
|
|
2159
2155
|
try {
|
|
@@ -2167,7 +2163,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2167
2163
|
const { codecCtx, contextFields } = this.createQueryContexts(options);
|
|
2168
2164
|
return this.executeOn(queryable, options, plan, contextFields, async (run, transaction) => {
|
|
2169
2165
|
const exec = await this.prepareOperation(plan, codecCtx, run);
|
|
2170
|
-
return this.executeEncodedPlan(run, exec,
|
|
2166
|
+
return this.executeEncodedPlan(run, exec, transaction, codecCtx, () => queryable.execute({
|
|
2171
2167
|
sql: exec.sql,
|
|
2172
2168
|
params: exec.params
|
|
2173
2169
|
}));
|
|
@@ -2182,9 +2178,9 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2182
2178
|
parent: this.parentOf(transaction, options)
|
|
2183
2179
|
}, (run) => body(run, transaction));
|
|
2184
2180
|
}
|
|
2185
|
-
async executeEncodedPlan(run, exec,
|
|
2181
|
+
async executeEncodedPlan(run, exec, transaction, codecCtx, driverCall) {
|
|
2186
2182
|
transaction?.assertOpen();
|
|
2187
|
-
await this.setupDriverExecution(exec
|
|
2183
|
+
await this.setupDriverExecution(exec);
|
|
2188
2184
|
checkAborted(codecCtx, "stream");
|
|
2189
2185
|
const startedAt = Date.now();
|
|
2190
2186
|
let telemetryOutcome = "success";
|
|
@@ -2225,7 +2221,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2225
2221
|
});
|
|
2226
2222
|
return blindCast(finalPlan.ast.kind === "raw-query" && finalPlan.ast.result.kind === "affected-count" ? new PreparedExecutionImpl(internals) : new PreparedStatementImpl(internals));
|
|
2227
2223
|
}
|
|
2228
|
-
/** Query prepared rows against a caller-supplied queryable through the full pipeline. */
|
|
2224
|
+
/** Query prepared rows against a caller-supplied queryable through the full pipeline. A held connection must come from {@link acquireRawConnection}. */
|
|
2229
2225
|
runPreparedQueryAgainstQueryable(ps, userParams, queryable, options) {
|
|
2230
2226
|
this.ensureCodecRegistryValidated();
|
|
2231
2227
|
const self = this;
|
|
@@ -2275,9 +2271,9 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2275
2271
|
}
|
|
2276
2272
|
}
|
|
2277
2273
|
};
|
|
2278
|
-
yield* this.streamDecodedRows(run, exec, () => ps.decodeContext, () => queryable.query(request), codecCtx,
|
|
2274
|
+
yield* this.streamDecodedRows(run, exec, () => ps.decodeContext, () => queryable.query(request), codecCtx, transaction, onDriverAnswered);
|
|
2279
2275
|
}
|
|
2280
|
-
/** Execute a prepared statement's statistics against a caller-supplied queryable through the full pipeline. */
|
|
2276
|
+
/** Execute a prepared statement's statistics against a caller-supplied queryable through the full pipeline. A held connection must come from {@link acquireRawConnection}. */
|
|
2281
2277
|
async runPreparedExecuteAgainstQueryable(ps, userParams, queryable, options) {
|
|
2282
2278
|
const endOperation = this.beginOperation(queryable, options);
|
|
2283
2279
|
try {
|
|
@@ -2319,7 +2315,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2319
2315
|
}
|
|
2320
2316
|
}
|
|
2321
2317
|
};
|
|
2322
|
-
return this.executeEncodedPlan(run, exec,
|
|
2318
|
+
return this.executeEncodedPlan(run, exec, transaction, codecCtx, () => queryable.execute(request));
|
|
2323
2319
|
}
|
|
2324
2320
|
async connection(options) {
|
|
2325
2321
|
return this.openConnection(options);
|
|
@@ -2327,7 +2323,6 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2327
2323
|
async openConnection(options) {
|
|
2328
2324
|
const parent = options?.activityParent;
|
|
2329
2325
|
const driverConn = await this.acquireRawConnection(options);
|
|
2330
|
-
this.#heldQueryables.add(driverConn);
|
|
2331
2326
|
const self = this;
|
|
2332
2327
|
const wrappedConnection = {
|
|
2333
2328
|
[transactionStart]: createTransactionStart(),
|
|
@@ -2365,7 +2360,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2365
2360
|
return wrappedConnection;
|
|
2366
2361
|
}
|
|
2367
2362
|
/**
|
|
2368
|
-
* Begins a transaction on `connection`, which `owner` wraps, as a transaction activity. When the transaction's `activityStarted` hooks refuse the start, no `BEGIN` is sent, `owner` is recorded as clean, and `withTransaction` releases it; after any other start failure it destroys it. The transaction's `activityStarted` hooks run before `BEGIN`. Every statement sent on the transaction, or on `connection`, from the end of `BEGIN` until `commit()` or `rollback()` is called is the transaction's child, and is finalized when the transaction ends, with its outcome. Once `commit()` or `rollback()` is called, a statement sent on the transaction is refused when it starts, and one started earlier that has not reached the driver yet is refused with `RUNTIME.TRANSACTION_CLOSED`, so neither runs after the `COMMIT` or `ROLLBACK`. `commit()` and `rollback()` resolve after every finalization hook has run. A subclass
|
|
2363
|
+
* Begins a transaction on `connection`, which `owner` wraps, as a transaction activity. When the transaction's `activityStarted` hooks refuse the start, no `BEGIN` is sent, `owner` is recorded as clean, and `withTransaction` releases it; after any other start failure it destroys it. The transaction's `activityStarted` hooks run before `BEGIN`. Every statement sent on the transaction, or on `connection`, from the end of `BEGIN` until `commit()` or `rollback()` is called is the transaction's child, and is finalized when the transaction ends, with its outcome. Once `commit()` or `rollback()` is called, a statement sent on the transaction is refused when it starts, and one started earlier that has not reached the driver yet is refused with `RUNTIME.TRANSACTION_CLOSED`, so neither runs after the `COMMIT` or `ROLLBACK`. `commit()` and `rollback()` resolve after every finalization hook has run. A subclass begins its transactions here, on a connection from {@link acquireRawConnection}.
|
|
2369
2364
|
*/
|
|
2370
2365
|
async beginTransactionOn(connection, owner, parent, options) {
|
|
2371
2366
|
owner[transactionStart].refusedBeforeBegin = true;
|
|
@@ -2405,7 +2400,6 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2405
2400
|
});
|
|
2406
2401
|
throw error;
|
|
2407
2402
|
}
|
|
2408
|
-
if (this.#heldQueryables.has(connection)) this.#heldQueryables.add(driverTx);
|
|
2409
2403
|
const transaction = new OuterTransaction(this.#transactionRuntime, connection, driverTx, activity, endTransactionWork, timeout);
|
|
2410
2404
|
this.#startingTransactions.delete(connection);
|
|
2411
2405
|
return transaction;
|
|
@@ -2456,8 +2450,8 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
2456
2450
|
this.codecRegistryValidated = true;
|
|
2457
2451
|
}
|
|
2458
2452
|
}
|
|
2459
|
-
async verifyMarker(
|
|
2460
|
-
const readResult = await this.familyAdapter.markerReader.readMarker(
|
|
2453
|
+
async verifyMarker() {
|
|
2454
|
+
const readResult = await this.familyAdapter.markerReader.readMarker(this.driver);
|
|
2461
2455
|
const expectedStorageHash = this.contract.storage.storageHash;
|
|
2462
2456
|
const expectedProfileHash = this.contract.profileHash ?? null;
|
|
2463
2457
|
const expected = {
|
|
@@ -2764,4 +2758,4 @@ function createToSql(stack, contract) {
|
|
|
2764
2758
|
//#endregion
|
|
2765
2759
|
export { validateContractCodecMappings as C, validateCodecRegistryCompleteness as S, withTransactionMembers as T, lints as _, budgets as a, startActivityOn as b, createSqlExecutionStack as c, delegatingRuntime as d, deriveParamMetadata as f, lazyActivitySource as g, findActivitySource as h, activitySource as i, createToSql as l, extractCodecIds as m, PreparedStatementImpl as n, createAstCodecRegistry as o, encodeParamsWithMetadata as p, SqlRuntimeBase as r, createExecutionContext as s, PreparedExecutionImpl as t, delegatingActivitySource as u, lowerSqlPlan as v, withTransaction as w, toRuntimeOptions as x, planContentHashOn as y };
|
|
2766
2760
|
|
|
2767
|
-
//# sourceMappingURL=exports-
|
|
2761
|
+
//# sourceMappingURL=exports-D4xgPPzV-BWjldMmf.mjs.map
|