@prisma/orm-family-sql 8.0.0-rc.23-dev.7 → 8.0.0-rc.23-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/{aggregate-descriptor-registry-CkybswmO.mjs → aggregate-descriptor-registry-I7ViZXqV.mjs} +2 -2
  2. package/dist/{aggregate-descriptor-registry-CkybswmO.mjs.map → aggregate-descriptor-registry-I7ViZXqV.mjs.map} +1 -1
  3. package/dist/{ast-BopvCTVF.d.mts → ast-C946me7A.d.mts} +3 -3
  4. package/dist/{ast-BopvCTVF.d.mts.map → ast-C946me7A.d.mts.map} +1 -1
  5. package/dist/{ast-C3itulLi.mjs → ast-Dh0-El6s.mjs} +2 -2
  6. package/dist/{ast-C3itulLi.mjs.map → ast-Dh0-El6s.mjs.map} +1 -1
  7. package/dist/builder.d.mts +3 -3
  8. package/dist/builder__runtime.d.mts +7 -7
  9. package/dist/builder__runtime.mjs +24 -15
  10. package/dist/builder__runtime.mjs.map +1 -1
  11. package/dist/builder__types.d.mts +5 -5
  12. package/dist/{collection-methods-B82cPkgc-DY10b2Cq.d.mts → collection-methods-BF4Y-CXN-B8ZzzPRZ.d.mts} +3 -3
  13. package/dist/{collection-methods-B82cPkgc-DY10b2Cq.d.mts.map → collection-methods-BF4Y-CXN-B8ZzzPRZ.d.mts.map} +1 -1
  14. package/dist/collection-methods-DSULHjBq.d.mts +1 -0
  15. package/dist/{control-DcEzEBvW.mjs → control-Bbhie2cs.mjs} +2 -2
  16. package/dist/{control-DcEzEBvW.mjs.map → control-Bbhie2cs.mjs.map} +1 -1
  17. package/dist/{control-DpKSNUXr.d.mts → control-CetpLROv.d.mts} +6 -6
  18. package/dist/{control-DpKSNUXr.d.mts.map → control-CetpLROv.d.mts.map} +1 -1
  19. package/dist/{control-adapter-BfyLe7rh-DSiEx96z.d.mts → control-adapter-BfyLe7rh-CwjA9hMN.d.mts} +4 -4
  20. package/dist/{control-adapter-BfyLe7rh-DSiEx96z.d.mts.map → control-adapter-BfyLe7rh-CwjA9hMN.d.mts.map} +1 -1
  21. package/dist/{control-adapter-xJwgaSsO.d.mts → control-adapter-DQY1jlI0.d.mts} +2 -2
  22. package/dist/{control-adapter-xJwgaSsO.d.mts.map → control-adapter-DQY1jlI0.d.mts.map} +1 -1
  23. package/dist/{db-D1d75IvM-C88quYVJ.d.mts → db-DfYeGVcu-ClZkgimC.d.mts} +18 -11
  24. package/dist/db-DfYeGVcu-ClZkgimC.d.mts.map +1 -0
  25. package/dist/{ddl-types-BeA1kjV1-BUcW52Dx.d.mts → ddl-types-BLTWWQ9k-D6H45XGj.d.mts} +3 -3
  26. package/dist/{ddl-types-BeA1kjV1-BUcW52Dx.d.mts.map → ddl-types-BLTWWQ9k-D6H45XGj.d.mts.map} +1 -1
  27. package/dist/{diff-bSfcDUpu.d.mts → diff-CKjapr26.d.mts} +2 -2
  28. package/dist/{diff-bSfcDUpu.d.mts.map → diff-CKjapr26.d.mts.map} +1 -1
  29. package/dist/{exports-WNaGWaJR-CVNygh-P.mjs → exports-WNaGWaJR-C4LXgawH.mjs} +3 -3
  30. package/dist/{exports-WNaGWaJR-CVNygh-P.mjs.map → exports-WNaGWaJR-C4LXgawH.mjs.map} +1 -1
  31. package/dist/expression-Dk4YyRB5.d.mts +2 -0
  32. package/dist/{expression-DGu7PRyk-Do_Q7JGF.d.mts → expression-EefSUmX3-fMeoXkqL.d.mts} +4 -4
  33. package/dist/expression-EefSUmX3-fMeoXkqL.d.mts.map +1 -0
  34. package/dist/{expression-4Y1d1hJ_-p9KkcaqT.d.mts → expression-J_MgSIGa-BGzyGrXf.d.mts} +84 -10
  35. package/dist/expression-J_MgSIGa-BGzyGrXf.d.mts.map +1 -0
  36. package/dist/{expression-impl-DtbmFnnz-Dal0IYDE.mjs → expression-impl-CBE-9Bjk-DFY9E3Fm.mjs} +16 -9
  37. package/dist/expression-impl-CBE-9Bjk-DFY9E3Fm.mjs.map +1 -0
  38. package/dist/family.d.mts +6 -6
  39. package/dist/family.mjs +2 -2
  40. package/dist/family__control-adapter.d.mts +2 -2
  41. package/dist/family__control.d.mts +2 -2
  42. package/dist/family__control.mjs +1 -1
  43. package/dist/family__diff.d.mts +1 -1
  44. package/dist/family__migration.d.mts +1 -1
  45. package/dist/family__pack.mjs +1 -1
  46. package/dist/{functions-DO1k8KLB.mjs → functions-DKod0_pU.mjs} +3 -3
  47. package/dist/{functions-DO1k8KLB.mjs.map → functions-DKod0_pU.mjs.map} +1 -1
  48. package/dist/functions-aHuQWAvC.d.mts +1 -0
  49. package/dist/{generator-functions-Hy4pDDr9-DkN0qbPW.mjs → generator-functions-Hy4pDDr9-BsxpXVJL.mjs} +2 -2
  50. package/dist/{generator-functions-Hy4pDDr9-DkN0qbPW.mjs.map → generator-functions-Hy4pDDr9-BsxpXVJL.mjs.map} +1 -1
  51. package/dist/index-reference-B_Uf_rSY.d.mts +1 -0
  52. package/dist/{index-reference--2lpz6Um-CtLxcswa.d.mts → index-reference-ByyRSBYy-CJZcTMVk.d.mts} +3 -3
  53. package/dist/{index-reference--2lpz6Um-CtLxcswa.d.mts.map → index-reference-ByyRSBYy-CJZcTMVk.d.mts.map} +1 -1
  54. package/dist/{index-2YUqocwr.d.mts → index-uco4ow94.d.mts} +17 -17
  55. package/dist/{index-2YUqocwr.d.mts.map → index-uco4ow94.d.mts.map} +1 -1
  56. package/dist/{middleware-JfHt_Ax8-rWWdDxnq.d.mts → middleware-CrQehcRq-Dbh5n4Ue.d.mts} +3 -3
  57. package/dist/{middleware-JfHt_Ax8-rWWdDxnq.d.mts.map → middleware-CrQehcRq-Dbh5n4Ue.d.mts.map} +1 -1
  58. package/dist/middleware-jFusSrLe.d.mts +1 -0
  59. package/dist/{migration-OXM3LDdT.d.mts → migration-BRAFOniF.d.mts} +2 -2
  60. package/dist/{migration-OXM3LDdT.d.mts.map → migration-BRAFOniF.d.mts.map} +1 -1
  61. package/dist/orm-client.d.mts +17 -17
  62. package/dist/orm-client.mjs +5 -5
  63. package/dist/plan-BDecdJnW.d.mts +2 -0
  64. package/dist/{plan-CMqVpPq6-Aoza6Dp2.d.mts → plan-BjQGvtqI-FGvimYfR.d.mts} +3 -3
  65. package/dist/{plan-CMqVpPq6-Aoza6Dp2.d.mts.map → plan-BjQGvtqI-FGvimYfR.d.mts.map} +1 -1
  66. package/dist/query-lane-context-CbAOMvPU.d.mts +1 -0
  67. package/dist/{query-lane-context-vp4wQJQD-DNtizzS5.d.mts → query-lane-context-sr4URYHl-DGYG_cv5.d.mts} +5 -5
  68. package/dist/{query-lane-context-vp4wQJQD-DNtizzS5.d.mts.map → query-lane-context-sr4URYHl-DGYG_cv5.d.mts.map} +1 -1
  69. package/dist/relational-core.d.mts +13 -13
  70. package/dist/relational-core.mjs +3 -3
  71. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  72. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  73. package/dist/relational-core__ast.d.mts +4 -4
  74. package/dist/relational-core__ast.mjs +2 -2
  75. package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
  76. package/dist/relational-core__collection-methods.d.mts +2 -2
  77. package/dist/relational-core__contract-free.d.mts +2 -2
  78. package/dist/relational-core__contract-free.mjs +1 -1
  79. package/dist/relational-core__contract-free.mjs.map +1 -1
  80. package/dist/relational-core__expression.d.mts +4 -4
  81. package/dist/relational-core__expression.mjs +1 -1
  82. package/dist/relational-core__functions.d.mts +2 -1
  83. package/dist/relational-core__functions.mjs +1 -1
  84. package/dist/relational-core__index-reference.d.mts +2 -2
  85. package/dist/relational-core__middleware.d.mts +2 -2
  86. package/dist/relational-core__plan.d.mts +3 -3
  87. package/dist/relational-core__query-lane-context.d.mts +2 -2
  88. package/dist/relational-core__types.d.mts +2 -2
  89. package/dist/runtime.d.mts +4 -4
  90. package/dist/runtime.mjs +1 -1
  91. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  92. package/dist/{sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts → sql-execution-plan-T-E_EPWE-IIfPDZmX.d.mts} +3 -3
  93. package/dist/sql-execution-plan-T-E_EPWE-IIfPDZmX.d.mts.map +1 -0
  94. package/dist/{transaction-state-DR3nKTmH-Bs2EUG8r.d.mts → transaction-state-DR3nKTmH-DTJBvlNB.d.mts} +9 -9
  95. package/dist/{transaction-state-DR3nKTmH-Bs2EUG8r.d.mts.map → transaction-state-DR3nKTmH-DTJBvlNB.d.mts.map} +1 -1
  96. package/dist/{types-DiPbLKXV-BFa2YXa4.d.mts → types-Bv6M7APM-aSWh3_5D.d.mts} +6 -6
  97. package/dist/{types-DiPbLKXV-BFa2YXa4.d.mts.map → types-Bv6M7APM-aSWh3_5D.d.mts.map} +1 -1
  98. package/dist/{types-COXfSNOP-BKkP-EG1.d.mts → types-COXfSNOP-BheEMYQn.d.mts} +2 -2
  99. package/dist/{types-COXfSNOP-BKkP-EG1.d.mts.map → types-COXfSNOP-BheEMYQn.d.mts.map} +1 -1
  100. package/dist/{types-ijhejJhK-BqfwP5Cc.d.mts → types-Dml0VZT_-XAKfqJXQ.d.mts} +11 -9
  101. package/dist/types-Dml0VZT_-XAKfqJXQ.d.mts.map +1 -0
  102. package/dist/{types-BkTuhW3Z-BJfTjcxS.mjs → types-T18I60_o-6STITPPB.mjs} +25 -5
  103. package/dist/types-T18I60_o-6STITPPB.mjs.map +1 -0
  104. package/dist/types-wgr97mZQ.d.mts +1 -0
  105. package/package.json +18 -18
  106. package/dist/collection-methods-Bmr-a58b.d.mts +0 -1
  107. package/dist/db-D1d75IvM-C88quYVJ.d.mts.map +0 -1
  108. package/dist/expression-4Y1d1hJ_-p9KkcaqT.d.mts.map +0 -1
  109. package/dist/expression-BV_SJGPu.d.mts +0 -2
  110. package/dist/expression-DGu7PRyk-Do_Q7JGF.d.mts.map +0 -1
  111. package/dist/expression-impl-DtbmFnnz-Dal0IYDE.mjs.map +0 -1
  112. package/dist/functions-LZT-hFcE.d.mts +0 -73
  113. package/dist/functions-LZT-hFcE.d.mts.map +0 -1
  114. package/dist/index-reference-BPcC09GP.d.mts +0 -1
  115. package/dist/middleware-Dp3CD7yZ.d.mts +0 -1
  116. package/dist/plan-DINEcqC1.d.mts +0 -2
  117. package/dist/query-lane-context-D0Yc3E72.d.mts +0 -1
  118. package/dist/sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts.map +0 -1
  119. package/dist/types-B62vy44g.d.mts +0 -1
  120. package/dist/types-BkTuhW3Z-BJfTjcxS.mjs.map +0 -1
  121. package/dist/types-ijhejJhK-BqfwP5Cc.d.mts.map +0 -1
@@ -0,0 +1,2 @@
1
+ import "./expression-J_MgSIGa-BGzyGrXf.mjs";
2
+ import "./expression-EefSUmX3-fMeoXkqL.mjs";
@@ -1,6 +1,6 @@
1
- import { c as AnyExpression } from "./types-ijhejJhK-BqfwP5Cc.mjs";
2
- import { o as Expression, x as ScopeField } from "./expression-4Y1d1hJ_-p9KkcaqT.mjs";
3
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-DGu7PRyk.d.mts
1
+ import { c as AnyExpression } from "./types-Dml0VZT_-XAKfqJXQ.mjs";
2
+ import { D as ScopeField, c as Expression } from "./expression-J_MgSIGa-BGzyGrXf.mjs";
3
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-EefSUmX3.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-DGu7PRyk-Do_Q7JGF.d.mts.map
22
+ //# sourceMappingURL=expression-EefSUmX3-fMeoXkqL.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-EefSUmX3-fMeoXkqL.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-EefSUmX3.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"}
@@ -1,13 +1,78 @@
1
1
  import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
2
- import { w as QueryOperationReturn } from "./types-DNTLudNR-DiVulPhL.mjs";
2
+ import { D as QueryOperationTypesBase, w as QueryOperationReturn } from "./types-DNTLudNR-DiVulPhL.mjs";
3
3
  import "./types-CXRxo_TK.mjs";
4
- import { t as SqlLoweringSpec } from "./index-BWWwt5hB.mjs";
5
- import { At as RawQueryColumn, E as CodecRef$1, Mt as RawSqlLiteral, c as AnyExpression, kt as RawQueryAst, wt as ParamRef } from "./types-ijhejJhK-BqfwP5Cc.mjs";
4
+ import { i as SqlOperationEntry, t as SqlLoweringSpec } from "./index-BWWwt5hB.mjs";
5
+ import { At as RawQueryAst, E as CodecRef$1, Nt as RawSqlLiteral, Pt as SelectAst, Q as InsertAst, Ut as UpdateAst, c as AnyExpression, j as DeleteAst, jt as RawQueryColumn, wt as ParamRef } from "./types-Dml0VZT_-XAKfqJXQ.mjs";
6
6
  import { l as SqlStatementStats } from "./driver-types-Bobm0hWv-B9rTP8XQ.mjs";
7
- import { n as SqlQueryPlan } from "./plan-CMqVpPq6-Aoza6Dp2.mjs";
7
+ import { n as SqlQueryPlan } from "./plan-BjQGvtqI-FGvimYfR.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-4Y1d1hJ_.d.mts
10
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-J_MgSIGa.d.mts
11
+ //#region src/functions.d.ts
12
+ type BooleanCodecType = {
13
+ codecId: 'pg/bool@1';
14
+ nullable: boolean;
15
+ };
16
+ declare const SubqueryMarker: unique symbol;
17
+ type Subquery<RowType extends Record<string, ScopeField>> = {
18
+ [SubqueryMarker]: RowType;
19
+ buildAst(): SelectAst;
20
+ getRowFields(): Record<string, ScopeField>;
21
+ };
22
+ /** What the function surface reads from a query context: the codec types and the registered query operations. */
23
+ type FunctionsContext = {
24
+ readonly codecTypes: CodecTypesBase;
25
+ readonly queryOperationTypes: QueryOperationTypesBase;
26
+ };
27
+ type DeriveExtFunctions<OT extends QueryOperationTypesBase> = { [K in keyof OT]: OT[K]['impl']; };
28
+ type BuiltinFunctions<CT extends Record<string, {
29
+ readonly input: unknown;
30
+ }>> = {
31
+ eq: <CodecId extends string>(a: CodecExpression<CodecId, boolean, CT> | null, b: CodecExpression<CodecId, boolean, CT> | null) => Expression<BooleanCodecType>;
32
+ ne: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT> | null, b: CodecExpression<CodecId, N, CT> | null) => Expression<BooleanCodecType>;
33
+ gt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
34
+ gte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
35
+ lt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
36
+ lte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
37
+ and: (...ands: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
38
+ or: (...ors: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
39
+ exists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
40
+ notExists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
41
+ in: {
42
+ <CodecId extends string>(expr: Expression<{
43
+ codecId: CodecId;
44
+ nullable: boolean;
45
+ }>, subquery: Subquery<Record<string, {
46
+ codecId: CodecId;
47
+ nullable: boolean;
48
+ }>>): Expression<BooleanCodecType>;
49
+ <CodecId extends string>(expr: Expression<{
50
+ codecId: CodecId;
51
+ nullable: boolean;
52
+ }>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
53
+ };
54
+ notIn: {
55
+ <CodecId extends string>(expr: Expression<{
56
+ codecId: CodecId;
57
+ nullable: boolean;
58
+ }>, subquery: Subquery<Record<string, {
59
+ codecId: CodecId;
60
+ nullable: boolean;
61
+ }>>): Expression<BooleanCodecType>;
62
+ <CodecId extends string>(expr: Expression<{
63
+ codecId: CodecId;
64
+ nullable: boolean;
65
+ }>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
66
+ };
67
+ readonly raw: RawSqlTag;
68
+ };
69
+ /** The functions a query's callbacks receive: the built-in ones and every query operation the contract's target and extensions register. */
70
+ type Functions<QC extends FunctionsContext> = BuiltinFunctions<QC['codecTypes']> & DeriveExtFunctions<QC['queryOperationTypes']>;
71
+ /**
72
+ * The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.
73
+ */
74
+ declare function createFunctions<QC extends FunctionsContext>(operations: Readonly<Record<string, SqlOperationEntry>>, rawCodecInferer: RawCodecInferer): Functions<QC>;
75
+ //#endregion
11
76
  //#region src/expression.d.ts
12
77
  type ScopeField = {
13
78
  codecId: string;
@@ -262,10 +327,19 @@ type RawSqlTag = (strings: TemplateStringsArray, ...values: RawSqlInterpolation[
262
327
  type RawSqlStatementTag = (strings: TemplateStringsArray, ...values: RawSqlInterpolation[]) => RawSqlStatementBuilder;
263
328
  /** Interpolations that occupy a single position in the parts list. */
264
329
  type RawExprInterpolation = Expression<ScopeField> | ParamRef | RawSqlLiteral;
265
- /** Interpolations a raw template accepts; a {@link RawRowQuery} splices its own parts in. */
266
- type RawSqlInterpolation = RawExprInterpolation | RawRowQuery;
330
+ declare const RowReturningStatementMarker: unique symbol;
331
+ type RowReturningStatement<RowType extends Record<string, ScopeField>> = {
332
+ readonly [RowReturningStatementMarker]?: RowType;
333
+ buildAst(): InsertAst | UpdateAst | DeleteAst;
334
+ };
335
+ /**
336
+ * Interpolations a raw template accepts. A {@link RawRowQuery} splices its own
337
+ * parts in; a builder query or a row-returning builder mutation lands as one
338
+ * statement AST part.
339
+ */
340
+ type RawSqlInterpolation = RawExprInterpolation | RawRowQuery | Subquery<Record<string, ScopeField>> | RowReturningStatement<Record<string, ScopeField>>;
267
341
  /**
268
- * Create a tagged-template builder for raw SQL. The returned tag accepts SQL string fragments interleaved with typed {@link Expression}, {@link ParamRef}, row-returning {@link RawRowQuery}, or bare {@link RawSqlLiteral} interpolations. Call `.returns(spec)` on the result to obtain a typed {@link Expression} whose AST is a {@link RawExpr}.
342
+ * Create a tagged-template builder for raw SQL. The returned tag accepts SQL string fragments interleaved with typed {@link Expression}, {@link ParamRef}, row-returning {@link RawRowQuery}, builder query ({@link Subquery}), row-returning builder mutation ({@link RowReturningStatement}), or bare {@link RawSqlLiteral} interpolations. Call `.returns(spec)` on the result to obtain a typed {@link Expression} whose AST is a {@link RawExpr}.
269
343
  *
270
344
  * Supplied with a {@link RawPlanContext}, the tag also terminates in statement position: `.returnsRow(spec)` and `.affectedCount()` mint a {@link SqlQueryPlan} whose AST is a {@link RawQueryAst}. The context is stated once, here, so authoring sites carry nothing but the template and its terminator.
271
345
  *
@@ -274,5 +348,5 @@ type RawSqlInterpolation = RawExprInterpolation | RawRowQuery;
274
348
  declare function createRawSql(adapter: RawCodecInferer, planContext: RawPlanContext): RawSqlStatementTag;
275
349
  declare function createRawSql(adapter: RawCodecInferer): RawSqlTag;
276
350
  //#endregion
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-4Y1d1hJ_-p9KkcaqT.d.mts.map
351
+ export { SubqueryMarker as A, RawSqlTag as C, ScopeField as D, ScalarListExpression as E, createRawSql as F, isExpression as I, param as L, buildOperation as M, codecOf as N, StorageColumnScopeField as O, createFunctions as P, toExpr as R, RawSqlStatementTag as S, RowReturningStatementMarker as T, RawRowSpec as _, CodecExpression as a, RawSqlInterpolation as b, Expression as c, NoReservedRowColumn as d, RawAffectedCountQuery as f, RawRowQuery as g, RawRow as h, BuiltinFunctions as i, TraitExpression as j, Subquery as k, Functions as l, RawPlanContext as m, BooleanCodecType as n, CodecTypesBase as o, RawCodecInferer as p, BuildOperationSpec as r, CodecValue as s, AffectedCount as t, FunctionsContext as u, RawRowSpecEntry as v, RowReturningStatement as w, RawSqlStatementBuilder as x, RawSqlBuilder as y };
352
+ //# sourceMappingURL=expression-J_MgSIGa-BGzyGrXf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-J_MgSIGa-BGzyGrXf.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-J_MgSIGa.d.mts"],"mappings":";;;;;;;;;;;KAQK;EACH;EACA;;cAEY;KACT,SAAS,gBAAgB,eAAe;GAC1C,iBAAiB;EAClB,YAAY;EACZ,gBAAgB,eAAe;;;KAG5B;WACM,YAAY;WACZ,qBAAqB;;KAE3B,mBAAmB,WAAW,8BAA8B,WAAW,KAAK,GAAG;KAC/E,iBAAiB,WAAW;WACtB;;EAET,KAAK,wBAAwB,GAAG,gBAAgB,kBAAkB,YAAY,GAA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AAa,0BAA0B,WAAW;;;;;UAKpD;WACC,UAAU,SAAS;WACnB;;;;;;;;;;UAUD,YAAY,eAAe,aAAa,SAAS,eAAe,mBAAmB,SAAS,eAAe;;;;;;;;;WAS1G,SAAS;EAClB,YAAY;EACZ,SAAS,aAAa;;cAEV;;;;;;;;;;UAUJ,sBAAsB;YACpB;;;;;;;;UAQF;EACR,SAAS,aAAa;;;;;;;UAOd,+BAA+B;EACvC,WAAW,aAAa,YAAY,MAAM,OAAO,YAAY,OAAO;EACpE,iBAAiB;;;KAGd,aAAa,SAAS,yBAAyB,QAAQ,0BAA0B;;KAEjF,sBAAsB,SAAS,yBAAyB,QAAQ,0BAA0B;;KAE1F,uBAAuB,WAAW,cAAc,WAAW;cAClD;KACT,sBAAsB,gBAAgB,eAAe;YAC9C,+BAA+B;EACzC,YAAY,YAAY,YAAY;;;;;;;KAOjC,sBAAsB,uBAAuB,cAAc,SAAS,eAAe,eAAe,sBAAsB,eAAe;;;;;;;;iBAQ3H,aAAa,SAAS,iBAAiB,aAAa,iBAAiB;iBACrE,aAAa,SAAS,kBAAkB"}
@@ -1,8 +1,8 @@
1
- import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
1
+ import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-T18I60_o-6STITPPB.mjs";
2
2
  import { t as planFromAst } from "./plan-Dh0LbYIv-ubBSdUgl.mjs";
3
3
  import { invariant } from "@prisma/orm-framework/utils/assertions";
4
4
  import { runtimeError } from "@prisma/orm-framework/components/runtime";
5
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-DtbmFnnz.mjs
5
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-CBE-9Bjk.mjs
6
6
  /**
7
7
  * Resolve a raw value or an Expression into an AST expression node.
8
8
  *
@@ -54,21 +54,28 @@ function buildOperation(spec) {
54
54
  buildAst: () => op
55
55
  };
56
56
  }
57
+ function isBuildable(value) {
58
+ return isExpression(value);
59
+ }
57
60
  function resolveInterpolation(adapter, value) {
58
- if (isExpression(value)) return value.buildAst();
59
61
  if (value instanceof ParamRef) return value;
60
62
  if (typeof value === "number" || typeof value === "bigint" || typeof value === "string" || typeof value === "boolean" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });
61
63
  throw runtimeError("RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION", "unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec");
62
64
  }
63
- function isRawRowQuery(value) {
64
- return typeof value === "object" && value !== null && "buildAst" in value && typeof value.buildAst === "function" && "build" in value && typeof value.build === "function";
65
+ function templatePart(adapter, value) {
66
+ if (!isBuildable(value)) return [resolveInterpolation(adapter, value)];
67
+ const ast = value.buildAst();
68
+ if (ast instanceof RawQueryAst) return [...ast.parts];
69
+ if (isMutationAst(ast) && (ast.returning?.length ?? 0) === 0) throw runtimeError("RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION", `an embedded ${ast.kind} must return rows: call \`.returning(...)\` on the builder before interpolating it`, { kind: ast.kind });
70
+ return [ast];
71
+ }
72
+ function isMutationAst(ast) {
73
+ return ast.kind === "insert" || ast.kind === "update" || ast.kind === "delete";
65
74
  }
66
75
  function templateParts(adapter, strings, values) {
67
76
  const parts = [strings[0] ?? ""];
68
77
  values.forEach((value, i) => {
69
- if (isRawRowQuery(value)) parts.push(...value.buildAst().parts);
70
- else parts.push(resolveInterpolation(adapter, value));
71
- parts.push(strings[i + 1] ?? "");
78
+ parts.push(...templatePart(adapter, value), strings[i + 1] ?? "");
72
79
  });
73
80
  return parts;
74
81
  }
@@ -168,4 +175,4 @@ var ExpressionImpl = class {
168
175
  //#endregion
169
176
  export { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };
170
177
 
171
- //# sourceMappingURL=expression-impl-DtbmFnnz-Dal0IYDE.mjs.map
178
+ //# sourceMappingURL=expression-impl-CBE-9Bjk-DFY9E3Fm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-impl-CBE-9Bjk-DFY9E3Fm.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-CBE-9Bjk.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-T18I60_o.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 isBuildable(value) {\n\treturn isExpression(value);\n}\nfunction resolveInterpolation(adapter, value) {\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 templatePart(adapter, value) {\n\tif (!isBuildable(value)) return [resolveInterpolation(adapter, value)];\n\tconst ast = value.buildAst();\n\tif (ast instanceof RawQueryAst) return [...ast.parts];\n\tif (isMutationAst(ast) && (ast.returning?.length ?? 0) === 0) throw runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", `an embedded ${ast.kind} must return rows: call \\`.returning(...)\\` on the builder before interpolating it`, { kind: ast.kind });\n\treturn [ast];\n}\nfunction isMutationAst(ast) {\n\treturn ast.kind === \"insert\" || ast.kind === \"update\" || ast.kind === \"delete\";\n}\nfunction templateParts(adapter, strings, values) {\n\tconst parts = [strings[0] ?? \"\"];\n\tvalues.forEach((value, i) => {\n\t\tparts.push(...templatePart(adapter, value), 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-CBE-9Bjk.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,OAAO,O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,QAAQ,MAAM;EACb,MAAM,UAAU,OAAO,SAAS,WAAW,OAAO,KAAK;EACvD,MAAM,WAAW,OAAO,SAAS,WAAW,QAAQ,KAAK,YAAY;EACrE,MAAM,YAAY;GACjB;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-D1rXCcCk.mjs";
2
2
  import { h as checkSqlDefaultText } from "./validators-Dt-19ywK.mjs";
3
- import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-DSiEx96z.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-BKkP-EG1.mjs";
3
+ import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-CwjA9hMN.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-BheEMYQn.mjs";
5
5
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
6
- import { $ as SqlDescribedContractSpace, $t as fieldOfColumn, A as MigrationPlannerResult, An as resolveTableRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as sqlDefaultFunctions, Bt as columnTakesTemporaryValue, C as MarkedRemoval, Cn as readColumnDefault, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnOf, Dt as TableRenameRequest, E as MigrationPlan, En as requiredColumnMeta, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueSummary, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueSubjects, Gt as convertedColumnOf, H as ReadReportedDefault, Hn as sqlTypeLookupsOf, Ht as contractNamespaceToSchemaIR, I as NoTable, In as runnerFailure, It as appliedStatementsInOrder, J as SchemaTables, Jn as unknownCallNames, Jt as detectDestructiveChanges, K as RequiredColumnMark, Kn as subjectsOfCalls, Kt as createMigrationPlan, L as PlanFieldEventOperationsOptions, Ln as runnerSuccess, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueMeta, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueOf, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnsOfMigration, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsWithoutValueFailure, Q as SqlDefaultFunctionName, Qt as fieldEventStorage, R as PlannedStatement, Rn as scalarTypeNamesOf, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerSuccess, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as removalsOfMigration, Tt as TableRename, U as ReportedBody, Un as storageNameOfOperation, Ut as contractToSchemaIR, V as ReadColumnDefault, Vn as sqlOfSlot, Vt as contractColumns, W as ReportedLiteralDefault, Wn as storedValueOperationIndexes, Wt as convertedColumnMeta, X as SqlControlFamilyInstance, Xn as unmatchedTableRename, Xt as encodeStoredValue, Y as SingleOperationCall, Yn as unmatchedColumnRename, Yt as detectTableNameCaseChanges, Z as SqlControlTargetDescriptor, Zn as unnamedFieldFillOf, Zt as extractCodecControlHooks, _ as FillValueCheck, _n as planStoredRewrites, _t as StoredValueReplacement, a as ColumnRename, an as jsonPathText, at as StatementColumn, b as JsonKeyPath, bn as planVariantRowRewrites, bt as SubjectStorage, c as ContractColumns, cn as modelRenameStorageEffect, ct as StatementPlanningTarget, d as ConvertedColumn, dn as partitionCallsByControlPolicy, dt as StoredKeyFillField, en as fieldRenameStorageEffect, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionIssuesByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planStatements, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventOperations, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as isUnfilledSlot, it as SqlTextSources, j as ModelStorageEffect, jn as rowsHoldingValueFailure, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as resolveColumnRenameAgainst, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as otherSpaceDeclaring, lt as StoredEnumValue, m as FieldEventCall, mn as planFieldEventCalls, mt as StoredRewriteCalls, n as CallSubjects, nn as fillKeyProblem, nt as SqlQuotingRules, o as ColumnRenameRequest, on as keepRowsEdit, ot as StatementOperations, p as DefaultResolverColumn, pn as planEnumValueRewrites, pt as StoredRewrite, q as RowsHoldingValueMark, qn as unconvertedFieldOf, qt as createSqlTextSources, r as CallWithCompanions, rn as fillValueProblem, rt as SqlSlot, s as ContractColumn, sn as keyPathOf, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldStatementColumns, tt as SqlQuote, u as ControlPolicySubject, un as parseJsonPath, ut as StoredKeyFill, v as FillValueTypes, vn as planValueObjectFieldFills, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readReportedDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as plannerFailure, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldRewrites, yt as StoredValueSubject, z as PlannedStatements, zn as slotSource, zt as checkSqlExpressionText } from "./control-DpKSNUXr.mjs";
7
- import { t as resolveIntrospectedColumnType } from "./control-adapter-xJwgaSsO.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-bSfcDUpu.mjs";
6
+ import { $ as SqlDescribedContractSpace, $t as fieldOfColumn, A as MigrationPlannerResult, An as resolveTableRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as sqlDefaultFunctions, Bt as columnTakesTemporaryValue, C as MarkedRemoval, Cn as readColumnDefault, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnOf, Dt as TableRenameRequest, E as MigrationPlan, En as requiredColumnMeta, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueSummary, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueSubjects, Gt as convertedColumnOf, H as ReadReportedDefault, Hn as sqlTypeLookupsOf, Ht as contractNamespaceToSchemaIR, I as NoTable, In as runnerFailure, It as appliedStatementsInOrder, J as SchemaTables, Jn as unknownCallNames, Jt as detectDestructiveChanges, K as RequiredColumnMark, Kn as subjectsOfCalls, Kt as createMigrationPlan, L as PlanFieldEventOperationsOptions, Ln as runnerSuccess, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueMeta, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueOf, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnsOfMigration, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsWithoutValueFailure, Q as SqlDefaultFunctionName, Qt as fieldEventStorage, R as PlannedStatement, Rn as scalarTypeNamesOf, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerSuccess, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as removalsOfMigration, Tt as TableRename, U as ReportedBody, Un as storageNameOfOperation, Ut as contractToSchemaIR, V as ReadColumnDefault, Vn as sqlOfSlot, Vt as contractColumns, W as ReportedLiteralDefault, Wn as storedValueOperationIndexes, Wt as convertedColumnMeta, X as SqlControlFamilyInstance, Xn as unmatchedTableRename, Xt as encodeStoredValue, Y as SingleOperationCall, Yn as unmatchedColumnRename, Yt as detectTableNameCaseChanges, Z as SqlControlTargetDescriptor, Zn as unnamedFieldFillOf, Zt as extractCodecControlHooks, _ as FillValueCheck, _n as planStoredRewrites, _t as StoredValueReplacement, a as ColumnRename, an as jsonPathText, at as StatementColumn, b as JsonKeyPath, bn as planVariantRowRewrites, bt as SubjectStorage, c as ContractColumns, cn as modelRenameStorageEffect, ct as StatementPlanningTarget, d as ConvertedColumn, dn as partitionCallsByControlPolicy, dt as StoredKeyFillField, en as fieldRenameStorageEffect, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionIssuesByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planStatements, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventOperations, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as isUnfilledSlot, it as SqlTextSources, j as ModelStorageEffect, jn as rowsHoldingValueFailure, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as resolveColumnRenameAgainst, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as otherSpaceDeclaring, lt as StoredEnumValue, m as FieldEventCall, mn as planFieldEventCalls, mt as StoredRewriteCalls, n as CallSubjects, nn as fillKeyProblem, nt as SqlQuotingRules, o as ColumnRenameRequest, on as keepRowsEdit, ot as StatementOperations, p as DefaultResolverColumn, pn as planEnumValueRewrites, pt as StoredRewrite, q as RowsHoldingValueMark, qn as unconvertedFieldOf, qt as createSqlTextSources, r as CallWithCompanions, rn as fillValueProblem, rt as SqlSlot, s as ContractColumn, sn as keyPathOf, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldStatementColumns, tt as SqlQuote, u as ControlPolicySubject, un as parseJsonPath, ut as StoredKeyFill, v as FillValueTypes, vn as planValueObjectFieldFills, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readReportedDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as plannerFailure, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldRewrites, yt as StoredValueSubject, z as PlannedStatements, zn as slotSource, zt as checkSqlExpressionText } from "./control-CetpLROv.mjs";
7
+ import { t as resolveIntrospectedColumnType } from "./control-adapter-DQY1jlI0.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-CKjapr26.mjs";
9
9
  import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-CZ5Ks7EA.mjs";
10
- import { t as SqlMigration } from "./migration-OXM3LDdT.mjs";
10
+ import { t as SqlMigration } from "./migration-BRAFOniF.mjs";
11
11
  import { i as sqlTargetTypeConstructors, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-7m3efDkY.mjs";
12
12
  import { n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CEISdj2g-B50Ag_F_.mjs";
13
13
  import { _ as sameInNormalForm, a as InferredTypeConstructor, c as PhaseCallText, d as WrittenPslTypeCall, f as WrittenTypeChoiceCall, g as inferredTypeConstructors, h as inferColumnTypes, i as GeneratorCallsResult, l as PslTypeArgument, m as generatorCallsFor, n as ColumnTypeReadsDefault, o as InferredTypeConstructors, p as fewestArgumentsCall, r as GeneratorCallRefusal, s as IntrospectedTable, t as ColumnTypeOf, u as PslTypeCall, v as toEnumMemberName, y as writtenTypeChoiceCall } from "./psl-build-DCZaF5g4.mjs";
package/dist/family.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { t as resolveStorageTable } from "./resolve-storage-table-BHLQsOza.mjs";
2
2
  import { n as checkSqlDefaultText } from "./validators-qcQteqs2.mjs";
3
- import { c as sqlTargetTypeConstructors, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Hy4pDDr9-DkN0qbPW.mjs";
3
+ import { c as sqlTargetTypeConstructors, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Hy4pDDr9-BsxpXVJL.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-nQ4tG9N7.mjs";
5
5
  import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-BfYfhVR_.mjs";
6
6
  import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-DhKm6hB3.mjs";
7
- import { $ as requiredColumnsOfMigration, A as jsonPathText, B as planFieldEventOperations, C as fieldEventStorage, D as fillKeyProblem, E as fieldStatementColumns, F as parseJsonPath, G as planVariantRowRewrites, H as planStoredRewrites, I as partitionCallsByControlPolicy, J as readColumnDefault, K as plannerFailure, L as partitionIssuesByControlPolicy, M as keyPathOf, N as modelRenameStorageEffect, O as fillValueProblem, P as otherSpaceDeclaring, Q as requiredColumnOf, R as planEnumValueRewrites, S as encodeStoredValue, St as unnamedFieldFillOf, T as fieldRenameStorageEffect, U as planValueObjectFieldFills, V as planStatements, W as planValueObjectFieldRewrites, X as removalsOfMigration, Y as readReportedDefault, Z as requiredColumnMeta, _ as convertedColumnOf, _t as subjectsOfCalls, a as UnfilledValue, at as rowsWithoutValueFailure, b as detectDestructiveChanges, bt as unmatchedColumnRename, c as assembleAuthoringContributions, ct as runnerSuccess, d as columnTakesTemporaryValue, dt as sqlDefaultFunctions, et as resolveColumnRenameAgainst, f as contractColumns, ft as sqlOfSlot, g as convertedColumnMeta, gt as storedValueSubjects, ht as storedValueOperationIndexes, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueOf, j as keepRowsEdit, k as isUnfilledSlot, l as backfillOfDefaultedField, lt as scalarTypeNamesOf, m as contractToSchemaIR, mt as storageNameOfOperation, n as INIT_ADDITIVE_POLICY, nt as rowsHoldingValueFailure, o as acceptedByDataType, ot as rowsWithoutValueSummary, p as contractNamespaceToSchemaIR, pt as sqlTypeLookupsOf, q as plannerSuccess, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueMeta, s as appliedStatementsInOrder, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveTableRenameAgainst, u as checkSqlExpressionText, ut as slotSource, v as createMigrationPlan, vt as unconvertedFieldOf, w as fieldOfColumn, x as detectTableNameCaseChanges, xt as unmatchedTableRename, y as createSqlTextSources, yt as unknownCallNames, z as planFieldEventCalls } from "./control-DcEzEBvW.mjs";
7
+ import { $ as requiredColumnsOfMigration, A as jsonPathText, B as planFieldEventOperations, C as fieldEventStorage, D as fillKeyProblem, E as fieldStatementColumns, F as parseJsonPath, G as planVariantRowRewrites, H as planStoredRewrites, I as partitionCallsByControlPolicy, J as readColumnDefault, K as plannerFailure, L as partitionIssuesByControlPolicy, M as keyPathOf, N as modelRenameStorageEffect, O as fillValueProblem, P as otherSpaceDeclaring, Q as requiredColumnOf, R as planEnumValueRewrites, S as encodeStoredValue, St as unnamedFieldFillOf, T as fieldRenameStorageEffect, U as planValueObjectFieldFills, V as planStatements, W as planValueObjectFieldRewrites, X as removalsOfMigration, Y as readReportedDefault, Z as requiredColumnMeta, _ as convertedColumnOf, _t as subjectsOfCalls, a as UnfilledValue, at as rowsWithoutValueFailure, b as detectDestructiveChanges, bt as unmatchedColumnRename, c as assembleAuthoringContributions, ct as runnerSuccess, d as columnTakesTemporaryValue, dt as sqlDefaultFunctions, et as resolveColumnRenameAgainst, f as contractColumns, ft as sqlOfSlot, g as convertedColumnMeta, gt as storedValueSubjects, ht as storedValueOperationIndexes, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueOf, j as keepRowsEdit, k as isUnfilledSlot, l as backfillOfDefaultedField, lt as scalarTypeNamesOf, m as contractToSchemaIR, mt as storageNameOfOperation, n as INIT_ADDITIVE_POLICY, nt as rowsHoldingValueFailure, o as acceptedByDataType, ot as rowsWithoutValueSummary, p as contractNamespaceToSchemaIR, pt as sqlTypeLookupsOf, q as plannerSuccess, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueMeta, s as appliedStatementsInOrder, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveTableRenameAgainst, u as checkSqlExpressionText, ut as slotSource, v as createMigrationPlan, vt as unconvertedFieldOf, w as fieldOfColumn, x as detectTableNameCaseChanges, xt as unmatchedTableRename, y as createSqlTextSources, yt as unknownCallNames, z as planFieldEventCalls } from "./control-Bbhie2cs.mjs";
8
8
  import { t as resolveIntrospectedColumnType } from "./control-adapter-BetaUm2y.mjs";
9
9
  import { t as arraysEqual } from "./diff-C1rFOhek.mjs";
10
10
  import { t as SqlSchemaVerifierBase } from "./ir-DzsUDO8e.mjs";
@@ -1,3 +1,3 @@
1
- import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-DSiEx96z.mjs";
2
- import { t as resolveIntrospectedColumnType } from "./control-adapter-xJwgaSsO.mjs";
1
+ import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-BfyLe7rh-CwjA9hMN.mjs";
2
+ import { t as resolveIntrospectedColumnType } from "./control-adapter-DQY1jlI0.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-Dt-19ywK.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-BKkP-EG1.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-BheEMYQn.mjs";
3
3
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
4
- import { $ as SqlDescribedContractSpace, $t as fieldOfColumn, A as MigrationPlannerResult, An as resolveTableRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as sqlDefaultFunctions, Bt as columnTakesTemporaryValue, C as MarkedRemoval, Cn as readColumnDefault, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnOf, Dt as TableRenameRequest, E as MigrationPlan, En as requiredColumnMeta, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueSummary, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueSubjects, Gt as convertedColumnOf, H as ReadReportedDefault, Hn as sqlTypeLookupsOf, Ht as contractNamespaceToSchemaIR, I as NoTable, In as runnerFailure, It as appliedStatementsInOrder, J as SchemaTables, Jn as unknownCallNames, Jt as detectDestructiveChanges, K as RequiredColumnMark, Kn as subjectsOfCalls, Kt as createMigrationPlan, L as PlanFieldEventOperationsOptions, Ln as runnerSuccess, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueMeta, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueOf, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnsOfMigration, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsWithoutValueFailure, Pt as _default, Q as SqlDefaultFunctionName, Qt as fieldEventStorage, R as PlannedStatement, Rn as scalarTypeNamesOf, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerSuccess, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as removalsOfMigration, Tt as TableRename, U as ReportedBody, Un as storageNameOfOperation, Ut as contractToSchemaIR, V as ReadColumnDefault, Vn as sqlOfSlot, Vt as contractColumns, W as ReportedLiteralDefault, Wn as storedValueOperationIndexes, Wt as convertedColumnMeta, X as SqlControlFamilyInstance, Xn as unmatchedTableRename, Xt as encodeStoredValue, Y as SingleOperationCall, Yn as unmatchedColumnRename, Yt as detectTableNameCaseChanges, Z as SqlControlTargetDescriptor, Zn as unnamedFieldFillOf, Zt as extractCodecControlHooks, _ as FillValueCheck, _n as planStoredRewrites, _t as StoredValueReplacement, a as ColumnRename, an as jsonPathText, at as StatementColumn, b as JsonKeyPath, bn as planVariantRowRewrites, bt as SubjectStorage, c as ContractColumns, cn as modelRenameStorageEffect, ct as StatementPlanningTarget, d as ConvertedColumn, dn as partitionCallsByControlPolicy, dt as StoredKeyFillField, en as fieldRenameStorageEffect, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionIssuesByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planStatements, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventOperations, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as isUnfilledSlot, it as SqlTextSources, j as ModelStorageEffect, jn as rowsHoldingValueFailure, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as resolveColumnRenameAgainst, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as otherSpaceDeclaring, lt as StoredEnumValue, m as FieldEventCall, mn as planFieldEventCalls, mt as StoredRewriteCalls, n as CallSubjects, nn as fillKeyProblem, nt as SqlQuotingRules, o as ColumnRenameRequest, on as keepRowsEdit, ot as StatementOperations, p as DefaultResolverColumn, pn as planEnumValueRewrites, pt as StoredRewrite, q as RowsHoldingValueMark, qn as unconvertedFieldOf, qt as createSqlTextSources, r as CallWithCompanions, rn as fillValueProblem, rt as SqlSlot, s as ContractColumn, sn as keyPathOf, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldStatementColumns, tt as SqlQuote, u as ControlPolicySubject, un as parseJsonPath, ut as StoredKeyFill, v as FillValueTypes, vn as planValueObjectFieldFills, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readReportedDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as plannerFailure, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldRewrites, yt as StoredValueSubject, z as PlannedStatements, zn as slotSource, zt as checkSqlExpressionText } from "./control-DpKSNUXr.mjs";
4
+ import { $ as SqlDescribedContractSpace, $t as fieldOfColumn, A as MigrationPlannerResult, An as resolveTableRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as sqlDefaultFunctions, Bt as columnTakesTemporaryValue, C as MarkedRemoval, Cn as readColumnDefault, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnOf, Dt as TableRenameRequest, E as MigrationPlan, En as requiredColumnMeta, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueSummary, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueSubjects, Gt as convertedColumnOf, H as ReadReportedDefault, Hn as sqlTypeLookupsOf, Ht as contractNamespaceToSchemaIR, I as NoTable, In as runnerFailure, It as appliedStatementsInOrder, J as SchemaTables, Jn as unknownCallNames, Jt as detectDestructiveChanges, K as RequiredColumnMark, Kn as subjectsOfCalls, Kt as createMigrationPlan, L as PlanFieldEventOperationsOptions, Ln as runnerSuccess, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueMeta, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueOf, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnsOfMigration, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsWithoutValueFailure, Pt as _default, Q as SqlDefaultFunctionName, Qt as fieldEventStorage, R as PlannedStatement, Rn as scalarTypeNamesOf, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerSuccess, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as removalsOfMigration, Tt as TableRename, U as ReportedBody, Un as storageNameOfOperation, Ut as contractToSchemaIR, V as ReadColumnDefault, Vn as sqlOfSlot, Vt as contractColumns, W as ReportedLiteralDefault, Wn as storedValueOperationIndexes, Wt as convertedColumnMeta, X as SqlControlFamilyInstance, Xn as unmatchedTableRename, Xt as encodeStoredValue, Y as SingleOperationCall, Yn as unmatchedColumnRename, Yt as detectTableNameCaseChanges, Z as SqlControlTargetDescriptor, Zn as unnamedFieldFillOf, Zt as extractCodecControlHooks, _ as FillValueCheck, _n as planStoredRewrites, _t as StoredValueReplacement, a as ColumnRename, an as jsonPathText, at as StatementColumn, b as JsonKeyPath, bn as planVariantRowRewrites, bt as SubjectStorage, c as ContractColumns, cn as modelRenameStorageEffect, ct as StatementPlanningTarget, d as ConvertedColumn, dn as partitionCallsByControlPolicy, dt as StoredKeyFillField, en as fieldRenameStorageEffect, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionIssuesByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planStatements, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventOperations, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as isUnfilledSlot, it as SqlTextSources, j as ModelStorageEffect, jn as rowsHoldingValueFailure, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as resolveColumnRenameAgainst, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as otherSpaceDeclaring, lt as StoredEnumValue, m as FieldEventCall, mn as planFieldEventCalls, mt as StoredRewriteCalls, n as CallSubjects, nn as fillKeyProblem, nt as SqlQuotingRules, o as ColumnRenameRequest, on as keepRowsEdit, ot as StatementOperations, p as DefaultResolverColumn, pn as planEnumValueRewrites, pt as StoredRewrite, q as RowsHoldingValueMark, qn as unconvertedFieldOf, qt as createSqlTextSources, r as CallWithCompanions, rn as fillValueProblem, rt as SqlSlot, s as ContractColumn, sn as keyPathOf, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldStatementColumns, tt as SqlQuote, u as ControlPolicySubject, un as parseJsonPath, ut as StoredKeyFill, v as FillValueTypes, vn as planValueObjectFieldFills, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readReportedDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as plannerFailure, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldRewrites, yt as StoredValueSubject, z as PlannedStatements, zn as slotSource, zt as checkSqlExpressionText } from "./control-CetpLROv.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, type FillValueCheck, type FillValueTypes, INIT_ADDITIVE_POLICY, type JsonKeyPath, type JsonPath, type JsonPathStep, type MarkedRemoval, 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 PlannedStatement, type PlannedStatements, type PlannedStoredRewrites, type ReadColumnDefault, type ReadReportedDefault, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type RowsHoldingValueMark, 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 StatementOperations, type StatementOwnership, type StatementPlanningTarget, type StorageTypePlanResult, type StoredEnumValue, type StoredKeyFill, type StoredKeyFillField, type StoredKeyRewrite, type StoredRewrite, type StoredRewriteCalls, type StoredValueCallClasses, type StoredValueCodec, type StoredValueReplacement, type StoredValueRewrite, type StoredValueSubject, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableMove, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, type TargetRefusal, UnfilledValue, type UnnamedFieldFill, type VariantRowRewrite, type WorkingSchemaOrigins, acceptedByDataType, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, modelRenameStorageEffect, otherSpaceDeclaring, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf };
@@ -1,4 +1,4 @@
1
1
  import { n as checkSqlDefaultText } from "./validators-qcQteqs2.mjs";
2
2
  import { s as extractCodecControlHooks } from "./schema-verify-C3wbdviw-nQ4tG9N7.mjs";
3
- import { $ as requiredColumnsOfMigration, A as jsonPathText, B as planFieldEventOperations, C as fieldEventStorage, D as fillKeyProblem, E as fieldStatementColumns, F as parseJsonPath, G as planVariantRowRewrites, H as planStoredRewrites, I as partitionCallsByControlPolicy, J as readColumnDefault, K as plannerFailure, L as partitionIssuesByControlPolicy, M as keyPathOf, N as modelRenameStorageEffect, O as fillValueProblem, P as otherSpaceDeclaring, Q as requiredColumnOf, R as planEnumValueRewrites, S as encodeStoredValue, St as unnamedFieldFillOf, T as fieldRenameStorageEffect, U as planValueObjectFieldFills, V as planStatements, W as planValueObjectFieldRewrites, X as removalsOfMigration, Y as readReportedDefault, Z as requiredColumnMeta, _ as convertedColumnOf, _t as subjectsOfCalls, a as UnfilledValue, at as rowsWithoutValueFailure, b as detectDestructiveChanges, bt as unmatchedColumnRename, c as assembleAuthoringContributions, ct as runnerSuccess, d as columnTakesTemporaryValue, dt as sqlDefaultFunctions, et as resolveColumnRenameAgainst, f as contractColumns, ft as sqlOfSlot, g as convertedColumnMeta, gt as storedValueSubjects, h as control_default, ht as storedValueOperationIndexes, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueOf, j as keepRowsEdit, k as isUnfilledSlot, l as backfillOfDefaultedField, lt as scalarTypeNamesOf, m as contractToSchemaIR, mt as storageNameOfOperation, n as INIT_ADDITIVE_POLICY, nt as rowsHoldingValueFailure, o as acceptedByDataType, ot as rowsWithoutValueSummary, p as contractNamespaceToSchemaIR, pt as sqlTypeLookupsOf, q as plannerSuccess, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueMeta, s as appliedStatementsInOrder, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveTableRenameAgainst, u as checkSqlExpressionText, ut as slotSource, v as createMigrationPlan, vt as unconvertedFieldOf, w as fieldOfColumn, x as detectTableNameCaseChanges, xt as unmatchedTableRename, y as createSqlTextSources, yt as unknownCallNames, z as planFieldEventCalls } from "./control-DcEzEBvW.mjs";
3
+ import { $ as requiredColumnsOfMigration, A as jsonPathText, B as planFieldEventOperations, C as fieldEventStorage, D as fillKeyProblem, E as fieldStatementColumns, F as parseJsonPath, G as planVariantRowRewrites, H as planStoredRewrites, I as partitionCallsByControlPolicy, J as readColumnDefault, K as plannerFailure, L as partitionIssuesByControlPolicy, M as keyPathOf, N as modelRenameStorageEffect, O as fillValueProblem, P as otherSpaceDeclaring, Q as requiredColumnOf, R as planEnumValueRewrites, S as encodeStoredValue, St as unnamedFieldFillOf, T as fieldRenameStorageEffect, U as planValueObjectFieldFills, V as planStatements, W as planValueObjectFieldRewrites, X as removalsOfMigration, Y as readReportedDefault, Z as requiredColumnMeta, _ as convertedColumnOf, _t as subjectsOfCalls, a as UnfilledValue, at as rowsWithoutValueFailure, b as detectDestructiveChanges, bt as unmatchedColumnRename, c as assembleAuthoringContributions, ct as runnerSuccess, d as columnTakesTemporaryValue, dt as sqlDefaultFunctions, et as resolveColumnRenameAgainst, f as contractColumns, ft as sqlOfSlot, g as convertedColumnMeta, gt as storedValueSubjects, h as control_default, ht as storedValueOperationIndexes, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueOf, j as keepRowsEdit, k as isUnfilledSlot, l as backfillOfDefaultedField, lt as scalarTypeNamesOf, m as contractToSchemaIR, mt as storageNameOfOperation, n as INIT_ADDITIVE_POLICY, nt as rowsHoldingValueFailure, o as acceptedByDataType, ot as rowsWithoutValueSummary, p as contractNamespaceToSchemaIR, pt as sqlTypeLookupsOf, q as plannerSuccess, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueMeta, s as appliedStatementsInOrder, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveTableRenameAgainst, u as checkSqlExpressionText, ut as slotSource, v as createMigrationPlan, vt as unconvertedFieldOf, w as fieldOfColumn, x as detectTableNameCaseChanges, xt as unmatchedTableRename, y as createSqlTextSources, yt as unknownCallNames, z as planFieldEventCalls } from "./control-Bbhie2cs.mjs";
4
4
  export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, NO_RENAMED_ORIGINS, TABLE_NAME_CASE_CHANGED_CODE, UnfilledValue, acceptedByDataType, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, modelRenameStorageEffect, otherSpaceDeclaring, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf };
@@ -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-bSfcDUpu.mjs";
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-CKjapr26.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-OXM3LDdT.mjs";
1
+ import { t as SqlMigration } from "./migration-BRAFOniF.mjs";
2
2
  export { SqlMigration as Migration };
@@ -1,6 +1,6 @@
1
1
  import { f as sqlExpressionRegistration } from "./sql-expression-CKgKznXS.mjs";
2
2
  import { b as sqlAttributeSpecs } from "./psl-field-resolution-GN4iup8d-CcMRk9It.mjs";
3
- import { a as sqlFamilyGeneratorFunctions, c as sqlTargetTypeConstructors, i as sqlFamilyGeneratorDescriptors, n as sqlFamilyAuthoringTypes, o as sqlFamilyPslBlockDescriptors, r as sqlFamilyEntityTypes, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Hy4pDDr9-DkN0qbPW.mjs";
3
+ import { a as sqlFamilyGeneratorFunctions, c as sqlTargetTypeConstructors, i as sqlFamilyGeneratorDescriptors, n as sqlFamilyAuthoringTypes, o as sqlFamilyPslBlockDescriptors, r as sqlFamilyEntityTypes, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Hy4pDDr9-BsxpXVJL.mjs";
4
4
  //#region ../../../2-sql-family/9-family/dist/pack.mjs
5
5
  const sqlFamilyPack = {
6
6
  kind: "family",
@@ -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-BkTuhW3Z-BJfTjcxS.mjs";
2
- import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-Dal0IYDE.mjs";
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-T18I60_o-6STITPPB.mjs";
2
+ import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-CBE-9Bjk-DFY9E3Fm.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-DO1k8KLB.mjs.map
88
+ //# sourceMappingURL=functions-DKod0_pU.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions-DO1k8KLB.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,e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;EACrB,KAAK,GAAG,MAAM,WAAW,GAAG,GAAG,IAAI;EACnC,MAAM,GAAG,MAAM,WAAW,GAAG,GAAG,KAAK;EACrC,KAAK,GAAG,MAAM,WAAW,GAAG,GAAG,IAAI;EACnC,MAAM,GAAG,MAAM,WAAW,GAAG,GAAG,KAAK;EACrC,MAAM,GAAG,UAAU,SAAS,QAAQ,GAAG,MAAM,IAAI,aAAa,CAAC,CAAC;EAChE,KAAK,GAAG,UAAU,SAAS,OAAO,GAAG,MAAM,IAAI,aAAa,CAAC,CAAC;EAC9D,SAAS,aAAa,SAAS,WAAW,OAAO,SAAS,SAAS,CAAC,CAAC;EACrE,YAAY,aAAa,SAAS,WAAW,UAAU,SAAS,SAAS,CAAC,CAAC;EAC3E,KAAK,MAAM,qBAAqB,UAAU,MAAM,kBAAkB,IAAI;EACtE,QAAQ,MAAM,qBAAqB,UAAU,MAAM,kBAAkB,OAAO;EAC5E,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"}
1
+ {"version":3,"file":"functions-DKod0_pU.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-T18I60_o.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-CBE-9Bjk.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;AAC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C5E,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"}
@@ -0,0 +1 @@
1
+ import "./expression-J_MgSIGa-BGzyGrXf.mjs";
@@ -1,6 +1,6 @@
1
1
  import { n as generatedIdColumnAliases } from "./generated-id-column-aliases-DPUii1fN.mjs";
2
2
  import { l as enumType } from "./contract-builder-m9XW9MgR.mjs";
3
- import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-C3itulLi.mjs";
3
+ import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-Dh0-El6s.mjs";
4
4
  import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
5
5
  import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
6
6
  import { blindCast } from "@prisma/orm-framework/utils/casts";
@@ -402,4 +402,4 @@ function checkedInteger(integer, dataTypes, allowed, refusal) {
402
402
  //#endregion
403
403
  export { sqlFamilyGeneratorFunctions as a, sqlTargetTypeConstructors as c, sqlFamilyGeneratorDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyPslBlockDescriptors as o, sqlFamilyEntityTypes as r, sqlIntegerArgumentGeneratorFunctions as s, idGeneratorFunctionBindings as t };
404
404
 
405
- //# sourceMappingURL=generator-functions-Hy4pDDr9-DkN0qbPW.mjs.map
405
+ //# sourceMappingURL=generator-functions-Hy4pDDr9-BsxpXVJL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator-functions-Hy4pDDr9-DkN0qbPW.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Hy4pDDr9.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 { generatedIdColumnAliases } from \"@internal/sql-contract/generated-id-column-aliases\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\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-types.ts\nconst sqlFamilyAuthoringTypes = {\n\tRaw: {\n\t\tkind: \"typeConstructor\",\n\t\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\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: \"sql/expression\",\n\t\t\tname: \"sql\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/raw@1\",\n\t\t\ttypeParams: { sql: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tsql: generatedIdColumnAliases\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: {\n\t\tString: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\t\targs: [{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: input.sizeType,\n\t\t\t\tname: \"length\"\n\t\t\t}],\n\t\t\toutput: {\n\t\t\t\tcodecId: \"sql/varchar@1\",\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} }\n\t\t\t}\n\t\t},\n\t\tChar: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tdocumentation: \"Fixed-length text with a required character length.\",\n\t\t\targs: [{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: input.sizeType,\n\t\t\t\tname: \"length\"\n\t\t\t}],\n\t\t\toutput: {\n\t\t\t\tcodecId: \"sql/char@1\",\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} }\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, sqlFamilyPslBlockDescriptors as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyEntityTypes as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-Hy4pDDr9.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,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,M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AAK,IAAI,yBAAyB,aAAa,QAAQ,SAAS;GAClL,eAAe,4BAA4B,aAAa;EACzD,CAAC;CACF;AACD;AACA,SAAS,gBAAgB,SAAS,WAAW;CAC5C,OAAO;EACN,eAAe;EACf,YAAY,CAAC;GACZ,KAAK;GACL,MAAM,SAAS,eAAe,SAAS,WAAW;IACjD,OAAO,gBAAgB,YAAY,IAAI,MAAM,YAAY;IACzD,aAAa,CAAC;GACf,IAAI,MAAM,YAAY,aAAa,IAAI,IAAI,KAAK,IAAI,gCAAgC,YAAY,IAAI,OAAO,YAAY,IAAI,QAAQ,SAAS,CAAC;GAC7I,eAAe,iCAAiC,YAAY,IAAI,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-Hy4pDDr9-BsxpXVJL.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Hy4pDDr9.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 { generatedIdColumnAliases } from \"@internal/sql-contract/generated-id-column-aliases\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\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-types.ts\nconst sqlFamilyAuthoringTypes = {\n\tRaw: {\n\t\tkind: \"typeConstructor\",\n\t\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\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: \"sql/expression\",\n\t\t\tname: \"sql\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/raw@1\",\n\t\t\ttypeParams: { sql: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tsql: generatedIdColumnAliases\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: {\n\t\tString: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\t\targs: [{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: input.sizeType,\n\t\t\t\tname: \"length\"\n\t\t\t}],\n\t\t\toutput: {\n\t\t\t\tcodecId: \"sql/varchar@1\",\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} }\n\t\t\t}\n\t\t},\n\t\tChar: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tdocumentation: \"Fixed-length text with a required character length.\",\n\t\t\targs: [{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: input.sizeType,\n\t\t\t\tname: \"length\"\n\t\t\t}],\n\t\t\toutput: {\n\t\t\t\tcodecId: \"sql/char@1\",\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} }\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, sqlFamilyPslBlockDescriptors as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyEntityTypes as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-Hy4pDDr9.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,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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