@prisma/orm-family-sql 8.0.0-rc.17-dev.26 → 8.0.0-rc.17-dev.28
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-ZHk0SsBA.d.mts → index-qr6LA3dl.d.mts} +4 -4
- package/dist/{index-ZHk0SsBA.d.mts.map → index-qr6LA3dl.d.mts.map} +1 -1
- package/dist/middleware-DOKGNt72.d.mts +1 -0
- package/dist/{middleware-mLwvcOLS-wIYSKgog.d.mts → middleware-YsFLC19Y-xhimGDiS.d.mts} +4 -4
- package/dist/{middleware-mLwvcOLS-wIYSKgog.d.mts.map → middleware-YsFLC19Y-xhimGDiS.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +2 -2
- package/dist/orm-client.mjs +8 -1
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{prepared-statement-YtgdlN7e-DqHHwo30.d.mts → prepared-statement-Bs9TKj5u-CInk8vXF.d.mts} +60 -76
- package/dist/prepared-statement-Bs9TKj5u-CInk8vXF.d.mts.map +1 -0
- package/dist/relational-core.d.mts +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +217 -137
- package/dist/runtime.mjs.map +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +2 -2
- package/dist/runtime__internal__prepared-query.mjs +2 -2
- package/dist/transaction-state-BfXhs7D7-3k10jZ8I.mjs +45 -0
- package/dist/transaction-state-BfXhs7D7-3k10jZ8I.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/middleware-FHkIPvYR.d.mts +0 -1
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs +0 -22
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs.map +0 -1
- package/dist/prepared-statement-YtgdlN7e-DqHHwo30.d.mts.map +0 -1
|
@@ -7,9 +7,9 @@ import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mj
|
|
|
7
7
|
import "./plan-_8dKi13Q.mjs";
|
|
8
8
|
import { t as CodecDescriptorRegistry } from "./query-lane-context-C2AXsoFa-COSQOvZz.mjs";
|
|
9
9
|
import "./query-lane-context-BsZs5lvB.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { A as SqlMiddleware } from "./prepared-statement-Bs9TKj5u-CInk8vXF.mjs";
|
|
11
11
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
12
|
-
import {
|
|
12
|
+
import { ActivityEndedResult as ActivityEndedResult$1, ActivityFinalizedResult as ActivityFinalizedResult$1, ExecuteInterceptResult as ExecuteInterceptResult$1, QueryInterceptResult as QueryInterceptResult$1, RuntimeActivity as RuntimeActivity$1, RuntimeLog as Log, StatementActivity, StatementEnded, TransactionActivity, TransactionEnded } from "@prisma/orm-framework/components/runtime";
|
|
13
13
|
//#region ../../../2-sql/5-runtime/dist/index.d.mts
|
|
14
14
|
//#region src/codecs/ast-codec-registry.d.ts
|
|
15
15
|
/**
|
|
@@ -80,5 +80,5 @@ interface LintsOptions {
|
|
|
80
80
|
*/
|
|
81
81
|
declare function lints(options?: LintsOptions): SqlMiddleware;
|
|
82
82
|
//#endregion
|
|
83
|
-
export { LintsOptions as a,
|
|
84
|
-
//# sourceMappingURL=index-
|
|
83
|
+
export { lowerSqlPlan as _, LintsOptions as a, RuntimeActivity$1 as c, TransactionActivity as d, TransactionEnded as f, lints as g, extractCodecIds as h, ExecuteInterceptResult$1 as i, StatementActivity as l, createAstCodecRegistry as m, ActivityFinalizedResult$1 as n, Log as o, budgets as p, BudgetsOptions as r, QueryInterceptResult$1 as s, ActivityEndedResult$1 as t, StatementEnded as u, validateCodecRegistryCompleteness as v, validateContractCodecMappings as y };
|
|
84
|
+
//# sourceMappingURL=index-qr6LA3dl.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-qr6LA3dl.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAiBiB,uBAAuB,aAAa,0BAA0B;;;iBAG9D,gBAAgB,UAAU,SAAS,cAAc;iBACjD,8BAA8B,UAAU,yBAAyB,UAAU,SAAS;iBACpF,kCAAkC,UAAU,yBAAyB,UAAU,SAAS;;;;;;;;;;;;iBAYxF,aAAa,KAAK,SAAS,QAAQ,aAAa,SAAS,aAAa,mBAAmB,UAAU,SAAS,aAAa,WAAW,aAAa,OAAO,iBAAiB;;;UAGhL;WACC;WACA;WACA,YAAY;WACZ;WACA;aACE;aACA;;;iBAGI,QAAQ,UAAU,iBAAiB;;;UAG1C;WACC;aACE;aACA;aACA;aACA;aACA;;WAEF;;;;;;;;;;;;;;;;iBAgBM,MAAM,UAAU,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./middleware-YsFLC19Y-xhimGDiS.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mjs";
|
|
2
2
|
import { ParamRefMutator } from "@prisma/orm-framework/components/runtime";
|
|
3
|
-
//#region ../../../2-sql/4-lanes/relational-core/dist/middleware-
|
|
3
|
+
//#region ../../../2-sql/4-lanes/relational-core/dist/middleware-YsFLC19Y.d.mts
|
|
4
4
|
//#region src/middleware/param-ref-mutator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Brand applied to {@link ParamRefHandle} so user-constructed handles
|
|
@@ -45,7 +45,7 @@ interface ParamRefEntry<TCodecId extends string | undefined = string | undefined
|
|
|
45
45
|
*/
|
|
46
46
|
type ParamRefEntryUnion<TCodecMap extends Record<string, unknown>> = { [K in keyof TCodecMap & string]: ParamRefEntry<K>; }[keyof TCodecMap & string] | ParamRefEntry<undefined>;
|
|
47
47
|
/**
|
|
48
|
-
* SQL-family mutator threaded into `SqlMiddleware.
|
|
48
|
+
* SQL-family mutator threaded into `SqlMiddleware.beforeEncode` as
|
|
49
49
|
* `params`. Scope is `ParamRef.value` slots only — middleware cannot
|
|
50
50
|
* insert / remove `ParamRef`s, rewrite SQL, or modify projection. The
|
|
51
51
|
* type-level `ParamRefHandle` brand and the `replaceValue(ref,
|
|
@@ -88,7 +88,7 @@ interface SqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<
|
|
|
88
88
|
/**
|
|
89
89
|
* Internal-only view of the mutator that exposes the post-mutation params
|
|
90
90
|
* array to the SQL runtime. The runtime calls `currentParams()` after the
|
|
91
|
-
* `
|
|
91
|
+
* `beforeEncode` chain has run; the result is the plan's original
|
|
92
92
|
* `params` by reference identity if no middleware mutated, otherwise a
|
|
93
93
|
* frozen new array carrying the mutations applied in chain order.
|
|
94
94
|
*
|
|
@@ -116,4 +116,4 @@ interface SqlParamRefMutatorInternal<TCodecMap extends Record<string, unknown> =
|
|
|
116
116
|
declare function createSqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<string, unknown>>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap>;
|
|
117
117
|
//#endregion
|
|
118
118
|
export { SqlParamRefMutatorInternal as a, SqlParamRefMutator as i, ParamRefEntryUnion as n, createSqlParamRefMutator as o, ParamRefHandle as r, ParamRefEntry as t };
|
|
119
|
-
//# sourceMappingURL=middleware-
|
|
119
|
+
//# sourceMappingURL=middleware-YsFLC19Y-xhimGDiS.d.mts.map
|
package/dist/{middleware-mLwvcOLS-wIYSKgog.d.mts.map → middleware-YsFLC19Y-xhimGDiS.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-
|
|
1
|
+
{"version":3,"file":"middleware-YsFLC19Y-xhimGDiS.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/middleware-YsFLC19Y.d.mts"],"mappings":";;;;;;;;;;;;;;cAac;;;;;;;;;;UAUJ,eAAe;YACb,sBAAsB;;;;;;;UAOxB,cAAc;WACb,KAAK,eAAe;WACpB;WACA,SAAS;;;;;;;;;;KAUf,mBAAmB,kBAAkB,8BAA8B,WAAW,qBAAqB,cAAc,YAAY,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;UAyB9I,mBAAmB,kBAAkB,0BAA0B,iCAAiC;;EAExG,WAAW,iBAAiB,mBAAmB;;;;;;;EAO/C,aAAa,uBAAuB,oBAAoB,KAAK,eAAe,WAAW,UAAU,UAAU;EAC3G,aAAa,KAAK,2BAA2B;;EAE7C,cAAc,SAAS;aACZ,KAAK,sBAAsB;aAC3B;;;;;;;;;;;;;UAaH,2BAA2B,kBAAkB,0BAA0B,iCAAiC,mBAAmB;EACnI;;;;;;;;;;;;;;;;;iBAiBe,yBAAyB,kBAAkB,0BAA0B,yBAAyB,MAAM,mBAAmB,2BAA2B"}
|
package/dist/orm-client.d.mts
CHANGED
|
@@ -14,8 +14,8 @@ import { n as ExecutionContext } from "./query-lane-context-C2AXsoFa-COSQOvZz.mj
|
|
|
14
14
|
import "./query-lane-context-BsZs5lvB.mjs";
|
|
15
15
|
import { h as RuntimeScope, o as ComputeColumnJsType } from "./types-D09NAayg-CNrpjo7Z.mjs";
|
|
16
16
|
import "./types-DAkmn9FV.mjs";
|
|
17
|
-
import { i as Declaration, l as ParamsFromDeclaration, m as PreparedStatement, p as PreparedFor, t as BindSiteParams, w as RuntimeQueryable$1, y as Runtime } from "./prepared-statement-
|
|
18
|
-
import "./index-
|
|
17
|
+
import { i as Declaration, l as ParamsFromDeclaration, m as PreparedStatement, p as PreparedFor, t as BindSiteParams, w as RuntimeQueryable$1, y as Runtime } from "./prepared-statement-Bs9TKj5u-CInk8vXF.mjs";
|
|
18
|
+
import "./index-qr6LA3dl.mjs";
|
|
19
19
|
import { CodecDescriptorRef, ScalarFieldDeclarationBuilder } from "@prisma/orm-framework/components/codec";
|
|
20
20
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
21
21
|
import { AnnotationValue, AsyncIterableResult, MetaBuilder, OperationKind, ResultType, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
|
package/dist/orm-client.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { a as isExpression, s as toExpr, t as ExpressionImpl } from "./expressio
|
|
|
7
7
|
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-CYK0Wzja.mjs";
|
|
8
8
|
import { t as createFunctions } from "./functions-0YWByawj.mjs";
|
|
9
9
|
import { t as createIndexReferences } from "./index-reference-D693Lu-E.mjs";
|
|
10
|
+
import { o as settlementOf } from "./transaction-state-BfXhs7D7-3k10jZ8I.mjs";
|
|
10
11
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
11
12
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
12
13
|
import { blindCast, castAs } from "@prisma/orm-framework/utils/casts";
|
|
@@ -4111,7 +4112,13 @@ async function runInTransaction(transaction, run) {
|
|
|
4111
4112
|
if (typeof transaction.commit === "function") await transaction.commit();
|
|
4112
4113
|
return result;
|
|
4113
4114
|
} catch (error) {
|
|
4114
|
-
if (typeof transaction.rollback === "function")
|
|
4115
|
+
if (typeof transaction.rollback === "function") try {
|
|
4116
|
+
await transaction.rollback();
|
|
4117
|
+
} catch (rollbackError) {
|
|
4118
|
+
const settlement = settlementOf(transaction);
|
|
4119
|
+
if (settlement?.rolledBack !== true) throw rollbackError;
|
|
4120
|
+
settlement.logDroppedError(rollbackError);
|
|
4121
|
+
}
|
|
4115
4122
|
throw error;
|
|
4116
4123
|
}
|
|
4117
4124
|
}
|