@prisma/orm-family-sql 8.0.0-rc.24-dev.40 → 8.0.0-rc.24-dev.42

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 (150) hide show
  1. package/dist/{aggregate-descriptor-registry-oSsBuRHQ.mjs → aggregate-descriptor-registry-CRgsKIJY.mjs} +2 -2
  2. package/dist/{aggregate-descriptor-registry-oSsBuRHQ.mjs.map → aggregate-descriptor-registry-CRgsKIJY.mjs.map} +1 -1
  3. package/dist/{ast-BpFfUmb_.mjs → ast-B1GOjYn-.mjs} +2 -2
  4. package/dist/ast-B1GOjYn-.mjs.map +1 -0
  5. package/dist/{ast-DvD53wSW.d.mts → ast-DZnTuPWA.d.mts} +3 -3
  6. package/dist/{ast-DvD53wSW.d.mts.map → ast-DZnTuPWA.d.mts.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 +39 -23
  10. package/dist/builder__runtime.mjs.map +1 -1
  11. package/dist/builder__types.d.mts +5 -5
  12. package/dist/{codec-descriptor-registry-UiFDvDj4.mjs → codec-descriptor-registry-CQ9M2B3L.mjs} +4 -2
  13. package/dist/codec-descriptor-registry-CQ9M2B3L.mjs.map +1 -0
  14. package/dist/collection-methods-CO0bz9PJ.d.mts +1 -0
  15. package/dist/{collection-methods-As4pXm7B-3xgTSoyU.d.mts → collection-methods-HlRizYfF-DKdq47dN.d.mts} +3 -3
  16. package/dist/{collection-methods-As4pXm7B-3xgTSoyU.d.mts.map → collection-methods-HlRizYfF-DKdq47dN.d.mts.map} +1 -1
  17. package/dist/{config-types-CFByuvww.mjs → config-types-tSsDtIC-.mjs} +2 -2
  18. package/dist/{config-types-CFByuvww.mjs.map → config-types-tSsDtIC-.mjs.map} +1 -1
  19. package/dist/{contract-builder-DIb0oV8O.mjs → contract-builder-piV2RUop.mjs} +3 -3
  20. package/dist/{contract-builder-DIb0oV8O.mjs.map → contract-builder-piV2RUop.mjs.map} +1 -1
  21. package/dist/contract-prisma7__provider.mjs +5 -5
  22. package/dist/contract-psl.mjs +1 -1
  23. package/dist/contract-psl__attribute-specs.mjs +1 -1
  24. package/dist/contract-psl__provider.mjs +2 -2
  25. package/dist/contract-psl__provider.mjs.map +1 -1
  26. package/dist/contract-ts.mjs +3 -3
  27. package/dist/contract-ts__config-types.mjs +1 -1
  28. package/dist/contract-ts__contract-builder.mjs +2 -2
  29. package/dist/contract.mjs +1 -1
  30. package/dist/contract__validators.mjs +1 -1
  31. package/dist/{control-BdGTPj7m.mjs → control-Cxrfn6YO.mjs} +28 -16
  32. package/dist/control-Cxrfn6YO.mjs.map +1 -0
  33. package/dist/{control-BwL5tCj4.d.mts → control-DaBIvroP.d.mts} +6 -6
  34. package/dist/{control-BwL5tCj4.d.mts.map → control-DaBIvroP.d.mts.map} +1 -1
  35. package/dist/{control-adapter-0z3ce44U-BQ26ercw.d.mts → control-adapter-0z3ce44U-OE4VID0O.d.mts} +4 -4
  36. package/dist/{control-adapter-0z3ce44U-BQ26ercw.d.mts.map → control-adapter-0z3ce44U-OE4VID0O.d.mts.map} +1 -1
  37. package/dist/{control-adapter-DRLco_j0.d.mts → control-adapter-CC_Vys2q.d.mts} +2 -2
  38. package/dist/{control-adapter-DRLco_j0.d.mts.map → control-adapter-CC_Vys2q.d.mts.map} +1 -1
  39. package/dist/{db-by-MuHF2-B7uz_0VW.d.mts → db-by-MuHF2-Dz4IwRsO.d.mts} +10 -10
  40. package/dist/{db-by-MuHF2-B7uz_0VW.d.mts.map → db-by-MuHF2-Dz4IwRsO.d.mts.map} +1 -1
  41. package/dist/{ddl-types-D93zTpm9-DhSkpX0K.d.mts → ddl-types-BpNk9lrL-5rXDLalb.d.mts} +3 -3
  42. package/dist/{ddl-types-D93zTpm9-DhSkpX0K.d.mts.map → ddl-types-BpNk9lrL-5rXDLalb.d.mts.map} +1 -1
  43. package/dist/{derived-checks-9Ku2scaj-0iT0uU_6.mjs → derived-checks-9Ku2scaj-BkBpXofB.mjs} +2 -2
  44. package/dist/{derived-checks-9Ku2scaj-0iT0uU_6.mjs.map → derived-checks-9Ku2scaj-BkBpXofB.mjs.map} +1 -1
  45. package/dist/{diff-DZHlisyY.d.mts → diff-ox1r2eqR.d.mts} +2 -2
  46. package/dist/{diff-DZHlisyY.d.mts.map → diff-ox1r2eqR.d.mts.map} +1 -1
  47. package/dist/{exports-D4xgPPzV-B5oJAMdP.mjs → exports-D4xgPPzV-BWjldMmf.mjs} +4 -4
  48. package/dist/{exports-D4xgPPzV-B5oJAMdP.mjs.map → exports-D4xgPPzV-BWjldMmf.mjs.map} +1 -1
  49. package/dist/{expression-DYRYmkMl-BMKxN8Wf.d.mts → expression-CbgzZLXY-Bzqi0ZTM.d.mts} +4 -4
  50. package/dist/{expression-DYRYmkMl-BMKxN8Wf.d.mts.map → expression-CbgzZLXY-Bzqi0ZTM.d.mts.map} +1 -1
  51. package/dist/expression-DBDD1QR1.d.mts +2 -0
  52. package/dist/{expression-VJWwxbUB-BtNDaTCt.d.mts → expression-DKXV5hFJ-4ZqJOTJH.d.mts} +4 -4
  53. package/dist/expression-DKXV5hFJ-4ZqJOTJH.d.mts.map +1 -0
  54. package/dist/{expression-impl-C5Ha-fXs-CxXn8gDo.mjs → expression-impl-D9Le3c2y-MF0Fctq9.mjs} +3 -3
  55. package/dist/{expression-impl-C5Ha-fXs-CxXn8gDo.mjs.map → expression-impl-D9Le3c2y-MF0Fctq9.mjs.map} +1 -1
  56. package/dist/family.d.mts +6 -6
  57. package/dist/family.mjs +4 -4
  58. package/dist/family__control-adapter.d.mts +2 -2
  59. package/dist/family__control.d.mts +2 -2
  60. package/dist/family__control.mjs +2 -2
  61. package/dist/family__diff.d.mts +1 -1
  62. package/dist/family__ir.mjs +1 -1
  63. package/dist/family__migration.d.mts +1 -1
  64. package/dist/family__pack.mjs +2 -2
  65. package/dist/{functions-DGketpiK.mjs → functions-BV4CyVZ0.mjs} +3 -3
  66. package/dist/{functions-DGketpiK.mjs.map → functions-BV4CyVZ0.mjs.map} +1 -1
  67. package/dist/functions-CF7EOqOH.d.mts +1 -0
  68. package/dist/{generator-functions-Bze9nVHL-BK4YIqLK.mjs → generator-functions-Bze9nVHL-EURgrMFd.mjs} +3 -3
  69. package/dist/{generator-functions-Bze9nVHL-BK4YIqLK.mjs.map → generator-functions-Bze9nVHL-EURgrMFd.mjs.map} +1 -1
  70. package/dist/{index-CXtZjjgy.d.mts → index-Dlup-3Az.d.mts} +17 -17
  71. package/dist/{index-CXtZjjgy.d.mts.map → index-Dlup-3Az.d.mts.map} +1 -1
  72. package/dist/index-reference-j3KdvbVm.d.mts +1 -0
  73. package/dist/{index-reference-CjvRzUh1-CG0Ouv6i.d.mts → index-reference-kUL7aEBI-DYcs4N7J.d.mts} +3 -3
  74. package/dist/{index-reference-CjvRzUh1-CG0Ouv6i.d.mts.map → index-reference-kUL7aEBI-DYcs4N7J.d.mts.map} +1 -1
  75. package/dist/{interpreter-DoQwVOyS-jsuDJlaX.mjs → interpreter-CMHH_zlH-BOZVPx6S.mjs} +10 -10
  76. package/dist/interpreter-CMHH_zlH-BOZVPx6S.mjs.map +1 -0
  77. package/dist/{middleware-DzFPUERE-C6RrGmcp.d.mts → middleware-BZYekCO2-DeY82fwI.d.mts} +3 -3
  78. package/dist/{middleware-DzFPUERE-C6RrGmcp.d.mts.map → middleware-BZYekCO2-DeY82fwI.d.mts.map} +1 -1
  79. package/dist/middleware-Q-P3nMQA.d.mts +1 -0
  80. package/dist/{migration-BUWF9_Tx.d.mts → migration-aQa4CVb-.d.mts} +2 -2
  81. package/dist/{migration-BUWF9_Tx.d.mts.map → migration-aQa4CVb-.d.mts.map} +1 -1
  82. package/dist/orm-client.d.mts +17 -17
  83. package/dist/orm-client.mjs +21 -18
  84. package/dist/orm-client.mjs.map +1 -1
  85. package/dist/{plan-Dv6v5_y4-CGWEjfCv.d.mts → plan-Dd6M8olW-Dynb9vKp.d.mts} +3 -3
  86. package/dist/{plan-Dv6v5_y4-CGWEjfCv.d.mts.map → plan-Dd6M8olW-Dynb9vKp.d.mts.map} +1 -1
  87. package/dist/plan-G5_dBmgg.d.mts +2 -0
  88. package/dist/{psl-field-resolution-CpxUePg1-DIrhHYx0.mjs → psl-field-resolution-CpxUePg1-CTitB6W5.mjs} +3 -3
  89. package/dist/{psl-field-resolution-CpxUePg1-DIrhHYx0.mjs.map → psl-field-resolution-CpxUePg1-CTitB6W5.mjs.map} +1 -1
  90. package/dist/{query-lane-context-BetHj4j--D3S5nucp.d.mts → query-lane-context-D4U6ox8I-CGLC-1HK.d.mts} +5 -5
  91. package/dist/{query-lane-context-BetHj4j--D3S5nucp.d.mts.map → query-lane-context-D4U6ox8I-CGLC-1HK.d.mts.map} +1 -1
  92. package/dist/query-lane-context-TQxP0UjW.d.mts +1 -0
  93. package/dist/relational-core.d.mts +13 -13
  94. package/dist/relational-core.mjs +4 -4
  95. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  96. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  97. package/dist/relational-core__ast.d.mts +4 -4
  98. package/dist/relational-core__ast.mjs +3 -3
  99. package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
  100. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  101. package/dist/relational-core__collection-methods.d.mts +2 -2
  102. package/dist/relational-core__contract-free.d.mts +2 -2
  103. package/dist/relational-core__contract-free.mjs +13 -4
  104. package/dist/relational-core__contract-free.mjs.map +1 -1
  105. package/dist/relational-core__expression.d.mts +3 -3
  106. package/dist/relational-core__expression.mjs +1 -1
  107. package/dist/relational-core__functions.d.mts +2 -2
  108. package/dist/relational-core__functions.mjs +1 -1
  109. package/dist/relational-core__index-reference.d.mts +2 -2
  110. package/dist/relational-core__middleware.d.mts +2 -2
  111. package/dist/relational-core__plan.d.mts +3 -3
  112. package/dist/relational-core__query-lane-context.d.mts +2 -2
  113. package/dist/relational-core__types.d.mts +2 -2
  114. package/dist/runtime.d.mts +4 -4
  115. package/dist/runtime.mjs +1 -1
  116. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  117. package/dist/{sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs → sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs} +2 -2
  118. package/dist/{sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs.map → sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs.map} +1 -1
  119. package/dist/{sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts → sql-execution-plan-BKmtONvF-bBXCQ0s1.d.mts} +3 -3
  120. package/dist/sql-execution-plan-BKmtONvF-bBXCQ0s1.d.mts.map +1 -0
  121. package/dist/{transaction-state-B4FVsvO7-DpvKYHSB.d.mts → transaction-state-B4FVsvO7-C0kgrpwC.d.mts} +9 -9
  122. package/dist/{transaction-state-B4FVsvO7-DpvKYHSB.d.mts.map → transaction-state-B4FVsvO7-C0kgrpwC.d.mts.map} +1 -1
  123. package/dist/{types-DEbNJhyS-CY7Ye2vN.d.mts → types-BseDMzbO-jM1a1F4N.d.mts} +5 -3
  124. package/dist/{types-DEbNJhyS-CY7Ye2vN.d.mts.map → types-BseDMzbO-jM1a1F4N.d.mts.map} +1 -1
  125. package/dist/{types-DzQmUrUm-ColHE4Av.mjs → types-BtItVHx6-BEDme1ZL.mjs} +15 -14
  126. package/dist/types-BtItVHx6-BEDme1ZL.mjs.map +1 -0
  127. package/dist/{types-CGr02DOy-CQsUdKCe.d.mts → types-CMSRIhJK-D0oiijer.d.mts} +6 -6
  128. package/dist/{types-CGr02DOy-CQsUdKCe.d.mts.map → types-CMSRIhJK-D0oiijer.d.mts.map} +1 -1
  129. package/dist/{types-CWvmfrfd-HPIh55bi.d.mts → types-CWvmfrfd-u6aEmYg4.d.mts} +2 -2
  130. package/dist/{types-CWvmfrfd-HPIh55bi.d.mts.map → types-CWvmfrfd-u6aEmYg4.d.mts.map} +1 -1
  131. package/dist/types-ClvFL9_q.d.mts +1 -0
  132. package/dist/{validators-CcR6gGf_.mjs → validators-_FcNfyor.mjs} +8 -5
  133. package/dist/validators-_FcNfyor.mjs.map +1 -0
  134. package/package.json +18 -18
  135. package/dist/ast-BpFfUmb_.mjs.map +0 -1
  136. package/dist/codec-descriptor-registry-UiFDvDj4.mjs.map +0 -1
  137. package/dist/collection-methods-CS1e16Ij.d.mts +0 -1
  138. package/dist/control-BdGTPj7m.mjs.map +0 -1
  139. package/dist/expression-Bz8uEh8W.d.mts +0 -2
  140. package/dist/expression-VJWwxbUB-BtNDaTCt.d.mts.map +0 -1
  141. package/dist/functions-gl3PL1so.d.mts +0 -1
  142. package/dist/index-reference-X_kA2mV8.d.mts +0 -1
  143. package/dist/interpreter-DoQwVOyS-jsuDJlaX.mjs.map +0 -1
  144. package/dist/middleware-CcDThETr.d.mts +0 -1
  145. package/dist/plan-BjX90QC6.d.mts +0 -2
  146. package/dist/query-lane-context-DgxWaKr-.d.mts +0 -1
  147. package/dist/sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts.map +0 -1
  148. package/dist/types-BFCrGkhG.d.mts +0 -1
  149. package/dist/types-DzQmUrUm-ColHE4Av.mjs.map +0 -1
  150. package/dist/validators-CcR6gGf_.mjs.map +0 -1
@@ -2,12 +2,12 @@ import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
2
2
  import { D as QueryOperationTypesBase, w as QueryOperationReturn } from "./types-DNTLudNR-DiVulPhL.mjs";
3
3
  import "./types-CXRxo_TK.mjs";
4
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-DEbNJhyS-CY7Ye2vN.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-BseDMzbO-jM1a1F4N.mjs";
6
6
  import { l as SqlStatementStats } from "./driver-types-DFz7U-LT-DaVdVhU9.mjs";
7
- import { n as SqlQueryPlan } from "./plan-Dv6v5_y4-CGWEjfCv.mjs";
7
+ import { n as SqlQueryPlan } from "./plan-Dd6M8olW-Dynb9vKp.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-DYRYmkMl.d.mts
10
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-CbgzZLXY.d.mts
11
11
  //#region src/functions.d.ts
12
12
  type BooleanCodecType = {
13
13
  codecId: 'pg/bool@1';
@@ -370,4 +370,4 @@ declare function createRawSql(adapter: RawCodecInferer, planContext: RawPlanCont
370
370
  declare function createRawSql(adapter: RawCodecInferer): RawSqlTag;
371
371
  //#endregion
372
372
  export { Subquery as A, RawSqlStatementTag as C, ScalarListExpression as D, RowReturningStatementMarker as E, createFunctions as F, createRawSql as I, isExpression as L, TraitExpression as M, buildOperation as N, ScopeField as O, codecOf as P, param as R, RawSqlStatementBuilder as S, RowReturningStatement as T, RawRowQuery as _, CodecExpression as a, RawSqlBuilder as b, ComparisonOperand as c, FunctionsContext as d, NoReservedRowColumn as f, RawRow as g, RawPlanContext as h, BuiltinFunctions as i, SubqueryMarker as j, StorageColumnScopeField as k, Expression as l, RawCodecInferer as m, BooleanCodecType as n, CodecTypesBase as o, RawAffectedCountQuery as p, BuildOperationSpec as r, CodecValue as s, AffectedCount as t, Functions as u, RawRowSpec as v, RawSqlTag as w, RawSqlInterpolation as x, RawRowSpecEntry as y, toExpr as z };
373
- //# sourceMappingURL=expression-DYRYmkMl-BMKxN8Wf.d.mts.map
373
+ //# sourceMappingURL=expression-CbgzZLXY-Bzqi0ZTM.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expression-DYRYmkMl-BMKxN8Wf.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-DYRYmkMl.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;;KAE/E,WAAW,wBAAwB,WAAW;WACxC;MACL,sBAAsB,KAAK,GAAG;KAC/B,WAAW,WAAW;WAChB;OACJ,wBAAwB,mBAAmB,QAAQ,WAAW,SAAS,KAAK,GAAG,kBAAkB,SAAS,GAAG,QAAQ,GAAG,kBAAkB,SAAS,GAAG,WAAW,WAAW;KAC9K,eAAe,WAAW;WACpB;;GAER,wBAAwB,MAAM;IAC7B,SAAS;IACT;MACE,UAAU,SAAS;IACrB,SAAS;IACT;QACI,WAAW;GAChB,wBAAwB,QAAQ,WAAW,SAAS,KAAK,MAAM;IAC9D,SAAS;IACT;IACA,QAAQ;MACN,QAAQ,MAAM;IAChB,SAAS;IACT;IACA;OACG,QAAQ,iBAAiB,WAAW;;KAEtC,iBAAiB,WAAW;WACtB;;EAET,KAAK,wBAAwB,QAAQ,WAAW,SAAS,KAAK,GAAG,kBAAkB,kBAAkB,eAAe,GAAG,kBAAkB,kBAAkB,kBAAkB,WAAW;EACxL,KAAK,wBAAwB,mBAAmB,QAAQ,WAAW,SAAS,KAAK,GAAG,kBAAkB,SAAS,GAAG,eAAe,GAAG,kBAAkB,SAAS,GAAG,kBAAkB,WAAW;EAC/L,IAAI,WAAW;EACf,KAAK,WAAW;EAChB,IAAI,WAAW;EACf,KAAK,WAAW;EAChB,SAAS,MAAM,sCAAsC,UAAU,WAAW;EAC1E,QAAQ,KAAK,sCAAsC,UAAU,WAAW;EACxE,SAAS,UAAU,SAAS,eAAe,iBAAiB,WAAW;EACvE,Y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;;;;;;;;;UAarF;EACR,WAAW,OAAO;;;UAGV;EACR,QAAQ,kBAAkB,MAAM,IAAI;IAClC,SAAS;IACT;;EAEF,QAAQ,kBAAkB,2BAA2B;aAC1C,SAAS;aACT,WAAW;MAClB;IACF,SAAS;IACT,UAAU;;;;;;;;;KAST;WACM;WACA;WACA,QAAQ;;;;;;;;;KASd;WACM;;;KAGN,aAAa,SAAS,eAAe,oBAAoB;;;;;;KAMzD,OAAO,aAAa,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"}
@@ -0,0 +1,2 @@
1
+ import "./expression-CbgzZLXY-Bzqi0ZTM.mjs";
2
+ import "./expression-DKXV5hFJ-4ZqJOTJH.mjs";
@@ -1,6 +1,6 @@
1
- import { c as AnyExpression } from "./types-DEbNJhyS-CY7Ye2vN.mjs";
2
- import { O as ScopeField, l as Expression } from "./expression-DYRYmkMl-BMKxN8Wf.mjs";
3
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-VJWwxbUB.d.mts
1
+ import { c as AnyExpression } from "./types-BseDMzbO-jM1a1F4N.mjs";
2
+ import { O as ScopeField, l as Expression } from "./expression-CbgzZLXY-Bzqi0ZTM.mjs";
3
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-DKXV5hFJ.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-VJWwxbUB-BtNDaTCt.d.mts.map
22
+ //# sourceMappingURL=expression-DKXV5hFJ-4ZqJOTJH.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-DKXV5hFJ-4ZqJOTJH.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-DKXV5hFJ.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,9 +1,9 @@
1
- import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-DzQmUrUm-ColHE4Av.mjs";
1
+ import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-BtItVHx6-BEDme1ZL.mjs";
2
2
  import { t as planFromAst } from "./plan-Dh0LbYIv-ubBSdUgl.mjs";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { invariant } from "@prisma/orm-framework/utils/assertions";
5
5
  import { runtimeError } from "@prisma/orm-framework/components/runtime";
6
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-C5Ha-fXs.mjs
6
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-D9Le3c2y.mjs
7
7
  /**
8
8
  * Resolve a raw value or an Expression into an AST expression node.
9
9
  *
@@ -177,4 +177,4 @@ var ExpressionImpl = class {
177
177
  //#endregion
178
178
  export { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };
179
179
 
180
- //# sourceMappingURL=expression-impl-C5Ha-fXs-CxXn8gDo.mjs.map
180
+ //# sourceMappingURL=expression-impl-D9Le3c2y-MF0Fctq9.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"expression-impl-C5Ha-fXs-CxXn8gDo.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-C5Ha-fXs.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-DzQmUrUm.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\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\t...ifDefined(\"codec\", entry.codec)\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`) and the top-level shortcut (`f.email`) 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-C5Ha-fXs.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,OAAO,OAAO,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,IAAI,UAAU,KAAK,GAAG,MAAM,aAAa,oCAAoC,qCAAqC,UAAU,OAAO,SAAS,OAAO,MAAM,0GAA0G;CACnQ,OAAO,SAAS,GAAG,OAAO,EAAE,MAAM,CAAC;AACpC;;;;AAIA,SAAS,MAAM,OAAO,MAAM;CAC3B,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;;;;;;;;;;AAUA,SAAS,QAAQ,OAAO;CACvB,IAAI,CAAC,aAAa,KAAK,GAAG,OAAO,KAAK;CACtC,OAAO,MAAM,YAAY,UAAU,MAAM,YAAY,UAAU,EAAE,SAAS,MAAM,WAAW,QAAQ,IAAI,KAAK;AAC7G;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,cAAc,SAAS,OAAO,MAAM,aAAa;AACxG;;;;AAIA,SAAS,eAAe,MAAM;CAC7B,MAAM,CAAC,MAAM,GAAG,QAAQ,KAAK;CAC7B,MAAM,KAAK,IAAI,cAAc;EAC5B,QAAQ,KAAK;EACb;EACA,MAAM,KAAK,SAAS,IAAI,OAAO,KAAK;EACpC,SAAS,KAAK;EACd,UAAU,KAAK;CAChB,CAAC;CACD,OAAO;EACN,YAAY,KAAK;EACjB,gBAAgB;CACjB;AACD;AACA,SAAS,YAAY,OA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A,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
1
+ {"version":3,"file":"expression-impl-D9Le3c2y-MF0Fctq9.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-D9Le3c2y.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-BtItVHx6.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\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\t...ifDefined(\"codec\", entry.codec)\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`) and the top-level shortcut (`f.email`) 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, create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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-Dq7g7udF.mjs";
3
- import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-0z3ce44U-BQ26ercw.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-CWvmfrfd-HPIh55bi.mjs";
3
+ import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-0z3ce44U-OE4VID0O.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-CWvmfrfd-u6aEmYg4.mjs";
5
5
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
6
- import { $ as SqlDefaultFunctionName, $n as unmatchedColumnRename, $t as encodeStoredValue, A as MigrationPlannerResult, An as requiredColumnMeta, At as TargetMigrationsCapability, B as PlannedStoredRewrites, Bn as runnerFailure, Bt as backfillOfDefaultedField, C as MarkedRemoval, Cn as planValueObjectFieldRewrites, Ct as SuppressionRecord, D as MigrationPlanOperation, Dn as readColumnDefault, Dt as TableRename, E as MigrationPlan, En as plannerSuccess, Et as TableNameCaseGuardTable, F as NamespaceStatementTarget, Fn as rowsHoldingValueFailure, Ft as WorkingSchemaOrigins, G as RequiredColumn, Gn as sqlOfSlot, Gt as contractNamespaceToSchemaIR, H as ReadReportedDefault, Hn as scalarTypeNamesOf, Ht as checkSqlExpressionText, I as NoTable, In as rowsHoldingValueMeta, J as SameName, Jn as storedValueOperationIndexes, Jt as convertedColumnOf, K as RequiredColumnMark, Kn as sqlTypeLookupsOf, Kt as contractToSchemaIR, L as PlanFieldEventOperationsOptions, Ln as rowsHoldingValueOf, Lt as acceptedByDataType, M as ModelTable, Mn as requiredColumnsOfMigration, Mt as UnfilledValue, N as NO_RENAMED_ORIGINS, Nn as resolveColumnRenameAgainst, Nt as UnnamedFieldFill, O as MigrationPlanner, On as readReportedDefault, Ot as TableRenameByHand, P as NamespaceRename, Pn as resolveTableRenameAgainst, Pt as VariantRowRewrite, Q as SqlControlTargetDescriptor, Qn as unknownCallNames, Qt as detectTableNameCaseChanges, R as PlannedStatement, Rn as rowsWithoutValueFailure, Rt as appliedStatementsInOrder, S as JsonPathStep, Sn as planValueObjectFieldFills, St as SubjectStorage, T as MigrationOperationPolicy, Tn as plannerFailure, Tt as TableMove, U as ReportedBody, Un as slotSource, Ut as columnTakesTemporaryValue, V as ReadColumnDefault, Vn as runnerSuccess, Vt as checkDatabasePoliciesHeld, W as ReportedLiteralDefault, Wn as sqlDefaultFunctions, Wt as contractColumns, X as SingleOperationCall, Xn as subjectsOfCalls, Xt as createSqlTextSources, Y as SchemaTables, Yn as storedValueSubjects, Yt as createMigrationPlan, Z as SqlControlFamilyInstance, Zn as unconvertedFieldOf, Zt as detectDestructiveChanges, _ as FillValueCheck, _n as planEnumValueRewrites, _t as StoredValueCallClasses, a as ColumnRename, an as fieldStatementColumns, at as SqlTextSources, b as JsonKeyPath, bn as planStatements, bt as StoredValueRewrite, c as ContractColumns, cn as isUnfilledSlot, ct as StatementOwnership, d as ConvertedColumn, dn as keyPathOf, dt as StoredEnumValue, en as exactName, er as unmatchedTableRename, et as SqlDescribedContractSpace, f as DefaultResolver, fn as modelRenameStorageEffect, ft as StoredKeyFill, g as FieldStorageEffect, gn as partitionIssuesByControlPolicy, gt as StoredRewriteCalls, h as FieldStatementColumns, hn as partitionCallsByControlPolicy, ht as StoredRewrite, i as ColumnOnOneSide, in as fieldRenameStorageEffect, it as SqlSlot, j as ModelStorageEffect, jn as requiredColumnOf, jt as TargetRefusal, k as MigrationPlannerConflict, kn as removalsOfMigration, kt as TableRenameRequest, l as ContractToSchemaIROptions, ln as jsonPathText, lt as StatementPlanningTarget, m as FieldEventCall, mn as parseJsonPath, mt as StoredKeyRewrite, n as CallSubjects, nn as fieldEventStorage, nt as SqlQuote, o as ColumnRenameRequest, on as fillKeyProblem, ot as StatementColumn, p as DefaultResolverColumn, pn as otherSpaceDeclaring, pt as StoredKeyFillField, q as RowsHoldingValueMark, qn as storageNameOfOperation, qt as convertedColumnMeta, r as CallWithCompanions, rn as fieldOfColumn, rt as SqlQuotingRules, s as ContractColumn, sn as fillValueProblem, st as StatementOperations, t as COLUMN_RENAME_UNMATCHED_CODE, tn as extractCodecControlHooks, tr as unnamedFieldFillOf, tt as SqlPslBuildContext, u as ControlPolicySubject, un as keepRowsEdit, ut as StorageRenames, v as FillValueTypes, vn as planFieldEventCalls, vt as StoredValueCodec, w as MigrationOperationClass, wn as planVariantRowRewrites, wt as TABLE_NAME_CASE_CHANGED_CODE, x as JsonPath, xn as planStoredRewrites, xt as StoredValueSubject, y as INIT_ADDITIVE_POLICY, yn as planFieldEventOperations, yt as StoredValueReplacement, z as PlannedStatements, zn as rowsWithoutValueSummary, zt as assembleAuthoringContributions } from "./control-BwL5tCj4.mjs";
7
- import { t as resolveIntrospectedColumnType } from "./control-adapter-DRLco_j0.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-DZHlisyY.mjs";
6
+ import { $ as SqlDefaultFunctionName, $n as unmatchedColumnRename, $t as encodeStoredValue, A as MigrationPlannerResult, An as requiredColumnMeta, At as TargetMigrationsCapability, B as PlannedStoredRewrites, Bn as runnerFailure, Bt as backfillOfDefaultedField, C as MarkedRemoval, Cn as planValueObjectFieldRewrites, Ct as SuppressionRecord, D as MigrationPlanOperation, Dn as readColumnDefault, Dt as TableRename, E as MigrationPlan, En as plannerSuccess, Et as TableNameCaseGuardTable, F as NamespaceStatementTarget, Fn as rowsHoldingValueFailure, Ft as WorkingSchemaOrigins, G as RequiredColumn, Gn as sqlOfSlot, Gt as contractNamespaceToSchemaIR, H as ReadReportedDefault, Hn as scalarTypeNamesOf, Ht as checkSqlExpressionText, I as NoTable, In as rowsHoldingValueMeta, J as SameName, Jn as storedValueOperationIndexes, Jt as convertedColumnOf, K as RequiredColumnMark, Kn as sqlTypeLookupsOf, Kt as contractToSchemaIR, L as PlanFieldEventOperationsOptions, Ln as rowsHoldingValueOf, Lt as acceptedByDataType, M as ModelTable, Mn as requiredColumnsOfMigration, Mt as UnfilledValue, N as NO_RENAMED_ORIGINS, Nn as resolveColumnRenameAgainst, Nt as UnnamedFieldFill, O as MigrationPlanner, On as readReportedDefault, Ot as TableRenameByHand, P as NamespaceRename, Pn as resolveTableRenameAgainst, Pt as VariantRowRewrite, Q as SqlControlTargetDescriptor, Qn as unknownCallNames, Qt as detectTableNameCaseChanges, R as PlannedStatement, Rn as rowsWithoutValueFailure, Rt as appliedStatementsInOrder, S as JsonPathStep, Sn as planValueObjectFieldFills, St as SubjectStorage, T as MigrationOperationPolicy, Tn as plannerFailure, Tt as TableMove, U as ReportedBody, Un as slotSource, Ut as columnTakesTemporaryValue, V as ReadColumnDefault, Vn as runnerSuccess, Vt as checkDatabasePoliciesHeld, W as ReportedLiteralDefault, Wn as sqlDefaultFunctions, Wt as contractColumns, X as SingleOperationCall, Xn as subjectsOfCalls, Xt as createSqlTextSources, Y as SchemaTables, Yn as storedValueSubjects, Yt as createMigrationPlan, Z as SqlControlFamilyInstance, Zn as unconvertedFieldOf, Zt as detectDestructiveChanges, _ as FillValueCheck, _n as planEnumValueRewrites, _t as StoredValueCallClasses, a as ColumnRename, an as fieldStatementColumns, at as SqlTextSources, b as JsonKeyPath, bn as planStatements, bt as StoredValueRewrite, c as ContractColumns, cn as isUnfilledSlot, ct as StatementOwnership, d as ConvertedColumn, dn as keyPathOf, dt as StoredEnumValue, en as exactName, er as unmatchedTableRename, et as SqlDescribedContractSpace, f as DefaultResolver, fn as modelRenameStorageEffect, ft as StoredKeyFill, g as FieldStorageEffect, gn as partitionIssuesByControlPolicy, gt as StoredRewriteCalls, h as FieldStatementColumns, hn as partitionCallsByControlPolicy, ht as StoredRewrite, i as ColumnOnOneSide, in as fieldRenameStorageEffect, it as SqlSlot, j as ModelStorageEffect, jn as requiredColumnOf, jt as TargetRefusal, k as MigrationPlannerConflict, kn as removalsOfMigration, kt as TableRenameRequest, l as ContractToSchemaIROptions, ln as jsonPathText, lt as StatementPlanningTarget, m as FieldEventCall, mn as parseJsonPath, mt as StoredKeyRewrite, n as CallSubjects, nn as fieldEventStorage, nt as SqlQuote, o as ColumnRenameRequest, on as fillKeyProblem, ot as StatementColumn, p as DefaultResolverColumn, pn as otherSpaceDeclaring, pt as StoredKeyFillField, q as RowsHoldingValueMark, qn as storageNameOfOperation, qt as convertedColumnMeta, r as CallWithCompanions, rn as fieldOfColumn, rt as SqlQuotingRules, s as ContractColumn, sn as fillValueProblem, st as StatementOperations, t as COLUMN_RENAME_UNMATCHED_CODE, tn as extractCodecControlHooks, tr as unnamedFieldFillOf, tt as SqlPslBuildContext, u as ControlPolicySubject, un as keepRowsEdit, ut as StorageRenames, v as FillValueTypes, vn as planFieldEventCalls, vt as StoredValueCodec, w as MigrationOperationClass, wn as planVariantRowRewrites, wt as TABLE_NAME_CASE_CHANGED_CODE, x as JsonPath, xn as planStoredRewrites, xt as StoredValueSubject, y as INIT_ADDITIVE_POLICY, yn as planFieldEventOperations, yt as StoredValueReplacement, z as PlannedStatements, zn as rowsWithoutValueSummary, zt as assembleAuthoringContributions } from "./control-DaBIvroP.mjs";
7
+ import { t as resolveIntrospectedColumnType } from "./control-adapter-CC_Vys2q.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-ox1r2eqR.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-BUWF9_Tx.mjs";
10
+ import { t as SqlMigration } from "./migration-aQa4CVb-.mjs";
11
11
  import { i as sqlTargetTypeConstructors, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-CbYm5Bfz.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
- import { n as checkSqlDefaultText } from "./validators-CcR6gGf_.mjs";
3
- import { c as sqlTargetTypeConstructors, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Bze9nVHL-BK4YIqLK.mjs";
2
+ import { n as checkSqlDefaultText } from "./validators-_FcNfyor.mjs";
3
+ import { c as sqlTargetTypeConstructors, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Bze9nVHL-EURgrMFd.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
- import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs";
5
+ import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs";
6
6
  import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-DhKm6hB3.mjs";
7
- import { $ as removalsOfMigration, A as fillKeyProblem, B as partitionIssuesByControlPolicy, C as detectTableNameCaseChanges, Ct as unmatchedColumnRename, D as fieldOfColumn, E as fieldEventStorage, F as keyPathOf, G as planStoredRewrites, H as planFieldEventCalls, I as modelRenameStorageEffect, J as planVariantRowRewrites, K as planValueObjectFieldFills, L as otherSpaceDeclaring, M as isUnfilledSlot, N as jsonPathText, O as fieldRenameStorageEffect, P as keepRowsEdit, Q as readReportedDefault, R as parseJsonPath, S as detectDestructiveChanges, St as unknownCallNames, T as exactName, Tt as unnamedFieldFillOf, U as planFieldEventOperations, V as planEnumValueRewrites, W as planStatements, X as plannerSuccess, Y as plannerFailure, Z as readColumnDefault, _t as storageNameOfOperation, a as TABLE_NAME_CASE_CHANGED_CODE, at as rowsHoldingValueFailure, b as createMigrationPlan, bt as subjectsOfCalls, c as appliedStatementsInOrder, ct as rowsWithoutValueFailure, d as checkDatabasePoliciesHeld, dt as runnerSuccess, et as requiredColumnMeta, f as checkSqlExpressionText, ft as scalarTypeNamesOf, g as contractToSchemaIR, gt as sqlTypeLookupsOf, h as contractNamespaceToSchemaIR, ht as sqlOfSlot, i as StorageRenames, it as resolveTableRenameAgainst, j as fillValueProblem, k as fieldStatementColumns, l as assembleAuthoringContributions, lt as rowsWithoutValueSummary, m as contractColumns, mt as sqlDefaultFunctions, n as INIT_ADDITIVE_POLICY, nt as requiredColumnsOfMigration, o as UnfilledValue, ot as rowsHoldingValueMeta, p as columnTakesTemporaryValue, pt as slotSource, q as planValueObjectFieldRewrites, r as NO_RENAMED_ORIGINS, rt as resolveColumnRenameAgainst, s as acceptedByDataType, st as rowsHoldingValueOf, t as COLUMN_RENAME_UNMATCHED_CODE, tt as requiredColumnOf, u as backfillOfDefaultedField, ut as runnerFailure, v as convertedColumnMeta, vt as storedValueOperationIndexes, w as encodeStoredValue, wt as unmatchedTableRename, x as createSqlTextSources, xt as unconvertedFieldOf, y as convertedColumnOf, yt as storedValueSubjects, z as partitionCallsByControlPolicy } from "./control-BdGTPj7m.mjs";
7
+ import { $ as removalsOfMigration, A as fillKeyProblem, B as partitionIssuesByControlPolicy, C as detectTableNameCaseChanges, Ct as unmatchedColumnRename, D as fieldOfColumn, E as fieldEventStorage, F as keyPathOf, G as planStoredRewrites, H as planFieldEventCalls, I as modelRenameStorageEffect, J as planVariantRowRewrites, K as planValueObjectFieldFills, L as otherSpaceDeclaring, M as isUnfilledSlot, N as jsonPathText, O as fieldRenameStorageEffect, P as keepRowsEdit, Q as readReportedDefault, R as parseJsonPath, S as detectDestructiveChanges, St as unknownCallNames, T as exactName, Tt as unnamedFieldFillOf, U as planFieldEventOperations, V as planEnumValueRewrites, W as planStatements, X as plannerSuccess, Y as plannerFailure, Z as readColumnDefault, _t as storageNameOfOperation, a as TABLE_NAME_CASE_CHANGED_CODE, at as rowsHoldingValueFailure, b as createMigrationPlan, bt as subjectsOfCalls, c as appliedStatementsInOrder, ct as rowsWithoutValueFailure, d as checkDatabasePoliciesHeld, dt as runnerSuccess, et as requiredColumnMeta, f as checkSqlExpressionText, ft as scalarTypeNamesOf, g as contractToSchemaIR, gt as sqlTypeLookupsOf, h as contractNamespaceToSchemaIR, ht as sqlOfSlot, i as StorageRenames, it as resolveTableRenameAgainst, j as fillValueProblem, k as fieldStatementColumns, l as assembleAuthoringContributions, lt as rowsWithoutValueSummary, m as contractColumns, mt as sqlDefaultFunctions, n as INIT_ADDITIVE_POLICY, nt as requiredColumnsOfMigration, o as UnfilledValue, ot as rowsHoldingValueMeta, p as columnTakesTemporaryValue, pt as slotSource, q as planValueObjectFieldRewrites, r as NO_RENAMED_ORIGINS, rt as resolveColumnRenameAgainst, s as acceptedByDataType, st as rowsHoldingValueOf, t as COLUMN_RENAME_UNMATCHED_CODE, tt as requiredColumnOf, u as backfillOfDefaultedField, ut as runnerFailure, v as convertedColumnMeta, vt as storedValueOperationIndexes, w as encodeStoredValue, wt as unmatchedTableRename, x as createSqlTextSources, xt as unconvertedFieldOf, y as convertedColumnOf, yt as storedValueSubjects, z as partitionCallsByControlPolicy } from "./control-Cxrfn6YO.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-0z3ce44U-BQ26ercw.mjs";
2
- import { t as resolveIntrospectedColumnType } from "./control-adapter-DRLco_j0.mjs";
1
+ import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-0z3ce44U-OE4VID0O.mjs";
2
+ import { t as resolveIntrospectedColumnType } from "./control-adapter-CC_Vys2q.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-Dq7g7udF.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-CWvmfrfd-HPIh55bi.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-CWvmfrfd-u6aEmYg4.mjs";
3
3
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
4
- import { $ as SqlDefaultFunctionName, $n as unmatchedColumnRename, $t as encodeStoredValue, A as MigrationPlannerResult, An as requiredColumnMeta, At as TargetMigrationsCapability, B as PlannedStoredRewrites, Bn as runnerFailure, Bt as backfillOfDefaultedField, C as MarkedRemoval, Cn as planValueObjectFieldRewrites, Ct as SuppressionRecord, D as MigrationPlanOperation, Dn as readColumnDefault, Dt as TableRename, E as MigrationPlan, En as plannerSuccess, Et as TableNameCaseGuardTable, F as NamespaceStatementTarget, Fn as rowsHoldingValueFailure, Ft as WorkingSchemaOrigins, G as RequiredColumn, Gn as sqlOfSlot, Gt as contractNamespaceToSchemaIR, H as ReadReportedDefault, Hn as scalarTypeNamesOf, Ht as checkSqlExpressionText, I as NoTable, In as rowsHoldingValueMeta, It as _default, J as SameName, Jn as storedValueOperationIndexes, Jt as convertedColumnOf, K as RequiredColumnMark, Kn as sqlTypeLookupsOf, Kt as contractToSchemaIR, L as PlanFieldEventOperationsOptions, Ln as rowsHoldingValueOf, Lt as acceptedByDataType, M as ModelTable, Mn as requiredColumnsOfMigration, Mt as UnfilledValue, N as NO_RENAMED_ORIGINS, Nn as resolveColumnRenameAgainst, Nt as UnnamedFieldFill, O as MigrationPlanner, On as readReportedDefault, Ot as TableRenameByHand, P as NamespaceRename, Pn as resolveTableRenameAgainst, Pt as VariantRowRewrite, Q as SqlControlTargetDescriptor, Qn as unknownCallNames, Qt as detectTableNameCaseChanges, R as PlannedStatement, Rn as rowsWithoutValueFailure, Rt as appliedStatementsInOrder, S as JsonPathStep, Sn as planValueObjectFieldFills, St as SubjectStorage, T as MigrationOperationPolicy, Tn as plannerFailure, Tt as TableMove, U as ReportedBody, Un as slotSource, Ut as columnTakesTemporaryValue, V as ReadColumnDefault, Vn as runnerSuccess, Vt as checkDatabasePoliciesHeld, W as ReportedLiteralDefault, Wn as sqlDefaultFunctions, Wt as contractColumns, X as SingleOperationCall, Xn as subjectsOfCalls, Xt as createSqlTextSources, Y as SchemaTables, Yn as storedValueSubjects, Yt as createMigrationPlan, Z as SqlControlFamilyInstance, Zn as unconvertedFieldOf, Zt as detectDestructiveChanges, _ as FillValueCheck, _n as planEnumValueRewrites, _t as StoredValueCallClasses, a as ColumnRename, an as fieldStatementColumns, at as SqlTextSources, b as JsonKeyPath, bn as planStatements, bt as StoredValueRewrite, c as ContractColumns, cn as isUnfilledSlot, ct as StatementOwnership, d as ConvertedColumn, dn as keyPathOf, dt as StoredEnumValue, en as exactName, er as unmatchedTableRename, et as SqlDescribedContractSpace, f as DefaultResolver, fn as modelRenameStorageEffect, ft as StoredKeyFill, g as FieldStorageEffect, gn as partitionIssuesByControlPolicy, gt as StoredRewriteCalls, h as FieldStatementColumns, hn as partitionCallsByControlPolicy, ht as StoredRewrite, i as ColumnOnOneSide, in as fieldRenameStorageEffect, it as SqlSlot, j as ModelStorageEffect, jn as requiredColumnOf, jt as TargetRefusal, k as MigrationPlannerConflict, kn as removalsOfMigration, kt as TableRenameRequest, l as ContractToSchemaIROptions, ln as jsonPathText, lt as StatementPlanningTarget, m as FieldEventCall, mn as parseJsonPath, mt as StoredKeyRewrite, n as CallSubjects, nn as fieldEventStorage, nt as SqlQuote, o as ColumnRenameRequest, on as fillKeyProblem, ot as StatementColumn, p as DefaultResolverColumn, pn as otherSpaceDeclaring, pt as StoredKeyFillField, q as RowsHoldingValueMark, qn as storageNameOfOperation, qt as convertedColumnMeta, r as CallWithCompanions, rn as fieldOfColumn, rt as SqlQuotingRules, s as ContractColumn, sn as fillValueProblem, st as StatementOperations, t as COLUMN_RENAME_UNMATCHED_CODE, tn as extractCodecControlHooks, tr as unnamedFieldFillOf, tt as SqlPslBuildContext, u as ControlPolicySubject, un as keepRowsEdit, ut as StorageRenames, v as FillValueTypes, vn as planFieldEventCalls, vt as StoredValueCodec, w as MigrationOperationClass, wn as planVariantRowRewrites, wt as TABLE_NAME_CASE_CHANGED_CODE, x as JsonPath, xn as planStoredRewrites, xt as StoredValueSubject, y as INIT_ADDITIVE_POLICY, yn as planFieldEventOperations, yt as StoredValueReplacement, z as PlannedStatements, zn as rowsWithoutValueSummary, zt as assembleAuthoringContributions } from "./control-BwL5tCj4.mjs";
4
+ import { $ as SqlDefaultFunctionName, $n as unmatchedColumnRename, $t as encodeStoredValue, A as MigrationPlannerResult, An as requiredColumnMeta, At as TargetMigrationsCapability, B as PlannedStoredRewrites, Bn as runnerFailure, Bt as backfillOfDefaultedField, C as MarkedRemoval, Cn as planValueObjectFieldRewrites, Ct as SuppressionRecord, D as MigrationPlanOperation, Dn as readColumnDefault, Dt as TableRename, E as MigrationPlan, En as plannerSuccess, Et as TableNameCaseGuardTable, F as NamespaceStatementTarget, Fn as rowsHoldingValueFailure, Ft as WorkingSchemaOrigins, G as RequiredColumn, Gn as sqlOfSlot, Gt as contractNamespaceToSchemaIR, H as ReadReportedDefault, Hn as scalarTypeNamesOf, Ht as checkSqlExpressionText, I as NoTable, In as rowsHoldingValueMeta, It as _default, J as SameName, Jn as storedValueOperationIndexes, Jt as convertedColumnOf, K as RequiredColumnMark, Kn as sqlTypeLookupsOf, Kt as contractToSchemaIR, L as PlanFieldEventOperationsOptions, Ln as rowsHoldingValueOf, Lt as acceptedByDataType, M as ModelTable, Mn as requiredColumnsOfMigration, Mt as UnfilledValue, N as NO_RENAMED_ORIGINS, Nn as resolveColumnRenameAgainst, Nt as UnnamedFieldFill, O as MigrationPlanner, On as readReportedDefault, Ot as TableRenameByHand, P as NamespaceRename, Pn as resolveTableRenameAgainst, Pt as VariantRowRewrite, Q as SqlControlTargetDescriptor, Qn as unknownCallNames, Qt as detectTableNameCaseChanges, R as PlannedStatement, Rn as rowsWithoutValueFailure, Rt as appliedStatementsInOrder, S as JsonPathStep, Sn as planValueObjectFieldFills, St as SubjectStorage, T as MigrationOperationPolicy, Tn as plannerFailure, Tt as TableMove, U as ReportedBody, Un as slotSource, Ut as columnTakesTemporaryValue, V as ReadColumnDefault, Vn as runnerSuccess, Vt as checkDatabasePoliciesHeld, W as ReportedLiteralDefault, Wn as sqlDefaultFunctions, Wt as contractColumns, X as SingleOperationCall, Xn as subjectsOfCalls, Xt as createSqlTextSources, Y as SchemaTables, Yn as storedValueSubjects, Yt as createMigrationPlan, Z as SqlControlFamilyInstance, Zn as unconvertedFieldOf, Zt as detectDestructiveChanges, _ as FillValueCheck, _n as planEnumValueRewrites, _t as StoredValueCallClasses, a as ColumnRename, an as fieldStatementColumns, at as SqlTextSources, b as JsonKeyPath, bn as planStatements, bt as StoredValueRewrite, c as ContractColumns, cn as isUnfilledSlot, ct as StatementOwnership, d as ConvertedColumn, dn as keyPathOf, dt as StoredEnumValue, en as exactName, er as unmatchedTableRename, et as SqlDescribedContractSpace, f as DefaultResolver, fn as modelRenameStorageEffect, ft as StoredKeyFill, g as FieldStorageEffect, gn as partitionIssuesByControlPolicy, gt as StoredRewriteCalls, h as FieldStatementColumns, hn as partitionCallsByControlPolicy, ht as StoredRewrite, i as ColumnOnOneSide, in as fieldRenameStorageEffect, it as SqlSlot, j as ModelStorageEffect, jn as requiredColumnOf, jt as TargetRefusal, k as MigrationPlannerConflict, kn as removalsOfMigration, kt as TableRenameRequest, l as ContractToSchemaIROptions, ln as jsonPathText, lt as StatementPlanningTarget, m as FieldEventCall, mn as parseJsonPath, mt as StoredKeyRewrite, n as CallSubjects, nn as fieldEventStorage, nt as SqlQuote, o as ColumnRenameRequest, on as fillKeyProblem, ot as StatementColumn, p as DefaultResolverColumn, pn as otherSpaceDeclaring, pt as StoredKeyFillField, q as RowsHoldingValueMark, qn as storageNameOfOperation, qt as convertedColumnMeta, r as CallWithCompanions, rn as fieldOfColumn, rt as SqlQuotingRules, s as ContractColumn, sn as fillValueProblem, st as StatementOperations, t as COLUMN_RENAME_UNMATCHED_CODE, tn as extractCodecControlHooks, tr as unnamedFieldFillOf, tt as SqlPslBuildContext, u as ControlPolicySubject, un as keepRowsEdit, ut as StorageRenames, v as FillValueTypes, vn as planFieldEventCalls, vt as StoredValueCodec, w as MigrationOperationClass, wn as planVariantRowRewrites, wt as TABLE_NAME_CASE_CHANGED_CODE, x as JsonPath, xn as planStoredRewrites, xt as StoredValueSubject, y as INIT_ADDITIVE_POLICY, yn as planFieldEventOperations, yt as StoredValueReplacement, z as PlannedStatements, zn as rowsWithoutValueSummary, zt as assembleAuthoringContributions } from "./control-DaBIvroP.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 SameName, 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, StorageRenames, 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, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, exactName, 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
- import { n as checkSqlDefaultText } from "./validators-CcR6gGf_.mjs";
1
+ import { n as checkSqlDefaultText } from "./validators-_FcNfyor.mjs";
2
2
  import { s as extractCodecControlHooks } from "./schema-verify-C3wbdviw-nQ4tG9N7.mjs";
3
- import { $ as removalsOfMigration, A as fillKeyProblem, B as partitionIssuesByControlPolicy, C as detectTableNameCaseChanges, Ct as unmatchedColumnRename, D as fieldOfColumn, E as fieldEventStorage, F as keyPathOf, G as planStoredRewrites, H as planFieldEventCalls, I as modelRenameStorageEffect, J as planVariantRowRewrites, K as planValueObjectFieldFills, L as otherSpaceDeclaring, M as isUnfilledSlot, N as jsonPathText, O as fieldRenameStorageEffect, P as keepRowsEdit, Q as readReportedDefault, R as parseJsonPath, S as detectDestructiveChanges, St as unknownCallNames, T as exactName, Tt as unnamedFieldFillOf, U as planFieldEventOperations, V as planEnumValueRewrites, W as planStatements, X as plannerSuccess, Y as plannerFailure, Z as readColumnDefault, _ as control_default, _t as storageNameOfOperation, a as TABLE_NAME_CASE_CHANGED_CODE, at as rowsHoldingValueFailure, b as createMigrationPlan, bt as subjectsOfCalls, c as appliedStatementsInOrder, ct as rowsWithoutValueFailure, d as checkDatabasePoliciesHeld, dt as runnerSuccess, et as requiredColumnMeta, f as checkSqlExpressionText, ft as scalarTypeNamesOf, g as contractToSchemaIR, gt as sqlTypeLookupsOf, h as contractNamespaceToSchemaIR, ht as sqlOfSlot, i as StorageRenames, it as resolveTableRenameAgainst, j as fillValueProblem, k as fieldStatementColumns, l as assembleAuthoringContributions, lt as rowsWithoutValueSummary, m as contractColumns, mt as sqlDefaultFunctions, n as INIT_ADDITIVE_POLICY, nt as requiredColumnsOfMigration, o as UnfilledValue, ot as rowsHoldingValueMeta, p as columnTakesTemporaryValue, pt as slotSource, q as planValueObjectFieldRewrites, r as NO_RENAMED_ORIGINS, rt as resolveColumnRenameAgainst, s as acceptedByDataType, st as rowsHoldingValueOf, t as COLUMN_RENAME_UNMATCHED_CODE, tt as requiredColumnOf, u as backfillOfDefaultedField, ut as runnerFailure, v as convertedColumnMeta, vt as storedValueOperationIndexes, w as encodeStoredValue, wt as unmatchedTableRename, x as createSqlTextSources, xt as unconvertedFieldOf, y as convertedColumnOf, yt as storedValueSubjects, z as partitionCallsByControlPolicy } from "./control-BdGTPj7m.mjs";
3
+ import { $ as removalsOfMigration, A as fillKeyProblem, B as partitionIssuesByControlPolicy, C as detectTableNameCaseChanges, Ct as unmatchedColumnRename, D as fieldOfColumn, E as fieldEventStorage, F as keyPathOf, G as planStoredRewrites, H as planFieldEventCalls, I as modelRenameStorageEffect, J as planVariantRowRewrites, K as planValueObjectFieldFills, L as otherSpaceDeclaring, M as isUnfilledSlot, N as jsonPathText, O as fieldRenameStorageEffect, P as keepRowsEdit, Q as readReportedDefault, R as parseJsonPath, S as detectDestructiveChanges, St as unknownCallNames, T as exactName, Tt as unnamedFieldFillOf, U as planFieldEventOperations, V as planEnumValueRewrites, W as planStatements, X as plannerSuccess, Y as plannerFailure, Z as readColumnDefault, _ as control_default, _t as storageNameOfOperation, a as TABLE_NAME_CASE_CHANGED_CODE, at as rowsHoldingValueFailure, b as createMigrationPlan, bt as subjectsOfCalls, c as appliedStatementsInOrder, ct as rowsWithoutValueFailure, d as checkDatabasePoliciesHeld, dt as runnerSuccess, et as requiredColumnMeta, f as checkSqlExpressionText, ft as scalarTypeNamesOf, g as contractToSchemaIR, gt as sqlTypeLookupsOf, h as contractNamespaceToSchemaIR, ht as sqlOfSlot, i as StorageRenames, it as resolveTableRenameAgainst, j as fillValueProblem, k as fieldStatementColumns, l as assembleAuthoringContributions, lt as rowsWithoutValueSummary, m as contractColumns, mt as sqlDefaultFunctions, n as INIT_ADDITIVE_POLICY, nt as requiredColumnsOfMigration, o as UnfilledValue, ot as rowsHoldingValueMeta, p as columnTakesTemporaryValue, pt as slotSource, q as planValueObjectFieldRewrites, r as NO_RENAMED_ORIGINS, rt as resolveColumnRenameAgainst, s as acceptedByDataType, st as rowsHoldingValueOf, t as COLUMN_RENAME_UNMATCHED_CODE, tt as requiredColumnOf, u as backfillOfDefaultedField, ut as runnerFailure, v as convertedColumnMeta, vt as storedValueOperationIndexes, w as encodeStoredValue, wt as unmatchedTableRename, x as createSqlTextSources, xt as unconvertedFieldOf, y as convertedColumnOf, yt as storedValueSubjects, z as partitionCallsByControlPolicy } from "./control-Cxrfn6YO.mjs";
4
4
  export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, NO_RENAMED_ORIGINS, StorageRenames, TABLE_NAME_CASE_CHANGED_CODE, UnfilledValue, acceptedByDataType, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, exactName, 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-DZHlisyY.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-ox1r2eqR.mjs";
2
2
  export { type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
@@ -1,3 +1,3 @@
1
- import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs";
1
+ import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-C3OF1gr9.mjs";
2
2
  import { t as SqlSchemaVerifierBase } from "./ir-DzsUDO8e.mjs";
3
3
  export { SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase };
@@ -1,2 +1,2 @@
1
- import { t as SqlMigration } from "./migration-BUWF9_Tx.mjs";
1
+ import { t as SqlMigration } from "./migration-aQa4CVb-.mjs";
2
2
  export { SqlMigration as Migration };
@@ -1,6 +1,6 @@
1
1
  import { f as sqlExpressionRegistration } from "./sql-expression-CKgKznXS.mjs";
2
- import { S as sqlAttributeSpecs } from "./psl-field-resolution-CpxUePg1-DIrhHYx0.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-Bze9nVHL-BK4YIqLK.mjs";
2
+ import { S as sqlAttributeSpecs } from "./psl-field-resolution-CpxUePg1-CTitB6W5.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-Bze9nVHL-EURgrMFd.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-DzQmUrUm-ColHE4Av.mjs";
2
- import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-C5Ha-fXs-CxXn8gDo.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-BtItVHx6-BEDme1ZL.mjs";
2
+ import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-D9Le3c2y-MF0Fctq9.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-DGketpiK.mjs.map
88
+ //# sourceMappingURL=functions-BV4CyVZ0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions-DGketpiK.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-DzQmUrUm.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-C5Ha-fXs.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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AAK;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-BV4CyVZ0.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-BtItVHx6.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-D9Le3c2y.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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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-CbgzZLXY-Bzqi0ZTM.mjs";
@@ -1,6 +1,6 @@
1
1
  import { n as generatedIdColumnAliases } from "./generated-id-column-aliases-DPUii1fN.mjs";
2
- import { l as enumType } from "./contract-builder-DIb0oV8O.mjs";
3
- import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-BpFfUmb_.mjs";
2
+ import { l as enumType } from "./contract-builder-piV2RUop.mjs";
3
+ import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-B1GOjYn-.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";
@@ -407,4 +407,4 @@ function checkedInteger(integer, dataTypes, allowed, refusal) {
407
407
  //#endregion
408
408
  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 };
409
409
 
410
- //# sourceMappingURL=generator-functions-Bze9nVHL-BK4YIqLK.mjs.map
410
+ //# sourceMappingURL=generator-functions-Bze9nVHL-EURgrMFd.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator-functions-Bze9nVHL-BK4YIqLK.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Bze9nVHL.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\tconst varchar = {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t};\n\treturn { sql: {\n\t\tVarchar: varchar,\n\t\tString: {\n\t\t\t...varchar,\n\t\t\tdeprecated: { replacement: \"sql.Varchar\" }\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-Bze9nVHL.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,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M,eAAe,SAAS,WAAW,OAAO,CAAC,YAAY,CAAC,IAAI,SAAS,YAAY,YAAY,eAAe,KAAK,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-Bze9nVHL-EURgrMFd.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/generator-functions-Bze9nVHL.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\tconst varchar = {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t};\n\treturn { sql: {\n\t\tVarchar: varchar,\n\t\tString: {\n\t\t\t...varchar,\n\t\t\tdeprecated: { replacement: \"sql.Varchar\" }\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-Bze9nVHL.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,U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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,23 +1,23 @@
1
1
  import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
2
2
  import "./types-CXRxo_TK.mjs";
3
3
  import { r as SqlOperationDescriptors } from "./index-BWWwt5hB.mjs";
4
- import { E as CodecRef$1, It as SqlCodecCallContext, S as Codec$1, gt as LoweredStatement, h as AnyQueryAst, ht as LoweredParam, k as ContractCodecRegistry } from "./types-DEbNJhyS-CY7Ye2vN.mjs";
4
+ import { E as CodecRef$1, It as SqlCodecCallContext, S as Codec$1, gt as LoweredStatement, h as AnyQueryAst, ht as LoweredParam, k as ContractCodecRegistry } from "./types-BseDMzbO-jM1a1F4N.mjs";
5
5
  import { c as SqlQueryable, d as SqlTransactionOptions, i as SqlDriver, l as SqlStatementStats, r as SqlConnection } from "./driver-types-DFz7U-LT-DaVdVhU9.mjs";
6
- import { n as SqlQueryPlan } from "./plan-Dv6v5_y4-CGWEjfCv.mjs";
7
- import { m as RawCodecInferer, o as CodecTypesBase } from "./expression-DYRYmkMl-BMKxN8Wf.mjs";
8
- import "./expression-Bz8uEh8W.mjs";
9
- import { m as MarkerReadResult, t as Adapter } from "./ast-DvD53wSW.mjs";
10
- import { t as SqlExecutionPlan } from "./sql-execution-plan-4OFBeONp-CLkDqMdz.mjs";
11
- import "./plan-BjX90QC6.mjs";
12
- import { n as CollectionMethodContribution } from "./collection-methods-As4pXm7B-3xgTSoyU.mjs";
13
- import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lane-context-BetHj4j--D3S5nucp.mjs";
14
- import "./query-lane-context-DgxWaKr-.mjs";
15
- import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-CGr02DOy-CQsUdKCe.mjs";
16
- import "./types-BFCrGkhG.mjs";
17
- import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-B4FVsvO7-DpvKYHSB.mjs";
18
- import { i as SqlParamRefMutator } from "./middleware-DzFPUERE-C6RrGmcp.mjs";
19
- import "./middleware-CcDThETr.mjs";
20
- import "./collection-methods-CS1e16Ij.mjs";
6
+ import { n as SqlQueryPlan } from "./plan-Dd6M8olW-Dynb9vKp.mjs";
7
+ import { m as RawCodecInferer, o as CodecTypesBase } from "./expression-CbgzZLXY-Bzqi0ZTM.mjs";
8
+ import "./expression-DBDD1QR1.mjs";
9
+ import { m as MarkerReadResult, t as Adapter } from "./ast-DZnTuPWA.mjs";
10
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-BKmtONvF-bBXCQ0s1.mjs";
11
+ import "./plan-G5_dBmgg.mjs";
12
+ import { n as CollectionMethodContribution } from "./collection-methods-HlRizYfF-DKdq47dN.mjs";
13
+ import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lane-context-D4U6ox8I-CGLC-1HK.mjs";
14
+ import "./query-lane-context-TQxP0UjW.mjs";
15
+ import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-CMSRIhJK-D0oiijer.mjs";
16
+ import "./types-ClvFL9_q.mjs";
17
+ import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-B4FVsvO7-C0kgrpwC.mjs";
18
+ import { i as SqlParamRefMutator } from "./middleware-BZYekCO2-DeY82fwI.mjs";
19
+ import "./middleware-Q-P3nMQA.mjs";
20
+ import "./collection-methods-CO0bz9PJ.mjs";
21
21
  import { Contract, PlanMeta } from "@prisma/orm-framework/contract/types";
22
22
  import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
23
23
  import { Activity, Activity as Activity$1, ActivityContext, ActivityEndedResult, ActivityEndedResult as ActivityEndedResult$1, ActivityFinalizedResult, ActivityFinalizedResult as ActivityFinalizedResult$1, ActivityInterceptResult, ActivityInterceptResult as ActivityInterceptResult$1, ActivityParent, ActivityParent as ActivityParent$1, AsyncIterableResult, ClientActivity, ClientActivity as ClientActivity$1, ClientActivityEnd, ClientActivityEnd as ClientActivityEnd$1, ClientActivityEnded, ClientActivityKind, ClientActivityKind as ClientActivityKind$1, ClientActivityResult, ClientActivityResult as ClientActivityResult$1, ExecuteInterceptResult, ExecuteInterceptResult as ExecuteInterceptResult$1, ExecutionPlan, MutationDefaultGeneratorContributor, QueryInterceptResult, QueryInterceptResult as QueryInterceptResult$1, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeLog as Log, RuntimeMiddleware, RuntimeMode, RuntimeMode as RuntimeMode$1, StartActivity, StartActivity as StartActivity$1, StatementActivity, StatementEnded, TransactionActivity, TransactionEnded } from "@prisma/orm-framework/components/runtime";
@@ -623,4 +623,4 @@ interface ToSqlMember {
623
623
  declare function createToSql<TTargetId extends string>(stack: SqlExecutionStack<TTargetId>, contract: Contract<SqlStorage>): ToSqlMember['toSql'];
624
624
  //#endregion
625
625
  export { RuntimeOptions as $, extractCodecIds as A, withTransaction as At, ActivitySourceTarget as B, ToSqlMember as C, delegatingActivitySource as Ct, createAstCodecRegistry as D, lazyActivitySource as Dt, budgets as E, findActivitySource as Et, validateContractCodecMappings as F, MarkerReader as G, CloseRefusal as H, ActivityExecuteOptions as I, PreparedStatementInternals as J, PreparedExecutionImpl as K, ActivityHandle as L, lowerSqlPlan as M, toRuntimeOptions as N, createToSql as O, planContentHashOn as Ot, validateCodecRegistryCompleteness as P, RuntimeFamilyAdapter as Q, ActivityRoute as R, StatementEnded as S, createSqlExecutionStack as St, TransactionEnded as T, encodeParamsWithMetadata as Tt, ConnectionProvider as U, BoundPreparedStatement as V, HashablePlan as W, RuntimeConnection as X, Runtime as Y, RuntimeExecutionOptions as Z, RenderedSql as _, TelemetryOutcome as _t, ActivityParent$1 as a, SqlExecutionStack as at, StartActivity$1 as b, activitySource as bt, ClientActivityEnd$1 as c, SqlMiddlewareContext as ct, ClientActivityResult$1 as d, SqlRuntimeBase as dt, RuntimeParameterizedCodecDescriptor as et, DelegatingRuntime as f, SqlRuntimeDriverInstance as ft, QueryInterceptResult$1 as g, SqlStaticContributions as gt, Log as h, SqlRuntimeTargetDescriptor as ht, ActivityInterceptResult$1 as i, RuntimeTransactionOptions as it, lints as j, withTransactionMembers as jt, delegatingRuntime as k, startActivityOn as kt, ClientActivityEnded as l, SqlRuntimeAdapterDescriptor as lt, LintsOptions as m, SqlRuntimeExtensionInstance as mt, ActivityEndedResult$1 as n, RuntimeTelemetryEvent as nt, BudgetsOptions as o, SqlExecutionStackWithDriver as ot, ExecuteInterceptResult$1 as p, SqlRuntimeExtensionDescriptor as pt, PreparedStatementImpl as q, ActivityFinalizedResult$1 as r, RuntimeTransaction as rt, ClientActivity$1 as s, SqlMiddleware as st, Activity$1 as t, RuntimeQueryable as tt, ClientActivityKind$1 as u, SqlRuntimeAdapterInstance as ut, RuntimeMode$1 as v, TransactionContext as vt, TransactionActivity as w, deriveParamMetadata as wt, StatementActivity as x, createExecutionContext as xt, SqlExecutionOptions as y, VerifyMarkerOption as yt, ActivitySource as z };
626
- //# sourceMappingURL=index-CXtZjjgy.d.mts.map
626
+ //# sourceMappingURL=index-Dlup-3Az.d.mts.map