@prisma/orm-family-sql 8.0.0-rc.20-dev.6 → 8.0.0-rc.20-dev.8
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-ZrKjxwQe.mjs → aggregate-descriptor-registry-CkybswmO.mjs} +2 -2
- package/dist/{aggregate-descriptor-registry-ZrKjxwQe.mjs.map → aggregate-descriptor-registry-CkybswmO.mjs.map} +1 -1
- package/dist/{ast-YEMe_B8z.d.mts → ast-DcphKbq9.d.mts} +6 -8
- package/dist/{ast-YEMe_B8z.d.mts.map → ast-DcphKbq9.d.mts.map} +1 -1
- package/dist/{ast-D0miQ1B6.mjs → ast-e_02t9Nt.mjs} +2 -2
- package/dist/{ast-D0miQ1B6.mjs.map → ast-e_02t9Nt.mjs.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +7 -7
- package/dist/builder__runtime.mjs +5 -5
- package/dist/builder__types.d.mts +5 -5
- package/dist/{collection-methods-D2UnCS0S-DOy2qHYS.d.mts → collection-methods-D9CYfePl-DsDjYS6t.d.mts} +3 -3
- package/dist/{collection-methods-D2UnCS0S-DOy2qHYS.d.mts.map → collection-methods-D9CYfePl-DsDjYS6t.d.mts.map} +1 -1
- package/dist/collection-methods-FWiYjZ5j.d.mts +1 -0
- package/dist/{control-4J_KkH9m.d.mts → control-C24G0Gx8.d.mts} +6 -6
- package/dist/{control-4J_KkH9m.d.mts.map → control-C24G0Gx8.d.mts.map} +1 -1
- package/dist/{control-D1Er9MJE.mjs → control-DQzNuCAM.mjs} +2 -2
- package/dist/{control-D1Er9MJE.mjs.map → control-DQzNuCAM.mjs.map} +1 -1
- package/dist/{control-adapter-BfyLe7rh-DKIl5Ft6.d.mts → control-adapter-BfyLe7rh-C_rrUuhb.d.mts} +4 -4
- package/dist/{control-adapter-BfyLe7rh-DKIl5Ft6.d.mts.map → control-adapter-BfyLe7rh-C_rrUuhb.d.mts.map} +1 -1
- package/dist/{control-adapter-cNZNO0Nc.d.mts → control-adapter-CZ84jQ_z.d.mts} +2 -2
- package/dist/{control-adapter-cNZNO0Nc.d.mts.map → control-adapter-CZ84jQ_z.d.mts.map} +1 -1
- package/dist/{db-D1d75IvM-D4mRDC6w.d.mts → db-D1d75IvM-D5CqruQz.d.mts} +10 -10
- package/dist/{db-D1d75IvM-D4mRDC6w.d.mts.map → db-D1d75IvM-D5CqruQz.d.mts.map} +1 -1
- package/dist/{ddl-types-By5mT2_S-CdaaFvsX.d.mts → ddl-types-BeA1kjV1-C4d5owxE.d.mts} +3 -3
- package/dist/{ddl-types-By5mT2_S-CdaaFvsX.d.mts.map → ddl-types-BeA1kjV1-C4d5owxE.d.mts.map} +1 -1
- package/dist/{diff-Bh3cSTWM.d.mts → diff-FNTO8gbI.d.mts} +2 -2
- package/dist/{diff-Bh3cSTWM.d.mts.map → diff-FNTO8gbI.d.mts.map} +1 -1
- package/dist/{exports-CGzFaakG-DWGJbXKM.mjs → exports-CGzFaakG-Dddm8emA.mjs} +5 -5
- package/dist/{exports-CGzFaakG-DWGJbXKM.mjs.map → exports-CGzFaakG-Dddm8emA.mjs.map} +1 -1
- package/dist/{expression-CieaNuRM-B1uVqxwd.d.mts → expression-BWRsWR6O-BrUVz0V2.d.mts} +4 -4
- package/dist/expression-BWRsWR6O-BrUVz0V2.d.mts.map +1 -0
- package/dist/{expression-6ld_ZQL6-fOuazzzm.d.mts → expression-C3F6gxZH-DrYNeDbh.d.mts} +4 -4
- package/dist/{expression-6ld_ZQL6-fOuazzzm.d.mts.map → expression-C3F6gxZH-DrYNeDbh.d.mts.map} +1 -1
- package/dist/expression-CQHy0GY7.d.mts +2 -0
- package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs → expression-impl-DtbmFnnz-CUKzBisY.mjs} +3 -3
- package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs.map → expression-impl-DtbmFnnz-CUKzBisY.mjs.map} +1 -1
- package/dist/family.d.mts +6 -6
- package/dist/family.mjs +3 -3
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +2 -2
- package/dist/family__control.mjs +1 -1
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/{functions-EW-RrRn3.d.mts → functions-CQrsCHCj.d.mts} +3 -3
- package/dist/{functions-EW-RrRn3.d.mts.map → functions-CQrsCHCj.d.mts.map} +1 -1
- package/dist/{functions-CsOoN7I3.mjs → functions-D7lN5-JU.mjs} +3 -3
- package/dist/{functions-CsOoN7I3.mjs.map → functions-D7lN5-JU.mjs.map} +1 -1
- package/dist/{generator-functions-Cg5QkM46-D6M4ayK9.mjs → generator-functions-Cg5QkM46-C1ByFzyT.mjs} +2 -2
- package/dist/{generator-functions-Cg5QkM46-D6M4ayK9.mjs.map → generator-functions-Cg5QkM46-C1ByFzyT.mjs.map} +1 -1
- package/dist/{index-BvH9bNl_.d.mts → index-0qfR8_db.d.mts} +17 -17
- package/dist/{index-BvH9bNl_.d.mts.map → index-0qfR8_db.d.mts.map} +1 -1
- package/dist/index-reference-BVkoanQn.d.mts +1 -0
- package/dist/{index-reference-4wsdeB7v-DCwswK-q.d.mts → index-reference-YHvh6wAL-BAhOS7RC.d.mts} +3 -3
- package/dist/{index-reference-4wsdeB7v-DCwswK-q.d.mts.map → index-reference-YHvh6wAL-BAhOS7RC.d.mts.map} +1 -1
- package/dist/middleware-DYiOUIpn.d.mts +1 -0
- package/dist/{middleware-DHkW6pRr-DM6hd9iZ.d.mts → middleware-JfHt_Ax8-DKXbos9y.d.mts} +3 -3
- package/dist/{middleware-DHkW6pRr-DM6hd9iZ.d.mts.map → middleware-JfHt_Ax8-DKXbos9y.d.mts.map} +1 -1
- package/dist/{middleware-yBAfiVWn-DZO0vCRQ.mjs → middleware-qY3R0WsS-8GWtk_Bf.mjs} +3 -3
- package/dist/{middleware-yBAfiVWn-DZO0vCRQ.mjs.map → middleware-qY3R0WsS-8GWtk_Bf.mjs.map} +1 -1
- package/dist/{migration-D7inCpXQ.d.mts → migration-qalbcIUs.d.mts} +2 -2
- package/dist/{migration-D7inCpXQ.d.mts.map → migration-qalbcIUs.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +17 -17
- package/dist/orm-client.mjs +6 -6
- package/dist/{pack-CNrW7w8L.mjs → pack-DOTaBfUC.mjs} +2 -2
- package/dist/{pack-CNrW7w8L.mjs.map → pack-DOTaBfUC.mjs.map} +1 -1
- package/dist/{plan-Cr4azjnG-CuL8FqXC.d.mts → plan-CMqVpPq6-Bllx5Zpk.d.mts} +3 -3
- package/dist/{plan-Cr4azjnG-CuL8FqXC.d.mts.map → plan-CMqVpPq6-Bllx5Zpk.d.mts.map} +1 -1
- package/dist/plan-Cg0h96GD.d.mts +2 -0
- package/dist/{query-lane-context-BCEoKy0_-CzmyavC9.d.mts → query-lane-context-DLSXDsDK-pEiQmuYy.d.mts} +5 -5
- package/dist/{query-lane-context-BCEoKy0_-CzmyavC9.d.mts.map → query-lane-context-DLSXDsDK-pEiQmuYy.d.mts.map} +1 -1
- package/dist/query-lane-context-Dqs5qCXx.d.mts +1 -0
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +5 -5
- 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 +3 -3
- package/dist/relational-core__ast.mjs +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- 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 +1 -1
- 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 +1 -1
- 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__middleware.mjs +1 -1
- 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-execution-plan-3uxYjHyu-DLknM-Pj.d.mts → sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts} +3 -3
- package/dist/sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-D29jmVE-.d.mts → transaction-state-DR3nKTmH-BIKF_fP6.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-D29jmVE-.d.mts.map → transaction-state-DR3nKTmH-BIKF_fP6.d.mts.map} +1 -1
- package/dist/{types-NTQsD2MS-xcLtvKO9.mjs → types-BkTuhW3Z-BJfTjcxS.mjs} +3 -5
- package/dist/{types-NTQsD2MS-xcLtvKO9.mjs.map → types-BkTuhW3Z-BJfTjcxS.mjs.map} +1 -1
- package/dist/{types-COXfSNOP-GD5gtZcQ.d.mts → types-COXfSNOP-DcuULeD9.d.mts} +2 -2
- package/dist/{types-COXfSNOP-GD5gtZcQ.d.mts.map → types-COXfSNOP-DcuULeD9.d.mts.map} +1 -1
- package/dist/types-CvmPNREJ.d.mts +1 -0
- package/dist/{types-TXO7x1BA-CYYIY8NI.d.mts → types-NgqqVAo5-Be_uYGQx.d.mts} +6 -6
- package/dist/{types-TXO7x1BA-CYYIY8NI.d.mts.map → types-NgqqVAo5-Be_uYGQx.d.mts.map} +1 -1
- package/dist/{types-DriMIMNQ-BkbsW7w3.d.mts → types-ijhejJhK-EdACW3bY.d.mts} +5 -8
- package/dist/{types-DriMIMNQ-BkbsW7w3.d.mts.map → types-ijhejJhK-EdACW3bY.d.mts.map} +1 -1
- package/dist/{util-BBgcP3gI-CpL-0VuC.mjs → util-DixeJBri-Cad7x5ec.mjs} +5 -7
- package/dist/{util-BBgcP3gI-CpL-0VuC.mjs.map → util-DixeJBri-Cad7x5ec.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/collection-methods-BB8YH69u.d.mts +0 -1
- package/dist/expression-CieaNuRM-B1uVqxwd.d.mts.map +0 -1
- package/dist/expression-D8HstQiB.d.mts +0 -2
- package/dist/index-reference-D8ewQRJr.d.mts +0 -1
- package/dist/middleware-gqy3l13N.d.mts +0 -1
- package/dist/plan-Di6Gs2JD.d.mts +0 -2
- package/dist/query-lane-context-VqH0mS9B.d.mts +0 -1
- package/dist/sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts.map +0 -1
- package/dist/types-B9wSEUsV.d.mts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as AnyExpression } from "./types-
|
|
2
|
-
import { o as Expression, x as ScopeField } from "./expression-
|
|
3
|
-
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-
|
|
1
|
+
import { c as AnyExpression } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
2
|
+
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
3
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-BWRsWR6O.d.mts
|
|
4
4
|
//#region src/expression-impl.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.
|
|
@@ -19,4 +19,4 @@ declare class ExpressionImpl<T extends ScopeField = ScopeField> implements Expre
|
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ExpressionImpl as t };
|
|
22
|
-
//# sourceMappingURL=expression-
|
|
22
|
+
//# sourceMappingURL=expression-BWRsWR6O-BrUVz0V2.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expression-BWRsWR6O-BrUVz0V2.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-BWRsWR6O.d.mts"],"mappings":";;;;;;;;;;;cAUc,eAAe,UAAU,aAAa,uBAAuB,WAAW;mBACnE;mBACA;WACR,YAAY;EACrB,YAAY,KAAK,eAAe,YAAY,GAAG,gBAAgB;EAC/D,YAAY;EACZ,sBAAsB"}
|
|
@@ -2,12 +2,12 @@ import { l as SqlStorage } from "./sql-storage-DeCAh5Hi-CEM-m8cs.mjs";
|
|
|
2
2
|
import { w as QueryOperationReturn } from "./types-DfKvtJwS-CrpWTGBJ.mjs";
|
|
3
3
|
import "./types-CkAd8SWm.mjs";
|
|
4
4
|
import { t as SqlLoweringSpec } from "./index-Nqc3OHR_.mjs";
|
|
5
|
-
import { At as RawQueryColumn, E as CodecRef$1, Mt as RawSqlLiteral, c as AnyExpression, kt as RawQueryAst, wt as ParamRef } from "./types-
|
|
5
|
+
import { At as RawQueryColumn, E as CodecRef$1, Mt as RawSqlLiteral, c as AnyExpression, kt as RawQueryAst, wt as ParamRef } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
6
6
|
import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
7
|
-
import { n as SqlQueryPlan } from "./plan-
|
|
7
|
+
import { n as SqlQueryPlan } from "./plan-CMqVpPq6-Bllx5Zpk.mjs";
|
|
8
8
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
9
9
|
import { ParamSpec } from "@prisma/orm-framework/operations";
|
|
10
|
-
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-
|
|
10
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-C3F6gxZH.d.mts
|
|
11
11
|
//#region src/expression.d.ts
|
|
12
12
|
type ScopeField = {
|
|
13
13
|
codecId: string;
|
|
@@ -275,4 +275,4 @@ declare function createRawSql(adapter: RawCodecInferer, planContext: RawPlanCont
|
|
|
275
275
|
declare function createRawSql(adapter: RawCodecInferer): RawSqlTag;
|
|
276
276
|
//#endregion
|
|
277
277
|
export { TraitExpression as C, isExpression as D, createRawSql as E, param as O, StorageColumnScopeField as S, codecOf as T, RawSqlStatementBuilder as _, CodecValue as a, ScalarListExpression as b, RawAffectedCountQuery as c, RawRow as d, RawRowQuery as f, RawSqlInterpolation as g, RawSqlBuilder as h, CodecTypesBase as i, toExpr as k, RawCodecInferer as l, RawRowSpecEntry as m, BuildOperationSpec as n, Expression as o, RawRowSpec as p, CodecExpression as r, NoReservedRowColumn as s, AffectedCount as t, RawPlanContext as u, RawSqlStatementTag as v, buildOperation as w, ScopeField as x, RawSqlTag as y };
|
|
278
|
-
//# sourceMappingURL=expression-
|
|
278
|
+
//# sourceMappingURL=expression-C3F6gxZH-DrYNeDbh.d.mts.map
|
package/dist/{expression-6ld_ZQL6-fOuazzzm.d.mts.map → expression-C3F6gxZH-DrYNeDbh.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-
|
|
1
|
+
{"version":3,"file":"expression-C3F6gxZH-DrYNeDbh.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-C3F6gxZH.d.mts"],"mappings":";;;;;;;;;;;KAQK;EACH;EACA;;;;;;;;EAQA;;;;EAIA,QAAQ;;;KAGL,wBAAwB;WAClB;WACA;;EAET,SAAS;EACT,UAAU;KACP;EACH;;EAEA;IACE;KACC,iBAAiB;WACX;WACA;;;;;KAKN,WAAW,UAAU,cAAc;WAC7B,YAAY;EACrB,YAAY;;KAET,kBAAkB,WAAW;WACvB;IACP,+CAA+C,WAAW,cAAc,GAAG;WACpE,cAAc;KACpB,iCAAiC,KAAK,2BAA2B;KACjE,WAAW,KAAK;;;;;KAKhB,WAAW,wBAAwB,0BAA0B,WAAW;WAClE;OACJ,sBAAsB,KAAK,GAAG,6BAA6B,WAAW;;;;;;;;;;;;;;;KAexE,gBAAgB,wBAAwB,0BAA0B,WAAW;WACvE;MACL;EACJ,SAAS;EACT,UAAU;EACV;KAC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AAuB;;;;;;;;iBAQjC,aAAa,SAAS,iBAAiB,aAAa,iBAAiB;iBACrE,aAAa,SAAS,kBAAkB"}
|
package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs → expression-impl-DtbmFnnz-CUKzBisY.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-
|
|
1
|
+
import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
2
|
import { t as planFromAst } from "./plan-Dh0LbYIv-ubBSdUgl.mjs";
|
|
3
3
|
import { runtimeError } from "@prisma/orm-framework/components/runtime";
|
|
4
4
|
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
5
|
-
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-
|
|
5
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-DtbmFnnz.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Resolve a raw value or an Expression into an AST expression node.
|
|
8
8
|
*
|
|
@@ -168,4 +168,4 @@ var ExpressionImpl = class {
|
|
|
168
168
|
//#endregion
|
|
169
169
|
export { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };
|
|
170
170
|
|
|
171
|
-
//# sourceMappingURL=expression-impl-
|
|
171
|
+
//# sourceMappingURL=expression-impl-DtbmFnnz-CUKzBisY.mjs.map
|
package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs.map → expression-impl-DtbmFnnz-CUKzBisY.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-impl-B-XNINxr-BhN2sysZ.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-B-XNINxr.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-NTQsD2MS.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/expression.ts\n/**\n* Resolve a raw value or an Expression into an AST expression node.\n*\n* When `value` is an object with a callable `buildAst`, the AST it wraps is returned. Otherwise the value is embedded as a ParamRef tagged with the caller-supplied {@link CodecRef} (when known). The runtime resolves the ref via `contractCodecs.forCodecRef(codec)`; content-keyed memoisation collapses repeated lookups for the same logical column onto one shared codec.\n*\n* Operation implementations that compare a column-bound expression to a user value derive the column's {@link CodecRef} from the column-bound side (via {@link codecOf}) and forward it here so encode-side dispatch resolves to the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction toExpr(value, codec) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_CODEC_REQUIRED\", `Cannot construct a ParamRef for a ${value === null ? \"null\" : typeof value} value without an explicit codec. Provide a CodecRef at the call site or use a column-bound builder path.`);\n\treturn ParamRef.of(value, { codec });\n}\n/**\n* Construct a `ParamRef` for a value whose codec identity is known at call time. Use this when interpolating a value into a raw SQL expression and the codec cannot be inferred from context — e.g. `param(myDate, { codecId: 'pg/timestamptz-temporal@1' })`.\n*/\nfunction param(value, opts) {\n\treturn ParamRef.of(value, { codec: { codecId: opts.codecId } });\n}\n/**\n* Derive the {@link CodecRef} carried by an expression-like value.\n*\n* Resolution order:\n* 1. `wrapper.returnType.codec` — scope-level codec when the scope was built from contract storage.\n* 2. `{ codecId: wrapper.returnType.codecId }` — minimal ref derived from the expression's declared codec id (covers synthetic expressions like `count()` whose returnType has a known codec id but no explicit column binding).\n*\n* Returns `undefined` for raw scalar values (non-expression-like).\n*/\nfunction codecOf(value) {\n\tif (!isExpression(value)) return void 0;\n\treturn value.returnType?.codec ?? (value.returnType?.codecId ? { codecId: value.returnType.codecId } : void 0);\n}\nfunction isExpression(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\";\n}\n/**\n* Construct an OperationExpr AST node and wrap it as a typed Expression. Operation implementations use this to turn their user-facing arguments into the AST node the compilation pipeline eventually lowers to SQL.\n*/\nfunction buildOperation(spec) {\n\tconst [self, ...rest] = spec.args;\n\tconst op = new OperationExpr({\n\t\tmethod: spec.method,\n\t\tself,\n\t\targs: rest.length > 0 ? rest : void 0,\n\t\treturns: spec.returns,\n\t\tlowering: spec.lowering\n\t});\n\treturn {\n\t\treturnType: spec.returns,\n\t\tbuildAst: () => op\n\t};\n}\nfunction resolveInterpolation(adapter, value) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (value instanceof ParamRef) return value;\n\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"string\" || typeof value === \"boolean\" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });\n\tthrow runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\");\n}\nfunction isRawRowQuery(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\" && \"build\" in value && typeof value.build === \"function\";\n}\nfunction templateParts(adapter, strings, values) {\n\tconst parts = [strings[0] ?? \"\"];\n\tvalues.forEach((value, i) => {\n\t\tif (isRawRowQuery(value)) parts.push(...value.buildAst().parts);\n\t\telse parts.push(resolveInterpolation(adapter, value));\n\t\tparts.push(strings[i + 1] ?? \"\");\n\t});\n\treturn parts;\n}\n/**\n* Normalizes each authored entry to a {@link RawQueryColumn}. The record is\n* assembled with `Object.fromEntries`, which defines each key as an own\n* property: a spec built at runtime with a `__proto__` key reaches the AST,\n* which refuses it by name, rather than silently setting the record's\n* prototype and leaving the column to vanish.\n*/\nfunction resolveRowSpec(spec) {\n\treturn Object.fromEntries(Object.entries(spec).map(([name, entry]) => [name, typeof entry === \"string\" ? {\n\t\tcodecId: entry,\n\t\tnullable: false\n\t} : {\n\t\tcodecId: entry.codecId,\n\t\tnullable: entry.nullable ?? false\n\t}]));\n}\nfunction createRawSql(adapter, planContext) {\n\tif (planContext === void 0) return (strings, ...values) => new RawSqlBuilderImpl(templateParts(adapter, strings, values));\n\tconst context = planContext;\n\treturn (strings, ...values) => new RawSqlStatementBuilderImpl(templateParts(adapter, strings, values), context);\n}\nvar RawSqlBuilderImpl = class {\n\tparts;\n\tconstructor(parts) {\n\t\tthis.parts = parts;\n\t}\n\treturns(spec) {\n\t\tconst codecId = typeof spec === \"string\" ? spec : spec.codecId;\n\t\tconst nullable = typeof spec === \"string\" ? false : spec.nullable ?? false;\n\t\tconst paramSpec = {\n\t\t\tcodecId,\n\t\t\tnullable\n\t\t};\n\t\tconst node = new RawExpr({\n\t\t\tparts: this.parts,\n\t\t\treturns: paramSpec\n\t\t});\n\t\treturn {\n\t\t\treturnType: {\n\t\t\t\tcodecId,\n\t\t\t\tnullable\n\t\t\t},\n\t\t\tbuildAst: () => node\n\t\t};\n\t}\n};\nvar RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {\n\tplanContext;\n\tconstructor(parts, planContext) {\n\t\tsuper(parts);\n\t\tthis.planContext = planContext;\n\t}\n\treturnsRow(spec) {\n\t\tconst node = RawQueryAst.rows(this.parts, resolveRowSpec(spec));\n\t\tconst result = node.result;\n\t\tinvariant(result.kind === \"rows\", \"RawQueryAst.rows built a non-rows result\");\n\t\treturn {\n\t\t\treturns: result.columns,\n\t\t\tbuildAst: () => node,\n\t\t\tbuild: () => this.planFor(node)\n\t\t};\n\t}\n\taffectedCount() {\n\t\tconst node = RawQueryAst.affectedCount(this.parts);\n\t\treturn { build: () => this.planFor(node) };\n\t}\n\tplanFor(node) {\n\t\treturn planFromAst(node, this.planContext.contract, this.planContext.laneId);\n\t}\n};\n//#endregion\n//#region src/expression-impl.ts\n/**\n* Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.\n*\n* `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.\n*\n* `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.\n*/\nvar ExpressionImpl = class {\n\tast;\n\tprojectionAst;\n\treturnType;\n\tconstructor(ast, returnType, projectionAst) {\n\t\tthis.ast = ast;\n\t\tthis.returnType = returnType;\n\t\tthis.projectionAst = projectionAst;\n\t}\n\tbuildAst() {\n\t\treturn this.ast;\n\t}\n\tbuildProjectionAst() {\n\t\treturn this.projectionAst ?? this.ast;\n\t}\n};\n//#endregion\nexport { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };\n\n//# sourceMappingURL=expression-impl-B-XNINxr.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,OAAO,OAAO,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,IAAI,UAAU,KAAK,GAAG,MAAM,aAAa,oCAAoC,qCAAqC,UAAU,OAAO,SAAS,OAAO,MAAM,0GAA0G;CACnQ,OAAO,SAAS,GAAG,OAAO,EAAE,MAAM,CAAC;AACpC;;;;AAIA,SAAS,MAAM,OAAO,MAAM;CAC3B,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;;;;;;;;;;AAUA,SAAS,QAAQ,OAAO;CACvB,IAAI,CAAC,aAAa,KAAK,GAAG,OAAO,KAAK;CACtC,OAAO,MAAM,YAAY,UAAU,MAAM,YAAY,UAAU,EAA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aAAa,KAAK,QAAQ,IAAI,EAAE;CAC1C;CACA,QAAQ,MAAM;EACb,OAAO,YAAY,MAAM,KAAK,YAAY,UAAU,KAAK,YAAY,MAAM;CAC5E;AACD;;;;;;;;AAUA,IAAI,iBAAiB,MAAM;CAC1B;CACA;CACA;CACA,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
|
|
1
|
+
{"version":3,"file":"expression-impl-DtbmFnnz-CUKzBisY.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-DtbmFnnz.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-BkTuhW3Z.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/expression.ts\n/**\n* Resolve a raw value or an Expression into an AST expression node.\n*\n* When `value` is an object with a callable `buildAst`, the AST it wraps is returned. Otherwise the value is embedded as a ParamRef tagged with the caller-supplied {@link CodecRef} (when known). The runtime resolves the ref via `contractCodecs.forCodecRef(codec)`; content-keyed memoisation collapses repeated lookups for the same logical column onto one shared codec.\n*\n* Operation implementations that compare a column-bound expression to a user value derive the column's {@link CodecRef} from the column-bound side (via {@link codecOf}) and forward it here so encode-side dispatch resolves to the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction toExpr(value, codec) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_CODEC_REQUIRED\", `Cannot construct a ParamRef for a ${value === null ? \"null\" : typeof value} value without an explicit codec. Provide a CodecRef at the call site or use a column-bound builder path.`);\n\treturn ParamRef.of(value, { codec });\n}\n/**\n* Construct a `ParamRef` for a value whose codec identity is known at call time. Use this when interpolating a value into a raw SQL expression and the codec cannot be inferred from context — e.g. `param(myDate, { codecId: 'pg/timestamptz-temporal@1' })`.\n*/\nfunction param(value, opts) {\n\treturn ParamRef.of(value, { codec: { codecId: opts.codecId } });\n}\n/**\n* Derive the {@link CodecRef} carried by an expression-like value.\n*\n* Resolution order:\n* 1. `wrapper.returnType.codec` — scope-level codec when the scope was built from contract storage.\n* 2. `{ codecId: wrapper.returnType.codecId }` — minimal ref derived from the expression's declared codec id (covers synthetic expressions like `count()` whose returnType has a known codec id but no explicit column binding).\n*\n* Returns `undefined` for raw scalar values (non-expression-like).\n*/\nfunction codecOf(value) {\n\tif (!isExpression(value)) return void 0;\n\treturn value.returnType?.codec ?? (value.returnType?.codecId ? { codecId: value.returnType.codecId } : void 0);\n}\nfunction isExpression(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\";\n}\n/**\n* Construct an OperationExpr AST node and wrap it as a typed Expression. Operation implementations use this to turn their user-facing arguments into the AST node the compilation pipeline eventually lowers to SQL.\n*/\nfunction buildOperation(spec) {\n\tconst [self, ...rest] = spec.args;\n\tconst op = new OperationExpr({\n\t\tmethod: spec.method,\n\t\tself,\n\t\targs: rest.length > 0 ? rest : void 0,\n\t\treturns: spec.returns,\n\t\tlowering: spec.lowering\n\t});\n\treturn {\n\t\treturnType: spec.returns,\n\t\tbuildAst: () => op\n\t};\n}\nfunction resolveInterpolation(adapter, value) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (value instanceof ParamRef) return value;\n\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"string\" || typeof value === \"boolean\" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });\n\tthrow runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\");\n}\nfunction isRawRowQuery(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\" && \"build\" in value && typeof value.build === \"function\";\n}\nfunction templateParts(adapter, strings, values) {\n\tconst parts = [strings[0] ?? \"\"];\n\tvalues.forEach((value, i) => {\n\t\tif (isRawRowQuery(value)) parts.push(...value.buildAst().parts);\n\t\telse parts.push(resolveInterpolation(adapter, value));\n\t\tparts.push(strings[i + 1] ?? \"\");\n\t});\n\treturn parts;\n}\n/**\n* Normalizes each authored entry to a {@link RawQueryColumn}. The record is\n* assembled with `Object.fromEntries`, which defines each key as an own\n* property: a spec built at runtime with a `__proto__` key reaches the AST,\n* which refuses it by name, rather than silently setting the record's\n* prototype and leaving the column to vanish.\n*/\nfunction resolveRowSpec(spec) {\n\treturn Object.fromEntries(Object.entries(spec).map(([name, entry]) => [name, typeof entry === \"string\" ? {\n\t\tcodecId: entry,\n\t\tnullable: false\n\t} : {\n\t\tcodecId: entry.codecId,\n\t\tnullable: entry.nullable ?? false\n\t}]));\n}\nfunction createRawSql(adapter, planContext) {\n\tif (planContext === void 0) return (strings, ...values) => new RawSqlBuilderImpl(templateParts(adapter, strings, values));\n\tconst context = planContext;\n\treturn (strings, ...values) => new RawSqlStatementBuilderImpl(templateParts(adapter, strings, values), context);\n}\nvar RawSqlBuilderImpl = class {\n\tparts;\n\tconstructor(parts) {\n\t\tthis.parts = parts;\n\t}\n\treturns(spec) {\n\t\tconst codecId = typeof spec === \"string\" ? spec : spec.codecId;\n\t\tconst nullable = typeof spec === \"string\" ? false : spec.nullable ?? false;\n\t\tconst paramSpec = {\n\t\t\tcodecId,\n\t\t\tnullable\n\t\t};\n\t\tconst node = new RawExpr({\n\t\t\tparts: this.parts,\n\t\t\treturns: paramSpec\n\t\t});\n\t\treturn {\n\t\t\treturnType: {\n\t\t\t\tcodecId,\n\t\t\t\tnullable\n\t\t\t},\n\t\t\tbuildAst: () => node\n\t\t};\n\t}\n};\nvar RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {\n\tplanContext;\n\tconstructor(parts, planContext) {\n\t\tsuper(parts);\n\t\tthis.planContext = planContext;\n\t}\n\treturnsRow(spec) {\n\t\tconst node = RawQueryAst.rows(this.parts, resolveRowSpec(spec));\n\t\tconst result = node.result;\n\t\tinvariant(result.kind === \"rows\", \"RawQueryAst.rows built a non-rows result\");\n\t\treturn {\n\t\t\treturns: result.columns,\n\t\t\tbuildAst: () => node,\n\t\t\tbuild: () => this.planFor(node)\n\t\t};\n\t}\n\taffectedCount() {\n\t\tconst node = RawQueryAst.affectedCount(this.parts);\n\t\treturn { build: () => this.planFor(node) };\n\t}\n\tplanFor(node) {\n\t\treturn planFromAst(node, this.planContext.contract, this.planContext.laneId);\n\t}\n};\n//#endregion\n//#region src/expression-impl.ts\n/**\n* Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.\n*\n* `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.\n*\n* `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.\n*/\nvar ExpressionImpl = class {\n\tast;\n\tprojectionAst;\n\treturnType;\n\tconstructor(ast, returnType, projectionAst) {\n\t\tthis.ast = ast;\n\t\tthis.returnType = returnType;\n\t\tthis.projectionAst = projectionAst;\n\t}\n\tbuildAst() {\n\t\treturn this.ast;\n\t}\n\tbuildProjectionAst() {\n\t\treturn this.projectionAst ?? this.ast;\n\t}\n};\n//#endregion\nexport { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };\n\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GACA;EACD;EACA,MAAM,OAAO,IAAI,QAAQ;GACxB,OAAO,KAAK;GACZ,SAAS;EACV,CAAC;EACD,OAAO;GACN,YAAY;IACX;IACA;GACD;GACA,gBAAgB;EACjB;CACD;AACD;AACA,IAAI,6BAA6B,cAAc,kBAAkB;CAChE;CACA,YAAY,OAAO,aAAa;EAC/B,MAAM,KAAK;EACX,KAAK,cAAc;CACpB;CACA,WAAW,MAAM;EAChB,MAAM,OAAO,YAAY,KAAK,KAAK,OAAO,eAAe,IAAI,CAAC;EAC9D,MAAM,SAAS,KAAK;EACpB,UAAU,OAAO,SAAS,QAAQ,0CAA0C;EAC5E,OAAO;GACN,SAAS,OAAO;GAChB,gBAAgB;GAChB,aAAa,KAAK,QAAQ,IAAI;EAC/B;CACD;CACA,gBAAgB;EACf,MAAM,OAAO,YAAY,cAAc,KAAK,KAAK;EACjD,OAAO,EAAE,aAAa,KAAK,QAAQ,IAAI,EAAE;CAC1C;CACA,QAAQ,MAAM;EACb,OAAO,YAAY,MAAM,KAAK,YAAY,UAAU,KAAK,YAAY,MAAM;CAC5E;AACD;;;;;;;;AAUA,IAAI,iBAAiB,MAAM;CAC1B;CACA;CACA;CACA,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-DCqtmnSU.mjs";
|
|
2
2
|
import { h as checkSqlDefaultText } from "./validators-FJs8HvFr.mjs";
|
|
3
|
-
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-
|
|
4
|
-
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-
|
|
3
|
+
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-C_rrUuhb.mjs";
|
|
4
|
+
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-DcuULeD9.mjs";
|
|
5
5
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-tqHKiJ88.mjs";
|
|
6
|
-
import { $ as SubjectStorage, $t as sqlOfSlot, A as NoTable, At as isUnfilledSlot, B as SingleOperationCall, Bt as readColumnDefault, C as MigrationPlannerConflict, Ct as detectDestructiveChanges, D as NO_RENAMED_ORIGINS, Dt as fieldOfColumn, E as ModelTable, Et as fieldEventStorage, F as ReportedBody, Ft as planFieldEventCalls, G as SqlPslBuildContext, Gt as resolveColumnRenameAgainst, H as SqlControlTargetDescriptor, Ht as requiredColumnMeta, I as ReportedLiteralDefault, It as planFieldEventOperations, J as SqlSlot, Jt as rowsWithoutValueSummary, K as SqlQuote, Kt as resolveTableRenameAgainst, L as RequiredColumn, Lt as planStatements, M as PlannedStatements, Mt as otherSpaceDeclaring, N as ReadColumnDefault, Nt as partitionCallsByControlPolicy, O as NamespaceRename, Ot as fieldRenameStorageEffect, P as ReadReportedDefault, Pt as partitionIssuesByControlPolicy, Q as StatementPlanningTarget, Qt as sqlDefaultFunctions, R as RequiredColumnMark, Rt as plannerFailure, S as MigrationPlanner, St as createSqlTextSources, T as ModelStorageEffect, Tt as extractCodecControlHooks, U as SqlDefaultFunctionName, Ut as requiredColumnOf, V as SqlControlFamilyInstance, Vt as readReportedDefault, W as SqlDescribedContractSpace, Wt as requiredColumnsOfMigration, X as StatementColumn, Xt as runnerSuccess, Y as SqlTextSources, Yt as runnerFailure, Z as StatementOwnership, Zt as slotSource, _ as INIT_ADDITIVE_POLICY, _t as contractNamespaceToSchemaIR, a as ColumnRename, an as unmatchedColumnRename, at as TableRenameByHand, b as MigrationPlan, bt as convertedColumnOf, c as ContractColumns, ct as TargetRefusal, d as ConvertedColumn, dt as appliedStatementsInOrder, en as sqlTypeLookupsOf, et as SuppressionRecord, f as DefaultResolver, ft as assembleAuthoringContributions, g as FieldStorageEffect, gt as contractColumns, h as FieldStatementColumns, ht as columnTakesTemporaryValue, i as ColumnOnOneSide, in as unknownCallNames, it as TableRename, j as PlanFieldEventOperationsOptions, jt as modelRenameStorageEffect, k as NamespaceStatementTarget, kt as fieldStatementColumns, l as ContractToSchemaIROptions, lt as WorkingSchemaOrigins, m as FieldEventCall, mt as checkSqlExpressionText, n as CallSubjects, nn as subjectsOfCalls, nt as TableMove, o as ColumnRenameRequest, on as unmatchedTableRename, ot as TableRenameRequest, p as DefaultResolverColumn, pt as backfillOfDefaultedField, q as SqlQuotingRules, qt as rowsWithoutValueFailure, r as CallWithCompanions, rn as unconvertedFieldOf, rt as TableNameCaseGuardTable, s as ContractColumn, st as TargetMigrationsCapability, t as COLUMN_RENAME_UNMATCHED_CODE, tn as storageNameOfOperation, tt as TABLE_NAME_CASE_CHANGED_CODE, u as ControlPolicySubject, v as MigrationOperationClass, vt as contractToSchemaIR, w as MigrationPlannerResult, wt as detectTableNameCaseChanges, x as MigrationPlanOperation, xt as createMigrationPlan, y as MigrationOperationPolicy, yt as convertedColumnMeta, z as SchemaTables, zt as plannerSuccess } from "./control-
|
|
7
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
8
|
-
import { a as VerifySqlSchemaByDiffInput, c as classifySqlDiffIssue, d as verifySqlSchemaByDiff, i as StorageTypeVerdictInput, l as computeSqlDiffVerdict, n as SqlDiffVerdictInput, o as arraysEqual, r as StorageTypeVerdict, s as classifyDiffSubjectGranularity, t as SqlDiffVerdict, u as computeStorageTypeVerdict } from "./diff-
|
|
6
|
+
import { $ as SubjectStorage, $t as sqlOfSlot, A as NoTable, At as isUnfilledSlot, B as SingleOperationCall, Bt as readColumnDefault, C as MigrationPlannerConflict, Ct as detectDestructiveChanges, D as NO_RENAMED_ORIGINS, Dt as fieldOfColumn, E as ModelTable, Et as fieldEventStorage, F as ReportedBody, Ft as planFieldEventCalls, G as SqlPslBuildContext, Gt as resolveColumnRenameAgainst, H as SqlControlTargetDescriptor, Ht as requiredColumnMeta, I as ReportedLiteralDefault, It as planFieldEventOperations, J as SqlSlot, Jt as rowsWithoutValueSummary, K as SqlQuote, Kt as resolveTableRenameAgainst, L as RequiredColumn, Lt as planStatements, M as PlannedStatements, Mt as otherSpaceDeclaring, N as ReadColumnDefault, Nt as partitionCallsByControlPolicy, O as NamespaceRename, Ot as fieldRenameStorageEffect, P as ReadReportedDefault, Pt as partitionIssuesByControlPolicy, Q as StatementPlanningTarget, Qt as sqlDefaultFunctions, R as RequiredColumnMark, Rt as plannerFailure, S as MigrationPlanner, St as createSqlTextSources, T as ModelStorageEffect, Tt as extractCodecControlHooks, U as SqlDefaultFunctionName, Ut as requiredColumnOf, V as SqlControlFamilyInstance, Vt as readReportedDefault, W as SqlDescribedContractSpace, Wt as requiredColumnsOfMigration, X as StatementColumn, Xt as runnerSuccess, Y as SqlTextSources, Yt as runnerFailure, Z as StatementOwnership, Zt as slotSource, _ as INIT_ADDITIVE_POLICY, _t as contractNamespaceToSchemaIR, a as ColumnRename, an as unmatchedColumnRename, at as TableRenameByHand, b as MigrationPlan, bt as convertedColumnOf, c as ContractColumns, ct as TargetRefusal, d as ConvertedColumn, dt as appliedStatementsInOrder, en as sqlTypeLookupsOf, et as SuppressionRecord, f as DefaultResolver, ft as assembleAuthoringContributions, g as FieldStorageEffect, gt as contractColumns, h as FieldStatementColumns, ht as columnTakesTemporaryValue, i as ColumnOnOneSide, in as unknownCallNames, it as TableRename, j as PlanFieldEventOperationsOptions, jt as modelRenameStorageEffect, k as NamespaceStatementTarget, kt as fieldStatementColumns, l as ContractToSchemaIROptions, lt as WorkingSchemaOrigins, m as FieldEventCall, mt as checkSqlExpressionText, n as CallSubjects, nn as subjectsOfCalls, nt as TableMove, o as ColumnRenameRequest, on as unmatchedTableRename, ot as TableRenameRequest, p as DefaultResolverColumn, pt as backfillOfDefaultedField, q as SqlQuotingRules, qt as rowsWithoutValueFailure, r as CallWithCompanions, rn as unconvertedFieldOf, rt as TableNameCaseGuardTable, s as ContractColumn, st as TargetMigrationsCapability, t as COLUMN_RENAME_UNMATCHED_CODE, tn as storageNameOfOperation, tt as TABLE_NAME_CASE_CHANGED_CODE, u as ControlPolicySubject, v as MigrationOperationClass, vt as contractToSchemaIR, w as MigrationPlannerResult, wt as detectTableNameCaseChanges, x as MigrationPlanOperation, xt as createMigrationPlan, y as MigrationOperationPolicy, yt as convertedColumnMeta, z as SchemaTables, zt as plannerSuccess } from "./control-C24G0Gx8.mjs";
|
|
7
|
+
import { t as resolveIntrospectedColumnType } from "./control-adapter-CZ84jQ_z.mjs";
|
|
8
|
+
import { a as VerifySqlSchemaByDiffInput, c as classifySqlDiffIssue, d as verifySqlSchemaByDiff, i as StorageTypeVerdictInput, l as computeSqlDiffVerdict, n as SqlDiffVerdictInput, o as arraysEqual, r as StorageTypeVerdict, s as classifyDiffSubjectGranularity, t as SqlDiffVerdict, u as computeStorageTypeVerdict } from "./diff-FNTO8gbI.mjs";
|
|
9
9
|
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-BvptQsFW.mjs";
|
|
10
|
-
import { t as SqlMigration } from "./migration-
|
|
10
|
+
import { t as SqlMigration } from "./migration-qalbcIUs.mjs";
|
|
11
11
|
import { a as temporalCodecPresetWithPrecision, i as sqlTargetTypeConstructors, o as temporalStringAuthoringPresets, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-DA8HZ2mo.mjs";
|
|
12
12
|
import { a as writeDefaultLiteral, i as writeDataTypeValue, n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CAOONlKQ-4m07nb-O.mjs";
|
|
13
13
|
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as writtenTypeArguments, n as GeneratorCallRefusal, o as IntrospectedTable, p as toEnumMemberName, r as GeneratorCallsResult, s as PhaseCallText, t as ColumnTypeOf, u as generatorCallsFor } from "./psl-build-RelubU2E.mjs";
|
package/dist/family.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-BHLQsOza.mjs";
|
|
2
2
|
import { n as checkSqlDefaultText } from "./validators-BwA7ttZM.mjs";
|
|
3
|
-
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-Cg5QkM46-
|
|
3
|
+
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-Cg5QkM46-C1ByFzyT.mjs";
|
|
4
4
|
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue, s as extractCodecControlHooks } from "./schema-verify-C3wbdviw-DMjIubOr.mjs";
|
|
5
5
|
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs";
|
|
6
6
|
import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-DhKm6hB3.mjs";
|
|
7
|
-
import { $ as unmatchedColumnRename, A as planFieldEventOperations, B as resolveTableRenameAgainst, C as fieldStatementColumns, D as partitionCallsByControlPolicy, E as otherSpaceDeclaring, F as readReportedDefault, G as slotSource, H as rowsWithoutValueSummary, I as requiredColumnMeta, J as sqlTypeLookupsOf, K as sqlDefaultFunctions, L as requiredColumnOf, M as plannerFailure, N as plannerSuccess, O as partitionIssuesByControlPolicy, P as readColumnDefault, Q as unknownCallNames, R as requiredColumnsOfMigration, S as fieldRenameStorageEffect, T as modelRenameStorageEffect, U as runnerFailure, V as rowsWithoutValueFailure, W as runnerSuccess, X as subjectsOfCalls, Y as storageNameOfOperation, Z as unconvertedFieldOf, _ as createSqlTextSources, a as appliedStatementsInOrder, b as fieldEventStorage, c as checkSqlExpressionText, d as contractNamespaceToSchemaIR, et as unmatchedTableRename, f as contractToSchemaIR, g as createMigrationPlan, h as convertedColumnOf, i as TABLE_NAME_CASE_CHANGED_CODE, j as planStatements, k as planFieldEventCalls, l as columnTakesTemporaryValue, m as convertedColumnMeta, n as INIT_ADDITIVE_POLICY, o as assembleAuthoringContributions, q as sqlOfSlot, r as NO_RENAMED_ORIGINS, s as backfillOfDefaultedField, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractColumns, v as detectDestructiveChanges, w as isUnfilledSlot, x as fieldOfColumn, y as detectTableNameCaseChanges, z as resolveColumnRenameAgainst } from "./control-
|
|
7
|
+
import { $ as unmatchedColumnRename, A as planFieldEventOperations, B as resolveTableRenameAgainst, C as fieldStatementColumns, D as partitionCallsByControlPolicy, E as otherSpaceDeclaring, F as readReportedDefault, G as slotSource, H as rowsWithoutValueSummary, I as requiredColumnMeta, J as sqlTypeLookupsOf, K as sqlDefaultFunctions, L as requiredColumnOf, M as plannerFailure, N as plannerSuccess, O as partitionIssuesByControlPolicy, P as readColumnDefault, Q as unknownCallNames, R as requiredColumnsOfMigration, S as fieldRenameStorageEffect, T as modelRenameStorageEffect, U as runnerFailure, V as rowsWithoutValueFailure, W as runnerSuccess, X as subjectsOfCalls, Y as storageNameOfOperation, Z as unconvertedFieldOf, _ as createSqlTextSources, a as appliedStatementsInOrder, b as fieldEventStorage, c as checkSqlExpressionText, d as contractNamespaceToSchemaIR, et as unmatchedTableRename, f as contractToSchemaIR, g as createMigrationPlan, h as convertedColumnOf, i as TABLE_NAME_CASE_CHANGED_CODE, j as planStatements, k as planFieldEventCalls, l as columnTakesTemporaryValue, m as convertedColumnMeta, n as INIT_ADDITIVE_POLICY, o as assembleAuthoringContributions, q as sqlOfSlot, r as NO_RENAMED_ORIGINS, s as backfillOfDefaultedField, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractColumns, v as detectDestructiveChanges, w as isUnfilledSlot, x as fieldOfColumn, y as detectTableNameCaseChanges, z as resolveColumnRenameAgainst } from "./control-DQzNuCAM.mjs";
|
|
8
8
|
import { t as resolveIntrospectedColumnType } from "./control-adapter-SlQkTEwT.mjs";
|
|
9
9
|
import { t as arraysEqual } from "./diff-C1rFOhek.mjs";
|
|
10
10
|
import { t as SqlSchemaVerifierBase } from "./ir-DzsUDO8e.mjs";
|
|
11
11
|
import { t as SqlMigration } from "./migration-BJQjkqFz.mjs";
|
|
12
|
-
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets } from "./pack-
|
|
12
|
+
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets } from "./pack-DOTaBfUC.mjs";
|
|
13
13
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-D1CTmC3a.mjs";
|
|
14
14
|
import { a as mapDefault, c as writtenTypeArguments, i as inferredTypeConstructors, n as generatorCallsFor, o as writeDataTypeValue, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-DFBG6vhz.mjs";
|
|
15
15
|
import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer--g4i84Go.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-
|
|
2
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
1
|
+
import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-C_rrUuhb.mjs";
|
|
2
|
+
import { t as resolveIntrospectedColumnType } from "./control-adapter-CZ84jQ_z.mjs";
|
|
3
3
|
export { type ExecuteRequestLowerer, type Lowerer, type SqlControlAdapter, type SqlControlAdapterDescriptor, resolveIntrospectedColumnType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as checkSqlDefaultText } from "./validators-FJs8HvFr.mjs";
|
|
2
|
-
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-
|
|
2
|
+
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-DcuULeD9.mjs";
|
|
3
3
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-tqHKiJ88.mjs";
|
|
4
|
-
import { $ as SubjectStorage, $t as sqlOfSlot, A as NoTable, At as isUnfilledSlot, B as SingleOperationCall, Bt as readColumnDefault, C as MigrationPlannerConflict, Ct as detectDestructiveChanges, D as NO_RENAMED_ORIGINS, Dt as fieldOfColumn, E as ModelTable, Et as fieldEventStorage, F as ReportedBody, Ft as planFieldEventCalls, G as SqlPslBuildContext, Gt as resolveColumnRenameAgainst, H as SqlControlTargetDescriptor, Ht as requiredColumnMeta, I as ReportedLiteralDefault, It as planFieldEventOperations, J as SqlSlot, Jt as rowsWithoutValueSummary, K as SqlQuote, Kt as resolveTableRenameAgainst, L as RequiredColumn, Lt as planStatements, M as PlannedStatements, Mt as otherSpaceDeclaring, N as ReadColumnDefault, Nt as partitionCallsByControlPolicy, O as NamespaceRename, Ot as fieldRenameStorageEffect, P as ReadReportedDefault, Pt as partitionIssuesByControlPolicy, Q as StatementPlanningTarget, Qt as sqlDefaultFunctions, R as RequiredColumnMark, Rt as plannerFailure, S as MigrationPlanner, St as createSqlTextSources, T as ModelStorageEffect, Tt as extractCodecControlHooks, U as SqlDefaultFunctionName, Ut as requiredColumnOf, V as SqlControlFamilyInstance, Vt as readReportedDefault, W as SqlDescribedContractSpace, Wt as requiredColumnsOfMigration, X as StatementColumn, Xt as runnerSuccess, Y as SqlTextSources, Yt as runnerFailure, Z as StatementOwnership, Zt as slotSource, _ as INIT_ADDITIVE_POLICY, _t as contractNamespaceToSchemaIR, a as ColumnRename, an as unmatchedColumnRename, at as TableRenameByHand, b as MigrationPlan, bt as convertedColumnOf, c as ContractColumns, ct as TargetRefusal, d as ConvertedColumn, dt as appliedStatementsInOrder, en as sqlTypeLookupsOf, et as SuppressionRecord, f as DefaultResolver, ft as assembleAuthoringContributions, g as FieldStorageEffect, gt as contractColumns, h as FieldStatementColumns, ht as columnTakesTemporaryValue, i as ColumnOnOneSide, in as unknownCallNames, it as TableRename, j as PlanFieldEventOperationsOptions, jt as modelRenameStorageEffect, k as NamespaceStatementTarget, kt as fieldStatementColumns, l as ContractToSchemaIROptions, lt as WorkingSchemaOrigins, m as FieldEventCall, mt as checkSqlExpressionText, n as CallSubjects, nn as subjectsOfCalls, nt as TableMove, o as ColumnRenameRequest, on as unmatchedTableRename, ot as TableRenameRequest, p as DefaultResolverColumn, pt as backfillOfDefaultedField, q as SqlQuotingRules, qt as rowsWithoutValueFailure, r as CallWithCompanions, rn as unconvertedFieldOf, rt as TableNameCaseGuardTable, s as ContractColumn, st as TargetMigrationsCapability, t as COLUMN_RENAME_UNMATCHED_CODE, tn as storageNameOfOperation, tt as TABLE_NAME_CASE_CHANGED_CODE, u as ControlPolicySubject, ut as _default, v as MigrationOperationClass, vt as contractToSchemaIR, w as MigrationPlannerResult, wt as detectTableNameCaseChanges, x as MigrationPlanOperation, xt as createMigrationPlan, y as MigrationOperationPolicy, yt as convertedColumnMeta, z as SchemaTables, zt as plannerSuccess } from "./control-
|
|
4
|
+
import { $ as SubjectStorage, $t as sqlOfSlot, A as NoTable, At as isUnfilledSlot, B as SingleOperationCall, Bt as readColumnDefault, C as MigrationPlannerConflict, Ct as detectDestructiveChanges, D as NO_RENAMED_ORIGINS, Dt as fieldOfColumn, E as ModelTable, Et as fieldEventStorage, F as ReportedBody, Ft as planFieldEventCalls, G as SqlPslBuildContext, Gt as resolveColumnRenameAgainst, H as SqlControlTargetDescriptor, Ht as requiredColumnMeta, I as ReportedLiteralDefault, It as planFieldEventOperations, J as SqlSlot, Jt as rowsWithoutValueSummary, K as SqlQuote, Kt as resolveTableRenameAgainst, L as RequiredColumn, Lt as planStatements, M as PlannedStatements, Mt as otherSpaceDeclaring, N as ReadColumnDefault, Nt as partitionCallsByControlPolicy, O as NamespaceRename, Ot as fieldRenameStorageEffect, P as ReadReportedDefault, Pt as partitionIssuesByControlPolicy, Q as StatementPlanningTarget, Qt as sqlDefaultFunctions, R as RequiredColumnMark, Rt as plannerFailure, S as MigrationPlanner, St as createSqlTextSources, T as ModelStorageEffect, Tt as extractCodecControlHooks, U as SqlDefaultFunctionName, Ut as requiredColumnOf, V as SqlControlFamilyInstance, Vt as readReportedDefault, W as SqlDescribedContractSpace, Wt as requiredColumnsOfMigration, X as StatementColumn, Xt as runnerSuccess, Y as SqlTextSources, Yt as runnerFailure, Z as StatementOwnership, Zt as slotSource, _ as INIT_ADDITIVE_POLICY, _t as contractNamespaceToSchemaIR, a as ColumnRename, an as unmatchedColumnRename, at as TableRenameByHand, b as MigrationPlan, bt as convertedColumnOf, c as ContractColumns, ct as TargetRefusal, d as ConvertedColumn, dt as appliedStatementsInOrder, en as sqlTypeLookupsOf, et as SuppressionRecord, f as DefaultResolver, ft as assembleAuthoringContributions, g as FieldStorageEffect, gt as contractColumns, h as FieldStatementColumns, ht as columnTakesTemporaryValue, i as ColumnOnOneSide, in as unknownCallNames, it as TableRename, j as PlanFieldEventOperationsOptions, jt as modelRenameStorageEffect, k as NamespaceStatementTarget, kt as fieldStatementColumns, l as ContractToSchemaIROptions, lt as WorkingSchemaOrigins, m as FieldEventCall, mt as checkSqlExpressionText, n as CallSubjects, nn as subjectsOfCalls, nt as TableMove, o as ColumnRenameRequest, on as unmatchedTableRename, ot as TableRenameRequest, p as DefaultResolverColumn, pt as backfillOfDefaultedField, q as SqlQuotingRules, qt as rowsWithoutValueFailure, r as CallWithCompanions, rn as unconvertedFieldOf, rt as TableNameCaseGuardTable, s as ContractColumn, st as TargetMigrationsCapability, t as COLUMN_RENAME_UNMATCHED_CODE, tn as storageNameOfOperation, tt as TABLE_NAME_CASE_CHANGED_CODE, u as ControlPolicySubject, ut as _default, v as MigrationOperationClass, vt as contractToSchemaIR, w as MigrationPlannerResult, wt as detectTableNameCaseChanges, x as MigrationPlanOperation, xt as createMigrationPlan, y as MigrationOperationPolicy, yt as convertedColumnMeta, z as SchemaTables, zt as plannerSuccess } from "./control-C24G0Gx8.mjs";
|
|
5
5
|
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractColumn, type ContractColumns, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultResolver, type DefaultResolverColumn, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, INIT_ADDITIVE_POLICY, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, NO_RENAMED_ORIGINS, type NamespaceRename, type NamespaceStatementTarget, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatements, type ReadColumnDefault, type ReadReportedDefault, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type SchemaTables, type SingleOperationCall, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementOwnership, type StatementPlanningTarget, type StorageTypePlanResult, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableMove, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, type TargetRefusal, type WorkingSchemaOrigins, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, otherSpaceDeclaring, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as checkSqlDefaultText } from "./validators-BwA7ttZM.mjs";
|
|
2
2
|
import { s as extractCodecControlHooks } from "./schema-verify-C3wbdviw-DMjIubOr.mjs";
|
|
3
|
-
import { $ as unmatchedColumnRename, A as planFieldEventOperations, B as resolveTableRenameAgainst, C as fieldStatementColumns, D as partitionCallsByControlPolicy, E as otherSpaceDeclaring, F as readReportedDefault, G as slotSource, H as rowsWithoutValueSummary, I as requiredColumnMeta, J as sqlTypeLookupsOf, K as sqlDefaultFunctions, L as requiredColumnOf, M as plannerFailure, N as plannerSuccess, O as partitionIssuesByControlPolicy, P as readColumnDefault, Q as unknownCallNames, R as requiredColumnsOfMigration, S as fieldRenameStorageEffect, T as modelRenameStorageEffect, U as runnerFailure, V as rowsWithoutValueFailure, W as runnerSuccess, X as subjectsOfCalls, Y as storageNameOfOperation, Z as unconvertedFieldOf, _ as createSqlTextSources, a as appliedStatementsInOrder, b as fieldEventStorage, c as checkSqlExpressionText, d as contractNamespaceToSchemaIR, et as unmatchedTableRename, f as contractToSchemaIR, g as createMigrationPlan, h as convertedColumnOf, i as TABLE_NAME_CASE_CHANGED_CODE, j as planStatements, k as planFieldEventCalls, l as columnTakesTemporaryValue, m as convertedColumnMeta, n as INIT_ADDITIVE_POLICY, o as assembleAuthoringContributions, p as control_default, q as sqlOfSlot, r as NO_RENAMED_ORIGINS, s as backfillOfDefaultedField, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractColumns, v as detectDestructiveChanges, w as isUnfilledSlot, x as fieldOfColumn, y as detectTableNameCaseChanges, z as resolveColumnRenameAgainst } from "./control-
|
|
3
|
+
import { $ as unmatchedColumnRename, A as planFieldEventOperations, B as resolveTableRenameAgainst, C as fieldStatementColumns, D as partitionCallsByControlPolicy, E as otherSpaceDeclaring, F as readReportedDefault, G as slotSource, H as rowsWithoutValueSummary, I as requiredColumnMeta, J as sqlTypeLookupsOf, K as sqlDefaultFunctions, L as requiredColumnOf, M as plannerFailure, N as plannerSuccess, O as partitionIssuesByControlPolicy, P as readColumnDefault, Q as unknownCallNames, R as requiredColumnsOfMigration, S as fieldRenameStorageEffect, T as modelRenameStorageEffect, U as runnerFailure, V as rowsWithoutValueFailure, W as runnerSuccess, X as subjectsOfCalls, Y as storageNameOfOperation, Z as unconvertedFieldOf, _ as createSqlTextSources, a as appliedStatementsInOrder, b as fieldEventStorage, c as checkSqlExpressionText, d as contractNamespaceToSchemaIR, et as unmatchedTableRename, f as contractToSchemaIR, g as createMigrationPlan, h as convertedColumnOf, i as TABLE_NAME_CASE_CHANGED_CODE, j as planStatements, k as planFieldEventCalls, l as columnTakesTemporaryValue, m as convertedColumnMeta, n as INIT_ADDITIVE_POLICY, o as assembleAuthoringContributions, p as control_default, q as sqlOfSlot, r as NO_RENAMED_ORIGINS, s as backfillOfDefaultedField, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractColumns, v as detectDestructiveChanges, w as isUnfilledSlot, x as fieldOfColumn, y as detectTableNameCaseChanges, z as resolveColumnRenameAgainst } from "./control-DQzNuCAM.mjs";
|
|
4
4
|
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, NO_RENAMED_ORIGINS, TABLE_NAME_CASE_CHANGED_CODE, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, otherSpaceDeclaring, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__diff.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VerifySqlSchemaByDiffInput, c as classifySqlDiffIssue, d as verifySqlSchemaByDiff, i as StorageTypeVerdictInput, l as computeSqlDiffVerdict, n as SqlDiffVerdictInput, o as arraysEqual, r as StorageTypeVerdict, s as classifyDiffSubjectGranularity, t as SqlDiffVerdict, u as computeStorageTypeVerdict } from "./diff-
|
|
1
|
+
import { a as VerifySqlSchemaByDiffInput, c as classifySqlDiffIssue, d as verifySqlSchemaByDiff, i as StorageTypeVerdictInput, l as computeSqlDiffVerdict, n as SqlDiffVerdictInput, o as arraysEqual, r as StorageTypeVerdict, s as classifyDiffSubjectGranularity, t as SqlDiffVerdict, u as computeStorageTypeVerdict } from "./diff-FNTO8gbI.mjs";
|
|
2
2
|
export { type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-qalbcIUs.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-Cg5QkM46-
|
|
2
|
-
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets, t as sqlFamilyPack } from "./pack-
|
|
1
|
+
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-Cg5QkM46-C1ByFzyT.mjs";
|
|
2
|
+
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets, t as sqlFamilyPack } from "./pack-DOTaBfUC.mjs";
|
|
3
3
|
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { D as QueryOperationTypesBase } from "./types-DfKvtJwS-CrpWTGBJ.mjs";
|
|
2
2
|
import "./types-CkAd8SWm.mjs";
|
|
3
3
|
import { i as SqlOperationEntry } from "./index-Nqc3OHR_.mjs";
|
|
4
|
-
import { Nt as SelectAst } from "./types-
|
|
5
|
-
import { i as CodecTypesBase, l as RawCodecInferer, o as Expression, r as CodecExpression, x as ScopeField, y as RawSqlTag } from "./expression-
|
|
4
|
+
import { Nt as SelectAst } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
5
|
+
import { i as CodecTypesBase, l as RawCodecInferer, o as Expression, r as CodecExpression, x as ScopeField, y as RawSqlTag } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
6
6
|
//#region ../../../2-sql-family/4-lanes/relational-core/dist/exports/functions.d.mts
|
|
7
7
|
//#region src/functions.d.ts
|
|
8
8
|
type BooleanCodecType = {
|
|
@@ -70,4 +70,4 @@ type Functions<QC extends FunctionsContext> = BuiltinFunctions<QC['codecTypes']>
|
|
|
70
70
|
declare function createFunctions<QC extends FunctionsContext>(operations: Readonly<Record<string, SqlOperationEntry>>, rawCodecInferer: RawCodecInferer): Functions<QC>;
|
|
71
71
|
//#endregion
|
|
72
72
|
export { Subquery as a, FunctionsContext as i, BuiltinFunctions as n, SubqueryMarker as o, Functions as r, createFunctions as s, BooleanCodecType as t };
|
|
73
|
-
//# sourceMappingURL=functions-
|
|
73
|
+
//# sourceMappingURL=functions-CQrsCHCj.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions-
|
|
1
|
+
{"version":3,"file":"functions-CQrsCHCj.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/functions.d.mts"],"mappings":";;;;;;;KAKK;EACH;EACA;;cAEY;KACT,SAAS,gBAAgB,eAAe;GAC1C,iBAAiB;EAClB,YAAY;EACZ,gBAAgB,eAAe;;;KAG5B;WACM,YAAY;WACZ,qBAAqB;;KAE3B,mBAAmB,WAAW,8BAA8B,WAAW,KAA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,WAAW,kBAAkB,YAAY,SAAS,eAAe,qBAAqB,iBAAiB,kBAAkB,UAAU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from "./types-
|
|
2
|
-
import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-
|
|
1
|
+
import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
|
+
import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-CUKzBisY.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
//#region ../../../2-sql-family/4-lanes/relational-core/dist/exports/functions.mjs
|
|
5
5
|
const BOOL_FIELD = {
|
|
@@ -85,4 +85,4 @@ function createFunctions(operations, rawCodecInferer) {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
export { createFunctions as t };
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=functions-
|
|
88
|
+
//# sourceMappingURL=functions-D7lN5-JU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions-
|
|
1
|
+
{"version":3,"file":"functions-D7lN5-JU.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/functions.mjs"],"sourcesContent":["import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from \"../types-BkTuhW3Z.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-DtbmFnnz.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/functions.ts\nconst BOOL_FIELD = {\n\tcodecId: \"pg/bool@1\",\n\tnullable: false\n};\n/**\n* Resolve a binary-comparison operand into an AST expression, threading the column-bound side's {@link CodecRef} to the raw-value side.\n*\n* For `fns.eq(f.email, 'alice@example.com')`, `f.email` is the column-bound expression carrying a `ColumnRef` AST and a `CodecRef` derived from contract storage; the raw string operand has no codec context. By deriving the codec context from the column-bound side and forwarding it via `toExpr(value, codec)`, the resulting `ParamRef` carries the `CodecRef` that encode-side dispatch needs to materialise the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction resolveOperand(operand, otherCodec) {\n\tif (isExpression(operand)) return operand.buildAst();\n\treturn toExpr(operand, otherCodec);\n}\n/**\n* Resolves an Expression via `buildAst()`, or wraps a raw value as a `LiteralExpr` — an SQL literal inlined into the query text, not a bound parameter.\n*\n* Used for `and` / `or` operands. The usual operand is an `Expression<bool>` (e.g. the result of `fns.eq`), which this function passes through by calling `buildAst()`. The only time the raw-value branch fires is when the caller writes `fns.and(true, x)` or similar — inlining `TRUE`/`FALSE` literals lets the SQL planner statically simplify `TRUE AND x` to `x`, which it cannot do for an opaque `ParamRef`.\n*/\nfunction toLiteralExpr(value) {\n\tif (isExpression(value)) return value.buildAst();\n\treturn new LiteralExpr(value);\n}\nfunction boolExpr(astNode) {\n\treturn new ExpressionImpl(astNode, BOOL_FIELD);\n}\nfunction binaryWithSharedCodec(a, b, build) {\n\tconst aCodec = codecOf(a);\n\treturn build(resolveOperand(a, codecOf(b)), resolveOperand(b, aCodec));\n}\nfunction eq(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"eq\", l, r)));\n}\nfunction ne(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"neq\", l, r)));\n}\nfunction comparison(a, b, op) {\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(op, l, r)));\n}\nfunction inOrNotIn(expr, valuesOrSubquery, op) {\n\tconst left = expr.buildAst();\n\tconst leftCodec = codecOf(expr);\n\tconst binaryFn = op === \"in\" ? BinaryExpr.in : BinaryExpr.notIn;\n\tif (Array.isArray(valuesOrSubquery)) {\n\t\tconst refs = valuesOrSubquery.map((v) => resolveOperand(v, leftCodec));\n\t\treturn boolExpr(binaryFn(left, ListExpression.of(refs)));\n\t}\n\treturn boolExpr(binaryFn(left, SubqueryExpr.of(valuesOrSubquery.buildAst())));\n}\nfunction createBuiltinFunctions(rawCodecInferer) {\n\treturn {\n\t\teq: (a, b) => eq(a, b),\n\t\tne: (a, b) => ne(a, b),\n\t\tgt: (a, b) => comparison(a, b, \"gt\"),\n\t\tgte: (a, b) => comparison(a, b, \"gte\"),\n\t\tlt: (a, b) => comparison(a, b, \"lt\"),\n\t\tlte: (a, b) => comparison(a, b, \"lte\"),\n\t\tand: (...exprs) => boolExpr(AndExpr.of(exprs.map(toLiteralExpr))),\n\t\tor: (...exprs) => boolExpr(OrExpr.of(exprs.map(toLiteralExpr))),\n\t\texists: (subquery) => boolExpr(ExistsExpr.exists(subquery.buildAst())),\n\t\tnotExists: (subquery) => boolExpr(ExistsExpr.notExists(subquery.buildAst())),\n\t\tin: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"in\"),\n\t\tnotIn: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"notIn\"),\n\t\traw: createRawSql(rawCodecInferer)\n\t};\n}\n/**\n* The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.\n*/\nfunction createFunctions(operations, rawCodecInferer) {\n\tconst builtins = createBuiltinFunctions(rawCodecInferer);\n\treturn new Proxy(blindCast({}), { get(_target, prop) {\n\t\tif (Object.hasOwn(builtins, prop)) return blindCast(builtins)[prop];\n\t\tconst op = operations[prop];\n\t\tif (op) return op.impl;\n\t} });\n}\n//#endregion\nexport { createFunctions };\n\n//# sourceMappingURL=functions.mjs.map"],"mappings":";;;;AAIA,MAAM,aAAa;CAClB,SAAS;CACT,UAAU;AACX;;;;;;AAMA,SAAS,eAAe,SAAS,YAAY;CAC5C,IAAI,aAAa,OAAO,GAAG,OAAO,QAAQ,SAAS;CACnD,OAAO,OAAO,SAAS,UAAU;AAClC;;;;;;AAMA,SAAS,cAAc,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,OAAO,IAAI,YAAY,KAAK;AAC7B;AACA,SAAS,SAAS,SAAS;CAC1B,OAAO,IAAI,eAAe,SAAS,UAAU;AAC9C;AACA,SAAS,sBAAsB,GAAG,GAAG,OAAO;CAC3C,MAAM,SAAS,QAAQ,CAAC;CACxB,OAAO,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,GAAG,eAAe,GAAG,MAAM,CAAC;AACtE;AACA,SAAS,GAAG,GAAG,GAAG;CACjB,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,OAAO,SAAS,sBAAsB,GAAG,IAAI,GAAG,MAAM,IAAI,WAAW,MAAM,GAAG,CAAC,CAAC,CAAC;AAClF;AACA,SAAS,GAAG,GAAG,GAAG;CACjB,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,UAAU,OAAO,CAAC,CAAC,CAAC;CAClE,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,UAAU,OAAO,CAAC,CAAC,CAAC;CAClE,OAAO,SAAS,sBAAsB,GAAG,IAAI,GAAG,MAAM,IAAI,WAAW,OAAO,GAAG,CAAC,CAAC,CAAC;AACnF;A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KAAK,aAAa,eAAe;CAClC;AACD;;;;AAIA,SAAS,gBAAgB,YAAY,iBAAiB;CACrD,MAAM,WAAW,uBAAuB,eAAe;CACvD,OAAO,IAAI,MAAM,UAAU,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,MAAM;EACpD,IAAI,OAAO,OAAO,UAAU,IAAI,GAAG,OAAO,UAAU,QAAQ,CAAC,CAAC;EAC9D,MAAM,KAAK,WAAW;EACtB,IAAI,IAAI,OAAO,GAAG;CACnB,EAAE,CAAC;AACJ"}
|
package/dist/{generator-functions-Cg5QkM46-D6M4ayK9.mjs → generator-functions-Cg5QkM46-C1ByFzyT.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as enumType } from "./contract-builder-50lF0kz1.mjs";
|
|
2
|
-
import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-
|
|
2
|
+
import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-e_02t9Nt.mjs";
|
|
3
3
|
import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
4
4
|
import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
|
|
5
5
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
@@ -540,4 +540,4 @@ function checkedInteger(integer, dataTypes, allowed, refusal) {
|
|
|
540
540
|
//#endregion
|
|
541
541
|
export { sqlFamilyGeneratorDescriptors as a, sqlIntegerArgumentGeneratorFunctions as c, sqlFamilyEntityTypes as i, sqlTargetTypeConstructors as l, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
|
|
542
542
|
|
|
543
|
-
//# sourceMappingURL=generator-functions-Cg5QkM46-
|
|
543
|
+
//# sourceMappingURL=generator-functions-Cg5QkM46-C1ByFzyT.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator-functions-Cg5QkM46-D6M4ayK9.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Cg5QkM46.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { SQL_CHAR_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: enumMemberValue(),\n\t\t\tdocumentation: \"The member's value, written as a value of the enum's data type; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypes.lookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: NANOID_SIZE.min,\n\t\tmaximum: NANOID_SIZE.max\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { Raw: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(sql`tsvector`). Its values are typed unknown, and its default is a sql expression.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: \"sql/expression\",\n\t\tname: \"sql\"\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/raw@1\",\n\t\ttypeParams: { sql: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} };\n/**\n* The type constructors every SQL target contributes itself, because their arguments are sizes, such as a length, and only the target names the data type a size is a value of: `sizeType`, such as `pg/int4`.\n*/\nfunction sqlTargetTypeConstructors(input) {\n\treturn { sql: { String: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t} } };\n}\n//#endregion\n//#region src/core/generator-functions.ts\nconst NANOID_DEFAULT_SIZE = 21;\nconst nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst ksuidSignature = { documentation: \"Generates a KSUID when a value is not supplied.\" };\nfunction refused(message) {\n\treturn {\n\t\tok: false,\n\t\tmessage\n\t};\n}\nfunction generated(id, params) {\n\treturn {\n\t\tok: true,\n\t\tgenerator: params === void 0 ? {\n\t\t\tkind: \"generator\",\n\t\t\tid\n\t\t} : {\n\t\t\tkind: \"generator\",\n\t\t\tid,\n\t\t\tparams\n\t\t}\n\t};\n}\nfunction uuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"uuidv4\", \"uuidv7\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\tif (version === void 0 || version === UUID_VERSIONS.v4) return generated(\"uuidv4\");\n\t\t\tif (version === UUID_VERSIONS.v7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id === \"uuidv4\") return {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tif (generator.id === \"uuidv7\") return {\n\t\t\t\targs: { version: UUID_VERSIONS.v7 },\n\t\t\t\ttext: String(UUID_VERSIONS.v7)\n\t\t\t};\n\t\t}\n\t};\n}\nfunction cuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"cuid2\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\treturn version === CUID_VERSION ? generated(\"cuid2\") : refused(`cuid: version must be ${CUID_VERSION}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: CUID_VERSION },\n\t\t\ttext: String(CUID_VERSION)\n\t\t} : void 0\n\t};\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_SIZE.min && size <= NANOID_SIZE.max;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.\n*/\nfunction nanoidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"nanoid\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${String(explicit)}`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size: explicit });\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id !== \"nanoid\") return void 0;\n\t\t\tconst size = generator.params?.[\"size\"];\n\t\t\treturn typeof size === \"number\" ? {\n\t\t\t\targs: { size },\n\t\t\t\ttext: String(size)\n\t\t\t} : {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* `binding`, refusing a column whose length, in its data type's normal form, is shorter than the identifier the generator writes. The database would refuse every insert of a longer value.\n*/\nfunction fittingColumn(name, binding) {\n\treturn {\n\t\t...binding,\n\t\tresolve: (input) => {\n\t\t\tconst resolution = binding.resolve(input);\n\t\t\tconst length = input.field.length;\n\t\t\tif (!resolution.ok || length === void 0) return resolution;\n\t\t\tconst { generator } = resolution;\n\t\t\tconst written = generatedLength(blindCast(generator.id), generator.params);\n\t\t\tif (written <= length) return resolution;\n\t\t\treturn refused(`${`${name}(${binding.printArguments(generator, input.field)?.text ?? \"\"})`} writes ${written} characters, which does not fit a column of ${length} ${length === 1 ? \"character\" : \"characters\"}.`);\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. Each refuses a column too short for what it writes. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [fittingColumn(\"uuid\", uuidBinding([...text, ...codecs.uuid ?? []]))]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [fittingColumn(\"cuid\", cuidBinding(text))]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [fittingColumn(\"ulid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ulid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"ksuid\",\n\t\t\tbindings: [fittingColumn(\"ksuid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ksuid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tbindings: [fittingColumn(\"nanoid\", nanoidBinding(text))]\n\t\t}\n\t];\n}\nconst familyIdBindings = idGeneratorFunctionBindings({ text: [\n\tSQL_CHAR_CODEC_ID,\n\tSQL_VARCHAR_CODEC_ID,\n\tSQL_TEXT_CODEC_ID\n] });\nfunction familyBindingsOf(name) {\n\treturn familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];\n}\n/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */\nconst sqlFamilyGeneratorFunctions = [\n\t{\n\t\tname: \"now\",\n\t\tsignature: nowSignature,\n\t\tbindings: []\n\t},\n\t{\n\t\tname: \"uuid\",\n\t\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\n\t\tbindings: familyBindingsOf(\"cuid\")\n\t},\n\t{\n\t\tname: \"ulid\",\n\t\tsignature: ulidSignature,\n\t\tbindings: familyBindingsOf(\"ulid\")\n\t},\n\t{\n\t\tname: \"nanoid\",\n\t\tbindings: familyBindingsOf(\"nanoid\")\n\t},\n\t{\n\t\tname: \"ksuid\",\n\t\tsignature: ksuidSignature,\n\t\tbindings: familyBindingsOf(\"ksuid\")\n\t}\n];\n/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */\nconst sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));\n/**\n* The generator functions whose arguments are integers, declared with their signatures: `uuid(version?)`, `cuid(version)` and `nanoid(size?)`. Each argument is a value of `integer`, the target's integer data type, read and cast like a default, then checked by its function. A target declares them, because only it knows its integer type; the family and the target bind them.\n*/\nfunction sqlIntegerArgumentGeneratorFunctions({ integer }) {\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tsignature: (dataTypes) => uuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tsignature: (dataTypes) => cuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tsignature: (dataTypes) => nanoidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t}\n\t];\n}\nfunction uuidSignature(integer, dataTypes) {\n\tconst versions = [UUID_VERSIONS.v4, UUID_VERSIONS.v7];\n\treturn {\n\t\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, listed(versions), (version, written) => versions.some((allowed) => allowed === version) ? void 0 : `uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${written}`)),\n\t\t\tdocumentation: `The UUID version: \\`${UUID_VERSIONS.v4}\\` or \\`${UUID_VERSIONS.v7}\\`. Defaults to \\`${UUID_VERSIONS.v4}\\`.`\n\t\t}]\n\t};\n}\nfunction cuidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: checkedInteger(integer, dataTypes, listed([CUID_VERSION]), (version, written) => version === CUID_VERSION ? void 0 : `cuid: version must be ${CUID_VERSION}, got ${written}`),\n\t\t\tdocumentation: `The CUID version. Only \\`${CUID_VERSION}\\` is supported.`\n\t\t}]\n\t};\n}\nfunction nanoidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"size\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, {\n\t\t\t\tlabel: `integer from ${NANOID_SIZE.min} to ${NANOID_SIZE.max}`,\n\t\t\t\tsuggestions: []\n\t\t\t}, (size, written) => isNanoidSize(size) ? void 0 : `nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${written}`)),\n\t\t\tdocumentation: `The identifier length, from \\`${NANOID_SIZE.min}\\` through \\`${NANOID_SIZE.max}\\`. Defaults to ${NANOID_DEFAULT_SIZE}.`\n\t\t}]\n\t};\n}\n/** The completion suggestions of an argument that takes one of `values`, which its label lists. */\nfunction listed(values) {\n\treturn {\n\t\tsuggestions: values.map(String),\n\t\tlabelIsUnion: true\n\t};\n}\n/**\n* One value of the integer data type, as a number, refused at the argument with the function's message when `refusal` returns one.\n*/\nfunction checkedInteger(integer, dataTypes, allowed, refusal) {\n\treturn refineArg(dataTypeValue(integer, dataTypes, allowed), ({ value }, arg, ctx) => {\n\t\tconst stored = value.value;\n\t\tif (typeof stored !== \"number\" && typeof stored !== \"string\") throw new InternalError(`Data type \"${integer}\" stores an integer as ${typeof stored}, not a number or digit text.`);\n\t\tconst message = refusal(Number(stored), String(stored));\n\t\treturn message === void 0 ? ok(blindCast(Number(stored))) : notOk([leafDiagnostic(ctx, arg, message, \"PSL_INVALID_GENERATOR_ARGUMENT\")]);\n\t});\n}\n//#endregion\nexport { sqlFamilyAuthoringTypes as a, sqlFamilyEntityTypes as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyPslBlockDescriptors as l, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyAuthoringFieldPresets as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-Cg5QkM46.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,gBAAgB;GACtB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAA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I,eAAe,YAAY,IAAI,kBAAkB,oBAAoB;EACtI,CAAC;CACF;AACD;;AAEA,SAAS,OAAO,QAAQ;CACvB,OAAO;EACN,aAAa,OAAO,IAAI,MAAM;EAC9B,cAAc;CACf;AACD;;;;AAIA,SAAS,eAAe,SAAS,WAAW,SAAS,SAAS;CAC7D,OAAO,UAAU,cAAc,SAAS,WAAW,OAAO,IAAI,EAAE,SAAS,KAAK,QAAQ;EACrF,MAAM,SAAS,MAAM;EACrB,IAAI,OAAO,WAAW,YAAY,OAAO,WAAW,UAAU,MAAM,IAAI,cAAc,cAAc,QAAQ,yBAAyB,OAAO,OAAO,8BAA8B;EACjL,MAAM,UAAU,QAAQ,OAAO,MAAM,GAAG,OAAO,MAAM,CAAC;EACtD,OAAO,YAAY,KAAK,IAAI,GAAG,UAAU,OAAO,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,eAAe,KAAK,KAAK,SAAS,gCAAgC,CAAC,CAAC;CACxI,CAAC;AACF"}
|
|
1
|
+
{"version":3,"file":"generator-functions-Cg5QkM46-C1ByFzyT.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Cg5QkM46.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { SQL_CHAR_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: enumMemberValue(),\n\t\t\tdocumentation: \"The member's value, written as a value of the enum's data type; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypes.lookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: NANOID_SIZE.min,\n\t\tmaximum: NANOID_SIZE.max\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { Raw: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(sql`tsvector`). Its values are typed unknown, and its default is a sql expression.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: \"sql/expression\",\n\t\tname: \"sql\"\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/raw@1\",\n\t\ttypeParams: { sql: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} };\n/**\n* The type constructors every SQL target contributes itself, because their arguments are sizes, such as a length, and only the target names the data type a size is a value of: `sizeType`, such as `pg/int4`.\n*/\nfunction sqlTargetTypeConstructors(input) {\n\treturn { sql: { String: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t} } };\n}\n//#endregion\n//#region src/core/generator-functions.ts\nconst NANOID_DEFAULT_SIZE = 21;\nconst nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst ksuidSignature = { documentation: \"Generates a KSUID when a value is not supplied.\" };\nfunction refused(message) {\n\treturn {\n\t\tok: false,\n\t\tmessage\n\t};\n}\nfunction generated(id, params) {\n\treturn {\n\t\tok: true,\n\t\tgenerator: params === void 0 ? {\n\t\t\tkind: \"generator\",\n\t\t\tid\n\t\t} : {\n\t\t\tkind: \"generator\",\n\t\t\tid,\n\t\t\tparams\n\t\t}\n\t};\n}\nfunction uuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"uuidv4\", \"uuidv7\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\tif (version === void 0 || version === UUID_VERSIONS.v4) return generated(\"uuidv4\");\n\t\t\tif (version === UUID_VERSIONS.v7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id === \"uuidv4\") return {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tif (generator.id === \"uuidv7\") return {\n\t\t\t\targs: { version: UUID_VERSIONS.v7 },\n\t\t\t\ttext: String(UUID_VERSIONS.v7)\n\t\t\t};\n\t\t}\n\t};\n}\nfunction cuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"cuid2\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\treturn version === CUID_VERSION ? generated(\"cuid2\") : refused(`cuid: version must be ${CUID_VERSION}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: CUID_VERSION },\n\t\t\ttext: String(CUID_VERSION)\n\t\t} : void 0\n\t};\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_SIZE.min && size <= NANOID_SIZE.max;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.\n*/\nfunction nanoidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"nanoid\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${String(explicit)}`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size: explicit });\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id !== \"nanoid\") return void 0;\n\t\t\tconst size = generator.params?.[\"size\"];\n\t\t\treturn typeof size === \"number\" ? {\n\t\t\t\targs: { size },\n\t\t\t\ttext: String(size)\n\t\t\t} : {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* `binding`, refusing a column whose length, in its data type's normal form, is shorter than the identifier the generator writes. The database would refuse every insert of a longer value.\n*/\nfunction fittingColumn(name, binding) {\n\treturn {\n\t\t...binding,\n\t\tresolve: (input) => {\n\t\t\tconst resolution = binding.resolve(input);\n\t\t\tconst length = input.field.length;\n\t\t\tif (!resolution.ok || length === void 0) return resolution;\n\t\t\tconst { generator } = resolution;\n\t\t\tconst written = generatedLength(blindCast(generator.id), generator.params);\n\t\t\tif (written <= length) return resolution;\n\t\t\treturn refused(`${`${name}(${binding.printArguments(generator, input.field)?.text ?? \"\"})`} writes ${written} characters, which does not fit a column of ${length} ${length === 1 ? \"character\" : \"characters\"}.`);\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. Each refuses a column too short for what it writes. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [fittingColumn(\"uuid\", uuidBinding([...text, ...codecs.uuid ?? []]))]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [fittingColumn(\"cuid\", cuidBinding(text))]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [fittingColumn(\"ulid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ulid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"ksuid\",\n\t\t\tbindings: [fittingColumn(\"ksuid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ksuid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tbindings: [fittingColumn(\"nanoid\", nanoidBinding(text))]\n\t\t}\n\t];\n}\nconst familyIdBindings = idGeneratorFunctionBindings({ text: [\n\tSQL_CHAR_CODEC_ID,\n\tSQL_VARCHAR_CODEC_ID,\n\tSQL_TEXT_CODEC_ID\n] });\nfunction familyBindingsOf(name) {\n\treturn familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];\n}\n/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */\nconst sqlFamilyGeneratorFunctions = [\n\t{\n\t\tname: \"now\",\n\t\tsignature: nowSignature,\n\t\tbindings: []\n\t},\n\t{\n\t\tname: \"uuid\",\n\t\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\n\t\tbindings: familyBindingsOf(\"cuid\")\n\t},\n\t{\n\t\tname: \"ulid\",\n\t\tsignature: ulidSignature,\n\t\tbindings: familyBindingsOf(\"ulid\")\n\t},\n\t{\n\t\tname: \"nanoid\",\n\t\tbindings: familyBindingsOf(\"nanoid\")\n\t},\n\t{\n\t\tname: \"ksuid\",\n\t\tsignature: ksuidSignature,\n\t\tbindings: familyBindingsOf(\"ksuid\")\n\t}\n];\n/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */\nconst sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));\n/**\n* The generator functions whose arguments are integers, declared with their signatures: `uuid(version?)`, `cuid(version)` and `nanoid(size?)`. Each argument is a value of `integer`, the target's integer data type, read and cast like a default, then checked by its function. A target declares them, because only it knows its integer type; the family and the target bind them.\n*/\nfunction sqlIntegerArgumentGeneratorFunctions({ integer }) {\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tsignature: (dataTypes) => uuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tsignature: (dataTypes) => cuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tsignature: (dataTypes) => nanoidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t}\n\t];\n}\nfunction uuidSignature(integer, dataTypes) {\n\tconst versions = [UUID_VERSIONS.v4, UUID_VERSIONS.v7];\n\treturn {\n\t\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, listed(versions), (version, written) => versions.some((allowed) => allowed === version) ? void 0 : `uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${written}`)),\n\t\t\tdocumentation: `The UUID version: \\`${UUID_VERSIONS.v4}\\` or \\`${UUID_VERSIONS.v7}\\`. Defaults to \\`${UUID_VERSIONS.v4}\\`.`\n\t\t}]\n\t};\n}\nfunction cuidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: checkedInteger(integer, dataTypes, listed([CUID_VERSION]), (version, written) => version === CUID_VERSION ? void 0 : `cuid: version must be ${CUID_VERSION}, got ${written}`),\n\t\t\tdocumentation: `The CUID version. Only \\`${CUID_VERSION}\\` is supported.`\n\t\t}]\n\t};\n}\nfunction nanoidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"size\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, {\n\t\t\t\tlabel: `integer from ${NANOID_SIZE.min} to ${NANOID_SIZE.max}`,\n\t\t\t\tsuggestions: []\n\t\t\t}, (size, written) => isNanoidSize(size) ? void 0 : `nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${written}`)),\n\t\t\tdocumentation: `The identifier length, from \\`${NANOID_SIZE.min}\\` through \\`${NANOID_SIZE.max}\\`. Defaults to ${NANOID_DEFAULT_SIZE}.`\n\t\t}]\n\t};\n}\n/** The completion suggestions of an argument that takes one of `values`, which its label lists. */\nfunction listed(values) {\n\treturn {\n\t\tsuggestions: values.map(String),\n\t\tlabelIsUnion: true\n\t};\n}\n/**\n* One value of the integer data type, as a number, refused at the argument with the function's message when `refusal` returns one.\n*/\nfunction checkedInteger(integer, dataTypes, allowed, refusal) {\n\treturn refineArg(dataTypeValue(integer, dataTypes, allowed), ({ value }, arg, ctx) => {\n\t\tconst stored = value.value;\n\t\tif (typeof stored !== \"number\" && typeof stored !== \"string\") throw new InternalError(`Data type \"${integer}\" stores an integer as ${typeof stored}, not a number or digit text.`);\n\t\tconst message = refusal(Number(stored), String(stored));\n\t\treturn message === void 0 ? ok(blindCast(Number(stored))) : notOk([leafDiagnostic(ctx, arg, message, \"PSL_INVALID_GENERATOR_ARGUMENT\")]);\n\t});\n}\n//#endregion\nexport { sqlFamilyAuthoringTypes as a, sqlFamilyEntityTypes as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyPslBlockDescriptors as l, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyAuthoringFieldPresets as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-Cg5QkM46.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,gBAAgB;GACtB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,cAAc,OAAO;EACxD,MAAM,QAAQ,IAAI,YAAY,IAAI,OAAO;EACzC,IAAI,eAAe,KAAK,KAAK,UAAU,KAAK,GAAG;GAC9C,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,cAAc,cAAc,UAAU;EAC5C,IAAI,gBAAgB,KAAK,GAAG;GAC3B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,0BAA0B,QAAQ,KAAK;IACpE;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,WAAW,IAAI,UAAU,OAAO,IAAI,WAAW,QAAQ;EAC7D,IAAI,aAAa,KAAK,GAAG;GACxB,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,kBAAkB,QAAQ,0BAA0B,WAAW,SAAS;IACrG;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,CA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hi-CEM-m8cs.mjs";
|
|
2
2
|
import "./types-CkAd8SWm.mjs";
|
|
3
3
|
import { r as SqlOperationDescriptors } from "./index-Nqc3OHR_.mjs";
|
|
4
|
-
import { E as CodecRef$1, Ft as SqlCodecCallContext, S as Codec$1, gt as LoweredStatement, h as AnyQueryAst, ht as LoweredParam, k as ContractCodecRegistry } from "./types-
|
|
4
|
+
import { E as CodecRef$1, Ft as SqlCodecCallContext, S as Codec$1, gt as LoweredStatement, h as AnyQueryAst, ht as LoweredParam, k as ContractCodecRegistry } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
5
5
|
import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConnection } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
6
|
-
import { n as SqlQueryPlan } from "./plan-
|
|
7
|
-
import { i as CodecTypesBase, l as RawCodecInferer } from "./expression-
|
|
8
|
-
import "./expression-
|
|
9
|
-
import { m as MarkerReadResult, t as Adapter } from "./ast-
|
|
10
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-
|
|
11
|
-
import "./plan-
|
|
12
|
-
import { n as CollectionMethodContribution } from "./collection-methods-
|
|
13
|
-
import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lane-context-
|
|
14
|
-
import "./query-lane-context-
|
|
15
|
-
import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-
|
|
16
|
-
import "./types-
|
|
17
|
-
import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-DR3nKTmH-
|
|
18
|
-
import { i as SqlParamRefMutator } from "./middleware-
|
|
19
|
-
import "./middleware-
|
|
20
|
-
import "./collection-methods-
|
|
6
|
+
import { n as SqlQueryPlan } from "./plan-CMqVpPq6-Bllx5Zpk.mjs";
|
|
7
|
+
import { i as CodecTypesBase, l as RawCodecInferer } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
8
|
+
import "./expression-CQHy0GY7.mjs";
|
|
9
|
+
import { m as MarkerReadResult, t as Adapter } from "./ast-DcphKbq9.mjs";
|
|
10
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-CN-FEwrR-CzRFoxKR.mjs";
|
|
11
|
+
import "./plan-Cg0h96GD.mjs";
|
|
12
|
+
import { n as CollectionMethodContribution } from "./collection-methods-D9CYfePl-DsDjYS6t.mjs";
|
|
13
|
+
import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lane-context-DLSXDsDK-pEiQmuYy.mjs";
|
|
14
|
+
import "./query-lane-context-Dqs5qCXx.mjs";
|
|
15
|
+
import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-NgqqVAo5-Be_uYGQx.mjs";
|
|
16
|
+
import "./types-CvmPNREJ.mjs";
|
|
17
|
+
import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-DR3nKTmH-BIKF_fP6.mjs";
|
|
18
|
+
import { i as SqlParamRefMutator } from "./middleware-JfHt_Ax8-DKXbos9y.mjs";
|
|
19
|
+
import "./middleware-DYiOUIpn.mjs";
|
|
20
|
+
import "./collection-methods-FWiYjZ5j.mjs";
|
|
21
21
|
import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
|
|
22
22
|
import { Contract, PlanMeta } from "@prisma/orm-framework/contract/types";
|
|
23
23
|
import { Activity, Activity as Activity$1, ActivityContext, ActivityEndedResult, ActivityEndedResult as ActivityEndedResult$1, ActivityFinalizedResult, ActivityFinalizedResult as ActivityFinalizedResult$1, ActivityInterceptResult, ActivityInterceptResult as ActivityInterceptResult$1, ActivityParent, ActivityParent as ActivityParent$1, AsyncIterableResult, ClientActivity, ClientActivity as ClientActivity$1, ClientActivityEnd, ClientActivityEnd as ClientActivityEnd$1, ClientActivityEnded, ClientActivityKind, ClientActivityKind as ClientActivityKind$1, ClientActivityResult, ClientActivityResult as ClientActivityResult$1, ExecuteInterceptResult, ExecuteInterceptResult as ExecuteInterceptResult$1, ExecutionPlan, MutationDefaultGeneratorContributor, QueryInterceptResult, QueryInterceptResult as QueryInterceptResult$1, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeLog as Log, RuntimeMiddleware, StartActivity, StartActivity as StartActivity$1, StatementActivity, StatementEnded, TransactionActivity, TransactionEnded } from "@prisma/orm-framework/components/runtime";
|
|
@@ -611,4 +611,4 @@ interface ToSqlMember {
|
|
|
611
611
|
declare function createToSql<TTargetId extends string>(stack: SqlExecutionStackWithDriver<TTargetId>, contract: Contract<SqlStorage>): ToSqlMember['toSql'];
|
|
612
612
|
//#endregion
|
|
613
613
|
export { RuntimeTelemetryEvent as $, lowerSqlPlan as A, ConnectionProvider as B, TransactionEnded as C, lazyActivitySource as Ct, delegatingRuntime as D, withTransactionMembers as Dt, createToSql as E, withTransaction as Et, ActivityRoute as F, PreparedStatementInternals as G, MarkerReader as H, ActivitySource as I, RuntimeFamilyAdapter as J, Runtime as K, ActivitySourceTarget as L, validateContractCodecMappings as M, ActivityExecuteOptions as N, extractCodecIds as O, ActivityHandle as P, RuntimeQueryable as Q, BoundPreparedStatement as R, TransactionActivity as S, findActivitySource as St, createAstCodecRegistry as T, startActivityOn as Tt, PreparedExecutionImpl as U, HashablePlan as V, PreparedStatementImpl as W, RuntimeOptions as X, RuntimeMode as Y, RuntimeParameterizedCodecDescriptor as Z, RenderedSql as _, createExecutionContext as _t, ActivityParent$1 as a, SqlRuntimeAdapterDescriptor as at, StatementEnded as b, deriveParamMetadata as bt, ClientActivityEnd$1 as c, SqlRuntimeDriverInstance as ct, ClientActivityResult$1 as d, SqlRuntimeTargetDescriptor as dt, RuntimeTransaction as et, DelegatingRuntime as f, SqlStaticContributions as ft, QueryInterceptResult$1 as g, activitySource as gt, Log as h, VerifyMarkerOption as ht, ActivityInterceptResult$1 as i, SqlMiddlewareContext as it, validateCodecRegistryCompleteness as j, lints as k, ClientActivityEnded as l, SqlRuntimeExtensionDescriptor as lt, LintsOptions as m, TransactionContext as mt, ActivityEndedResult$1 as n, SqlExecutionStackWithDriver as nt, BudgetsOptions as o, SqlRuntimeAdapterInstance as ot, ExecuteInterceptResult$1 as p, TelemetryOutcome as pt, RuntimeConnection as q, ActivityFinalizedResult$1 as r, SqlMiddleware as rt, ClientActivity$1 as s, SqlRuntimeBase as st, Activity$1 as t, SqlExecutionStack as tt, ClientActivityKind$1 as u, SqlRuntimeExtensionInstance as ut, StartActivity$1 as v, createSqlExecutionStack as vt, budgets as w, planContentHashOn as wt, ToSqlMember as x, encodeParamsWithMetadata as xt, StatementActivity as y, delegatingActivitySource as yt, CloseRefusal as z };
|
|
614
|
-
//# sourceMappingURL=index-
|
|
614
|
+
//# sourceMappingURL=index-0qfR8_db.d.mts.map
|