@prisma/orm-family-sql 8.0.0-rc.24-dev.28 → 8.0.0-rc.24-dev.30

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 (200) hide show
  1. package/dist/{aggregate-descriptor-registry-DM1hmlq-.mjs → aggregate-descriptor-registry-oSsBuRHQ.mjs} +2 -2
  2. package/dist/{aggregate-descriptor-registry-DM1hmlq-.mjs.map → aggregate-descriptor-registry-oSsBuRHQ.mjs.map} +1 -1
  3. package/dist/{ast-BO3Wgbrl.mjs → ast-BpFfUmb_.mjs} +2 -2
  4. package/dist/{ast-BO3Wgbrl.mjs.map → ast-BpFfUmb_.mjs.map} +1 -1
  5. package/dist/{ast-D0yJ7Yf0.d.mts → ast-DvD53wSW.d.mts} +3 -3
  6. package/dist/{ast-D0yJ7Yf0.d.mts.map → ast-DvD53wSW.d.mts.map} +1 -1
  7. package/dist/{attribute-specs-DL1btx0j.d.mts → attribute-specs-DgYb4op9.d.mts} +3 -3
  8. package/dist/{attribute-specs-DL1btx0j.d.mts.map → attribute-specs-DgYb4op9.d.mts.map} +1 -1
  9. package/dist/{authoring-entity-types-CgKIgWq5-BqNs-56x.d.mts → authoring-entity-types-CgKIgWq5-C3GyB8Hj.d.mts} +2 -2
  10. package/dist/{authoring-entity-types-CgKIgWq5-BqNs-56x.d.mts.map → authoring-entity-types-CgKIgWq5-C3GyB8Hj.d.mts.map} +1 -1
  11. package/dist/builder.d.mts +3 -3
  12. package/dist/builder__runtime.d.mts +7 -7
  13. package/dist/builder__runtime.mjs +26 -12
  14. package/dist/builder__runtime.mjs.map +1 -1
  15. package/dist/builder__types.d.mts +5 -5
  16. package/dist/{collection-methods-CN0GIWWR-BSJvP4Kc.d.mts → collection-methods-As4pXm7B-3xgTSoyU.d.mts} +3 -3
  17. package/dist/{collection-methods-CN0GIWWR-BSJvP4Kc.d.mts.map → collection-methods-As4pXm7B-3xgTSoyU.d.mts.map} +1 -1
  18. package/dist/collection-methods-CS1e16Ij.d.mts +1 -0
  19. package/dist/config-types-CGDhWE3o.mjs +147 -0
  20. package/dist/config-types-CGDhWE3o.mjs.map +1 -0
  21. package/dist/{config-types-Ce1tAJ0B.d.mts → config-types-DVRid5jV.d.mts} +15 -3
  22. package/dist/config-types-DVRid5jV.d.mts.map +1 -0
  23. package/dist/{contract-builder-Dbo5LeXs.mjs → contract-builder-BqswyknO.mjs} +3 -3
  24. package/dist/contract-builder-BqswyknO.mjs.map +1 -0
  25. package/dist/{contract-builder-BfPC4mQK.d.mts → contract-builder-fyzIdWqX.d.mts} +77 -2
  26. package/dist/{contract-builder-BfPC4mQK.d.mts.map → contract-builder-fyzIdWqX.d.mts.map} +1 -1
  27. package/dist/contract-emitter.d.mts +3 -2
  28. package/dist/contract-emitter.d.mts.map +1 -1
  29. package/dist/contract-emitter.mjs +1 -1
  30. package/dist/contract-prisma7__provider.mjs +6 -6
  31. package/dist/contract-psl.d.mts +1 -1
  32. package/dist/contract-psl.mjs +1 -1
  33. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  34. package/dist/contract-psl__attribute-specs.mjs +1 -1
  35. package/dist/contract-psl__provider.mjs +22 -19
  36. package/dist/contract-psl__provider.mjs.map +1 -1
  37. package/dist/contract-ts.d.mts +3 -3
  38. package/dist/contract-ts.mjs +4 -4
  39. package/dist/contract-ts__config-types.d.mts +2 -2
  40. package/dist/contract-ts__config-types.mjs +2 -2
  41. package/dist/contract-ts__contract-builder.d.mts +2 -2
  42. package/dist/contract-ts__contract-builder.mjs +3 -3
  43. package/dist/contract.d.mts +3 -3
  44. package/dist/contract.mjs +4 -4
  45. package/dist/contract__foreign-key-materialization.d.mts +2 -2
  46. package/dist/contract__foreign-key-materialization.mjs +3 -3
  47. package/dist/contract__validators.d.mts +1 -1
  48. package/dist/contract__validators.mjs +1 -1
  49. package/dist/{control-Cb6YoQ8j.d.mts → control-BwL5tCj4.d.mts} +159 -43
  50. package/dist/control-BwL5tCj4.d.mts.map +1 -0
  51. package/dist/{control-kHFMtE8A.mjs → control-DUbuxp4j.mjs} +2117 -1315
  52. package/dist/control-DUbuxp4j.mjs.map +1 -0
  53. package/dist/{control-adapter-0z3ce44U-CLj4kqLI.d.mts → control-adapter-0z3ce44U-BQ26ercw.d.mts} +4 -4
  54. package/dist/{control-adapter-0z3ce44U-CLj4kqLI.d.mts.map → control-adapter-0z3ce44U-BQ26ercw.d.mts.map} +1 -1
  55. package/dist/{control-adapter-DIwBUSs6.d.mts → control-adapter-DRLco_j0.d.mts} +2 -2
  56. package/dist/{control-adapter-DIwBUSs6.d.mts.map → control-adapter-DRLco_j0.d.mts.map} +1 -1
  57. package/dist/{db-DfYeGVcu-B99ycjaC.d.mts → db-by-MuHF2-B7uz_0VW.d.mts} +27 -18
  58. package/dist/db-by-MuHF2-B7uz_0VW.d.mts.map +1 -0
  59. package/dist/{ddl-types-D22OYeFy-Be5-W-5z.d.mts → ddl-types-D93zTpm9-DhSkpX0K.d.mts} +3 -3
  60. package/dist/{ddl-types-D22OYeFy-Be5-W-5z.d.mts.map → ddl-types-D93zTpm9-DhSkpX0K.d.mts.map} +1 -1
  61. package/dist/{derived-checks-BWg0DOyz-7O0x1Tgn.mjs → derived-checks-BoHNzt-a-4Vi-QMdx.mjs} +228 -10
  62. package/dist/derived-checks-BoHNzt-a-4Vi-QMdx.mjs.map +1 -0
  63. package/dist/{diff-DbkXUf4C.d.mts → diff-DZHlisyY.d.mts} +2 -2
  64. package/dist/{diff-DbkXUf4C.d.mts.map → diff-DZHlisyY.d.mts.map} +1 -1
  65. package/dist/{dist-BJjqJT_M.mjs → dist-C-Gi4VUC.mjs} +20 -14
  66. package/dist/dist-C-Gi4VUC.mjs.map +1 -0
  67. package/dist/{exports-BR5ctYYI-C_-aedbr.mjs → exports-kqOXg2OT-D3lo7jnX.mjs} +168 -162
  68. package/dist/exports-kqOXg2OT-D3lo7jnX.mjs.map +1 -0
  69. package/dist/expression-Bz8uEh8W.d.mts +2 -0
  70. package/dist/{expression-D8c3t2Dx-CCHt1OdT.d.mts → expression-DYRYmkMl-BMKxN8Wf.d.mts} +64 -43
  71. package/dist/expression-DYRYmkMl-BMKxN8Wf.d.mts.map +1 -0
  72. package/dist/{expression-DL7L8You-C9BAeM2d.d.mts → expression-VJWwxbUB-BtNDaTCt.d.mts} +5 -5
  73. package/dist/expression-VJWwxbUB-BtNDaTCt.d.mts.map +1 -0
  74. package/dist/{expression-impl-DHdjzqE3-Cd9gP7oC.mjs → expression-impl-C5Ha-fXs-CxXn8gDo.mjs} +7 -5
  75. package/dist/expression-impl-C5Ha-fXs-CxXn8gDo.mjs.map +1 -0
  76. package/dist/family.d.mts +9 -9
  77. package/dist/family.mjs +6 -6
  78. package/dist/family__control-adapter.d.mts +2 -2
  79. package/dist/family__control.d.mts +4 -4
  80. package/dist/family__control.mjs +3 -3
  81. package/dist/family__diff.d.mts +1 -1
  82. package/dist/family__ir.mjs +1 -1
  83. package/dist/family__migration.d.mts +1 -1
  84. package/dist/family__pack.d.mts +1 -1
  85. package/dist/family__pack.mjs +2 -2
  86. package/dist/family__psl-infer.mjs +1 -1
  87. package/dist/{foreign-key-materialization-C53nVQuD.d.mts → foreign-key-materialization-Dntzsl64.d.mts} +8 -2
  88. package/dist/foreign-key-materialization-Dntzsl64.d.mts.map +1 -0
  89. package/dist/{foreign-key-materialization-CCHAR789.mjs → foreign-key-materialization-pYirysH0.mjs} +2 -2
  90. package/dist/foreign-key-materialization-pYirysH0.mjs.map +1 -0
  91. package/dist/{functions-Cl_egJ2w.mjs → functions-DGketpiK.mjs} +3 -3
  92. package/dist/{functions-Cl_egJ2w.mjs.map → functions-DGketpiK.mjs.map} +1 -1
  93. package/dist/functions-gl3PL1so.d.mts +1 -0
  94. package/dist/{generator-functions-Bze9nVHL-Cetbgui3.mjs → generator-functions-Bze9nVHL-Bg9PVsti.mjs} +3 -3
  95. package/dist/{generator-functions-Bze9nVHL-Cetbgui3.mjs.map → generator-functions-Bze9nVHL-Bg9PVsti.mjs.map} +1 -1
  96. package/dist/{index-equivalence-DswCiq5l-9GNm8oG9.mjs → index-equivalence-eC2jGpOp-SkExsiy1.mjs} +3 -3
  97. package/dist/{index-equivalence-DswCiq5l-9GNm8oG9.mjs.map → index-equivalence-eC2jGpOp-SkExsiy1.mjs.map} +1 -1
  98. package/dist/{index-DA1EEz4y.d.mts → index-nW0rAUTr.d.mts} +28 -30
  99. package/dist/index-nW0rAUTr.d.mts.map +1 -0
  100. package/dist/{index-reference-CSrhOgZL-PIYy9LTA.d.mts → index-reference-CjvRzUh1-CG0Ouv6i.d.mts} +3 -3
  101. package/dist/{index-reference-CSrhOgZL-PIYy9LTA.d.mts.map → index-reference-CjvRzUh1-CG0Ouv6i.d.mts.map} +1 -1
  102. package/dist/index-reference-X_kA2mV8.d.mts +1 -0
  103. package/dist/{interpreter-CVd521dx-wWck8W93.mjs → interpreter-DoQwVOyS-BMiOIZcg.mjs} +209 -29
  104. package/dist/interpreter-DoQwVOyS-BMiOIZcg.mjs.map +1 -0
  105. package/dist/middleware-CcDThETr.d.mts +1 -0
  106. package/dist/{middleware-4P5tDL8a-C1UaoUUN.d.mts → middleware-DzFPUERE-C6RrGmcp.d.mts} +3 -3
  107. package/dist/{middleware-4P5tDL8a-C1UaoUUN.d.mts.map → middleware-DzFPUERE-C6RrGmcp.d.mts.map} +1 -1
  108. package/dist/{migration-DctFInNJ.d.mts → migration-BUWF9_Tx.d.mts} +2 -2
  109. package/dist/{migration-DctFInNJ.d.mts.map → migration-BUWF9_Tx.d.mts.map} +1 -1
  110. package/dist/orm-client.d.mts +113 -69
  111. package/dist/orm-client.d.mts.map +1 -1
  112. package/dist/orm-client.mjs +391 -121
  113. package/dist/orm-client.mjs.map +1 -1
  114. package/dist/{pack-BBsFyTEv.d.mts → pack-CbYm5Bfz.d.mts} +3 -3
  115. package/dist/{pack-BBsFyTEv.d.mts.map → pack-CbYm5Bfz.d.mts.map} +1 -1
  116. package/dist/plan-BjX90QC6.d.mts +2 -0
  117. package/dist/{plan-49sl7WSN-C22ZPSE9.d.mts → plan-Dv6v5_y4-CGWEjfCv.d.mts} +3 -3
  118. package/dist/{plan-49sl7WSN-C22ZPSE9.d.mts.map → plan-Dv6v5_y4-CGWEjfCv.d.mts.map} +1 -1
  119. package/dist/{psl-column-resolution-Bv_-TDHZ-Cuu5X_9o.d.mts → psl-column-resolution-Bv_-TDHZ-C9foRNXV.d.mts} +2 -2
  120. package/dist/{psl-column-resolution-Bv_-TDHZ-Cuu5X_9o.d.mts.map → psl-column-resolution-Bv_-TDHZ-C9foRNXV.d.mts.map} +1 -1
  121. package/dist/{psl-field-resolution-GN4iup8d-DjlZymdL.mjs → psl-field-resolution-CpxUePg1-tvt3yqqs.mjs} +9 -5
  122. package/dist/psl-field-resolution-CpxUePg1-tvt3yqqs.mjs.map +1 -0
  123. package/dist/{psl-infer-C9kVS9ma.mjs → psl-infer-Ckg3t4Kr.mjs} +2 -2
  124. package/dist/{psl-infer-C9kVS9ma.mjs.map → psl-infer-Ckg3t4Kr.mjs.map} +1 -1
  125. package/dist/{query-lane-context-DIJU7Owj-CAZQq4AD.d.mts → query-lane-context-BetHj4j--D3S5nucp.d.mts} +5 -5
  126. package/dist/{query-lane-context-DIJU7Owj-CAZQq4AD.d.mts.map → query-lane-context-BetHj4j--D3S5nucp.d.mts.map} +1 -1
  127. package/dist/query-lane-context-DgxWaKr-.d.mts +1 -0
  128. package/dist/relational-core.d.mts +13 -13
  129. package/dist/relational-core.mjs +3 -3
  130. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  131. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  132. package/dist/relational-core__ast.d.mts +3 -3
  133. package/dist/relational-core__ast.mjs +2 -2
  134. package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
  135. package/dist/relational-core__collection-methods.d.mts +2 -2
  136. package/dist/relational-core__contract-free.d.mts +2 -2
  137. package/dist/relational-core__contract-free.mjs +1 -1
  138. package/dist/relational-core__contract-free.mjs.map +1 -1
  139. package/dist/relational-core__expression.d.mts +4 -4
  140. package/dist/relational-core__expression.mjs +1 -1
  141. package/dist/relational-core__functions.d.mts +2 -2
  142. package/dist/relational-core__functions.mjs +1 -1
  143. package/dist/relational-core__index-reference.d.mts +2 -2
  144. package/dist/relational-core__middleware.d.mts +2 -2
  145. package/dist/relational-core__plan.d.mts +3 -3
  146. package/dist/relational-core__query-lane-context.d.mts +2 -2
  147. package/dist/relational-core__types.d.mts +2 -2
  148. package/dist/runtime.d.mts +4 -4
  149. package/dist/runtime.mjs +1 -1
  150. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  151. package/dist/{sql-contract-serializer-sMY3prTx-D_K7uFJk.mjs → sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs} +2 -2
  152. package/dist/{sql-contract-serializer-sMY3prTx-D_K7uFJk.mjs.map → sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs.map} +1 -1
  153. package/dist/{sql-execution-plan-BeuM3CeD-DIzyMDsA.d.mts → sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts} +3 -3
  154. package/dist/sql-execution-plan-4OFBeONp-CLkDqMdz.d.mts.map +1 -0
  155. package/dist/{transaction-state-CEe4TlC1-C8vX6Ror.d.mts → transaction-state-B4FVsvO7-DpvKYHSB.d.mts} +12 -10
  156. package/dist/{transaction-state-CEe4TlC1-C8vX6Ror.d.mts.map → transaction-state-B4FVsvO7-DpvKYHSB.d.mts.map} +1 -1
  157. package/dist/types-BFCrGkhG.d.mts +1 -0
  158. package/dist/{types-C6r7Myrr-3WL0WDKF.d.mts → types-CGr02DOy-CQsUdKCe.d.mts} +6 -6
  159. package/dist/{types-C6r7Myrr-3WL0WDKF.d.mts.map → types-CGr02DOy-CQsUdKCe.d.mts.map} +1 -1
  160. package/dist/{types-CWvmfrfd-DLQYhSUx.d.mts → types-CWvmfrfd-HPIh55bi.d.mts} +2 -2
  161. package/dist/{types-CWvmfrfd-DLQYhSUx.d.mts.map → types-CWvmfrfd-HPIh55bi.d.mts.map} +1 -1
  162. package/dist/{types-DeimCJiI-CVQS7KCu.d.mts → types-DEbNJhyS-CY7Ye2vN.d.mts} +5 -5
  163. package/dist/{types-DeimCJiI-CVQS7KCu.d.mts.map → types-DEbNJhyS-CY7Ye2vN.d.mts.map} +1 -1
  164. package/dist/{types-wn1bXh0b-CJPAJi22.mjs → types-DzQmUrUm-ColHE4Av.mjs} +18 -5
  165. package/dist/types-DzQmUrUm-ColHE4Av.mjs.map +1 -0
  166. package/dist/{validators-CWcdf_jZ.mjs → validators-CcR6gGf_.mjs} +13 -3
  167. package/dist/validators-CcR6gGf_.mjs.map +1 -0
  168. package/dist/{validators-Dt-19ywK.d.mts → validators-Dq7g7udF.d.mts} +10 -2
  169. package/dist/validators-Dq7g7udF.d.mts.map +1 -0
  170. package/package.json +19 -19
  171. package/dist/collection-methods-B-md3Mu9.d.mts +0 -1
  172. package/dist/config-types-BVAADwjp.mjs +0 -68
  173. package/dist/config-types-BVAADwjp.mjs.map +0 -1
  174. package/dist/config-types-Ce1tAJ0B.d.mts.map +0 -1
  175. package/dist/contract-builder-Dbo5LeXs.mjs.map +0 -1
  176. package/dist/control-Cb6YoQ8j.d.mts.map +0 -1
  177. package/dist/control-kHFMtE8A.mjs.map +0 -1
  178. package/dist/db-DfYeGVcu-B99ycjaC.d.mts.map +0 -1
  179. package/dist/derived-checks-BWg0DOyz-7O0x1Tgn.mjs.map +0 -1
  180. package/dist/dist-BJjqJT_M.mjs.map +0 -1
  181. package/dist/exports-BR5ctYYI-C_-aedbr.mjs.map +0 -1
  182. package/dist/expression-D8c3t2Dx-CCHt1OdT.d.mts.map +0 -1
  183. package/dist/expression-DL7L8You-C9BAeM2d.d.mts.map +0 -1
  184. package/dist/expression-Voyb-zN0.d.mts +0 -2
  185. package/dist/expression-impl-DHdjzqE3-Cd9gP7oC.mjs.map +0 -1
  186. package/dist/foreign-key-materialization-C53nVQuD.d.mts.map +0 -1
  187. package/dist/foreign-key-materialization-CCHAR789.mjs.map +0 -1
  188. package/dist/functions-zPzQYOjW.d.mts +0 -1
  189. package/dist/index-DA1EEz4y.d.mts.map +0 -1
  190. package/dist/index-reference-DuQ-0Da9.d.mts +0 -1
  191. package/dist/interpreter-CVd521dx-wWck8W93.mjs.map +0 -1
  192. package/dist/middleware-DDOdMwm4.d.mts +0 -1
  193. package/dist/plan-BEnXVtn1.d.mts +0 -2
  194. package/dist/psl-field-resolution-GN4iup8d-DjlZymdL.mjs.map +0 -1
  195. package/dist/query-lane-context-Dm5f9VAQ.d.mts +0 -1
  196. package/dist/sql-execution-plan-BeuM3CeD-DIzyMDsA.d.mts.map +0 -1
  197. package/dist/types-ChjF67Fc.d.mts +0 -1
  198. package/dist/types-wn1bXh0b-CJPAJi22.mjs.map +0 -1
  199. package/dist/validators-CWcdf_jZ.mjs.map +0 -1
  200. package/dist/validators-Dt-19ywK.d.mts.map +0 -1
@@ -1,11 +1,11 @@
1
- import { c as AnyExpression } from "./types-DeimCJiI-CVQS7KCu.mjs";
2
- import { D as ScopeField, c as Expression } from "./expression-D8c3t2Dx-CCHt1OdT.mjs";
3
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-DL7L8You.d.mts
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
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.
7
7
  *
8
- * `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.
8
+ * `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`.
9
9
  *
10
10
  * `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.
11
11
  */
@@ -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-DL7L8You-C9BAeM2d.d.mts.map
22
+ //# sourceMappingURL=expression-VJWwxbUB-BtNDaTCt.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-VJWwxbUB-BtNDaTCt.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/expression-VJWwxbUB.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,8 +1,9 @@
1
- import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-wn1bXh0b-CJPAJi22.mjs";
1
+ import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from "./types-DzQmUrUm-ColHE4Av.mjs";
2
2
  import { t as planFromAst } from "./plan-Dh0LbYIv-ubBSdUgl.mjs";
3
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
4
  import { invariant } from "@prisma/orm-framework/utils/assertions";
4
5
  import { runtimeError } from "@prisma/orm-framework/components/runtime";
5
- //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-DHdjzqE3.mjs
6
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/expression-impl-C5Ha-fXs.mjs
6
7
  /**
7
8
  * Resolve a raw value or an Expression into an AST expression node.
8
9
  *
@@ -92,7 +93,8 @@ function resolveRowSpec(spec) {
92
93
  nullable: false
93
94
  } : {
94
95
  codecId: entry.codecId,
95
- nullable: entry.nullable ?? false
96
+ nullable: entry.nullable ?? false,
97
+ ...ifDefined("codec", entry.codec)
96
98
  }]));
97
99
  }
98
100
  function createRawSql(adapter, planContext) {
@@ -152,7 +154,7 @@ var RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {
152
154
  /**
153
155
  * 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.
154
156
  *
155
- * `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.
157
+ * `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`.
156
158
  *
157
159
  * `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.
158
160
  */
@@ -175,4 +177,4 @@ var ExpressionImpl = class {
175
177
  //#endregion
176
178
  export { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };
177
179
 
178
- //# sourceMappingURL=expression-impl-DHdjzqE3-Cd9gP7oC.mjs.map
180
+ //# sourceMappingURL=expression-impl-C5Ha-fXs-CxXn8gDo.mjs.map
@@ -0,0 +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,MAA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K;EACvD,MAAM,WAAW,OAAO,SAAS,WAAW,QAAQ,KAAK,YAAY;EACrE,MAAM,YAAY;GACjB;GACA;EACD;EACA,MAAM,OAAO,IAAI,QAAQ;GACxB,OAAO,KAAK;GACZ,SAAS;EACV,CAAC;EACD,OAAO;GACN,YAAY;IACX;IACA;GACD;GACA,gBAAgB;EACjB;CACD;AACD;AACA,IAAI,6BAA6B,cAAc,kBAAkB;CAChE;CACA,YAAY,OAAO,aAAa;EAC/B,MAAM,KAAK;EACX,KAAK,cAAc;CACpB;CACA,WAAW,MAAM;EAChB,MAAM,OAAO,YAAY,KAAK,KAAK,OAAO,eAAe,IAAI,CAAC;EAC9D,MAAM,SAAS,KAAK;EACpB,UAAU,OAAO,SAAS,QAAQ,0CAA0C;EAC5E,OAAO;GACN,SAAS,OAAO;GAChB,gBAAgB;GAChB,aAAa,KAAK,QAAQ,IAAI;EAC/B;CACD;CACA,gBAAgB;EACf,MAAM,OAAO,YAAY,cAAc,KAAK,KAAK;EACjD,OAAO,EAAE,aAAa,KAAK,QAAQ,IAAI,EAAE;CAC1C;CACA,QAAQ,MAAM;EACb,OAAO,YAAY,MAAM,KAAK,YAAY,UAAU,KAAK,YAAY,MAAM;CAC5E;AACD;;;;;;;;AAUA,IAAI,iBAAiB,MAAM;CAC1B;CACA;CACA;CACA,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
package/dist/family.d.mts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-D1rXCcCk.mjs";
2
- import { h as checkSqlDefaultText } from "./validators-Dt-19ywK.mjs";
3
- import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-0z3ce44U-CLj4kqLI.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-DLQYhSUx.mjs";
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";
5
5
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
6
- import { $ as SqlDescribedContractSpace, $t as fieldEventStorage, A as MigrationPlannerResult, An as resolveColumnRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as slotSource, Bt as checkSqlExpressionText, C as MarkedRemoval, Cn as plannerSuccess, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnMeta, Dt as TableRenameRequest, E as MigrationPlan, En as removalsOfMigration, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueFailure, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueOperationIndexes, Gt as convertedColumnMeta, H as ReadReportedDefault, Hn as sqlOfSlot, Ht as contractColumns, I as NoTable, In as rowsWithoutValueSummary, It as appliedStatementsInOrder, J as SchemaTables, Jn as unconvertedFieldOf, Jt as createSqlTextSources, K as RequiredColumnMark, Kn as storedValueSubjects, Kt as convertedColumnOf, L as PlanFieldEventOperationsOptions, Ln as runnerFailure, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueFailure, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueMeta, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnOf, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsHoldingValueOf, Q as SqlDefaultFunctionName, Qn as unnamedFieldFillOf, Qt as extractCodecControlHooks, R as PlannedStatement, Rn as runnerSuccess, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerFailure, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as readReportedDefault, Tt as TableRename, U as ReportedBody, Un as sqlTypeLookupsOf, Ut as contractNamespaceToSchemaIR, V as ReadColumnDefault, Vn as sqlDefaultFunctions, Vt as columnTakesTemporaryValue, W as ReportedLiteralDefault, Wn as storageNameOfOperation, Wt as contractToSchemaIR, X as SqlControlFamilyInstance, Xn as unmatchedColumnRename, Xt as detectTableNameCaseChanges, Y as SingleOperationCall, Yn as unknownCallNames, Yt as detectDestructiveChanges, Z as SqlControlTargetDescriptor, Zn as unmatchedTableRename, Zt as encodeStoredValue, _ as FillValueCheck, _n as planStatements, _t as StoredValueReplacement, a as ColumnRename, an as isUnfilledSlot, at as StatementColumn, b as JsonKeyPath, bn as planValueObjectFieldRewrites, bt as SubjectStorage, c as ContractColumns, cn as keyPathOf, ct as StatementPlanningTarget, d as ConvertedColumn, dn as parseJsonPath, dt as StoredKeyFillField, en as fieldOfColumn, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionCallsByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planFieldEventOperations, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventCalls, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as fillValueProblem, it as SqlTextSources, j as ModelStorageEffect, jn as resolveTableRenameAgainst, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as requiredColumnsOfMigration, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as modelRenameStorageEffect, lt as StoredEnumValue, m as FieldEventCall, mn as planEnumValueRewrites, mt as StoredRewriteCalls, n as CallSubjects, nn as fieldStatementColumns, nt as SqlQuotingRules, o as ColumnRenameRequest, on as jsonPathText, ot as StatementOperations, p as DefaultResolverColumn, pn as partitionIssuesByControlPolicy, pt as StoredRewrite, q as RowsHoldingValueMark, qn as subjectsOfCalls, qt as createMigrationPlan, r as CallWithCompanions, rn as fillKeyProblem, rt as SqlSlot, s as ContractColumn, sn as keepRowsEdit, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldRenameStorageEffect, tt as SqlQuote, u as ControlPolicySubject, un as otherSpaceDeclaring, ut as StoredKeyFill, v as FillValueTypes, vn as planStoredRewrites, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readColumnDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as planVariantRowRewrites, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldFills, yt as StoredValueSubject, z as PlannedStatements, zn as scalarTypeNamesOf, zt as checkDatabasePoliciesHeld } from "./control-Cb6YoQ8j.mjs";
7
- import { t as resolveIntrospectedColumnType } from "./control-adapter-DIwBUSs6.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-DbkXUf4C.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";
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-DctFInNJ.mjs";
11
- import { i as sqlTargetTypeConstructors, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-BBsFyTEv.mjs";
10
+ import { t as SqlMigration } from "./migration-BUWF9_Tx.mjs";
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";
14
14
  import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-Cr9AeccU.mjs";
15
15
  import { a as timestampNowRuntimeGenerator, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-CSDcwOEG.mjs";
16
16
  import { n as parseContractMarkerRow, t as ContractMarkerRow } from "./verify-DHXbuZPB.mjs";
17
- export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ColumnTypeOf, type ColumnTypeReadsDefault, type ContractColumn, type ContractColumns, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultResolver, type DefaultResolverColumn, type EnumInfo, type ExecuteRequestLowerer, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, type FillValueCheck, type FillValueTypes, type GeneratorCallRefusal, type GeneratorCallsResult, INIT_ADDITIVE_POLICY, type InferredRelations, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type JsonKeyPath, type JsonPath, type JsonPathStep, type Lowerer, type MarkedRemoval, SqlMigration as Migration, 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 PhaseCallText, type PlanFieldEventOperationsOptions, type PlannedStatement, type PlannedStatements, type PlannedStoredRewrites, type PslPrinterOptions, type PslTypeArgument, type PslTypeCall, type ReadColumnDefault, type ReadReportedDefault, type RelationField, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, type RowsHoldingValueMark, type SchemaTables, type SingleOperationCall, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, 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, SqlSchemaVerifierBase, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementOperations, type StatementOwnership, type StatementPlanningTarget, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, 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, UNBOUND_DOMAIN_NAMESPACE_ID, UnfilledValue, type UnnamedFieldFill, type VariantRowRewrite, type VerifySqlSchemaByDiffInput, type WorkingSchemaOrigins, type WrittenPslTypeCall, type WrittenTypeChoiceCall, acceptedByDataType, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, mapDefault, modelRenameStorageEffect, otherSpaceDeclaring, parseContractMarkerRow, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, sameInNormalForm, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf, verifySqlSchemaByDiff, writtenTypeChoiceCall };
17
+ export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ColumnTypeOf, type ColumnTypeReadsDefault, type ContractColumn, type ContractColumns, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultResolver, type DefaultResolverColumn, type EnumInfo, type ExecuteRequestLowerer, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, type FillValueCheck, type FillValueTypes, type GeneratorCallRefusal, type GeneratorCallsResult, INIT_ADDITIVE_POLICY, type InferredRelations, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type JsonKeyPath, type JsonPath, type JsonPathStep, type Lowerer, type MarkedRemoval, SqlMigration as Migration, 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 PhaseCallText, type PlanFieldEventOperationsOptions, type PlannedStatement, type PlannedStatements, type PlannedStoredRewrites, type PslPrinterOptions, type PslTypeArgument, type PslTypeCall, type ReadColumnDefault, type ReadReportedDefault, type RelationField, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, type RowsHoldingValueMark, type SameName, type SchemaTables, type SingleOperationCall, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, 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, SqlSchemaVerifierBase, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementOperations, type StatementOwnership, type StatementPlanningTarget, StorageRenames, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, 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, UNBOUND_DOMAIN_NAMESPACE_ID, UnfilledValue, type UnnamedFieldFill, type VariantRowRewrite, type VerifySqlSchemaByDiffInput, type WorkingSchemaOrigins, type WrittenPslTypeCall, type WrittenTypeChoiceCall, acceptedByDataType, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, exactName, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, mapDefault, modelRenameStorageEffect, otherSpaceDeclaring, parseContractMarkerRow, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, sameInNormalForm, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf, verifySqlSchemaByDiff, writtenTypeChoiceCall };
package/dist/family.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  import { t as resolveStorageTable } from "./resolve-storage-table-BHLQsOza.mjs";
2
- import { n as checkSqlDefaultText } from "./validators-CWcdf_jZ.mjs";
3
- import { c as sqlTargetTypeConstructors, s as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-Bze9nVHL-Cetbgui3.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-Bg9PVsti.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-D_K7uFJk.mjs";
5
+ import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-hb9EW6FW.mjs";
6
6
  import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-DhKm6hB3.mjs";
7
- import { $ as requiredColumnOf, A as isUnfilledSlot, B as planFieldEventCalls, C as encodeStoredValue, Ct as unnamedFieldFillOf, D as fieldStatementColumns, E as fieldRenameStorageEffect, F as otherSpaceDeclaring, G as planValueObjectFieldRewrites, H as planStatements, I as parseJsonPath, J as plannerSuccess, K as planVariantRowRewrites, L as partitionCallsByControlPolicy, M as keepRowsEdit, N as keyPathOf, O as fillKeyProblem, P as modelRenameStorageEffect, Q as requiredColumnMeta, R as partitionIssuesByControlPolicy, S as detectTableNameCaseChanges, St as unmatchedTableRename, T as fieldOfColumn, U as planStoredRewrites, V as planFieldEventOperations, W as planValueObjectFieldFills, X as readReportedDefault, Y as readColumnDefault, Z as removalsOfMigration, _ as convertedColumnMeta, _t as storedValueSubjects, a as UnfilledValue, at as rowsHoldingValueOf, b as createSqlTextSources, bt as unknownCallNames, c as assembleAuthoringContributions, ct as runnerFailure, d as checkSqlExpressionText, dt as slotSource, et as requiredColumnsOfMigration, f as columnTakesTemporaryValue, ft as sqlDefaultFunctions, gt as storedValueOperationIndexes, h as contractToSchemaIR, ht as storageNameOfOperation, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueMeta, j as jsonPathText, k as fillValueProblem, l as backfillOfDefaultedField, lt as runnerSuccess, m as contractNamespaceToSchemaIR, mt as sqlTypeLookupsOf, n as INIT_ADDITIVE_POLICY, nt as resolveTableRenameAgainst, o as acceptedByDataType, ot as rowsWithoutValueFailure, p as contractColumns, pt as sqlOfSlot, q as plannerFailure, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueFailure, s as appliedStatementsInOrder, st as rowsWithoutValueSummary, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveColumnRenameAgainst, u as checkDatabasePoliciesHeld, ut as scalarTypeNamesOf, v as convertedColumnOf, vt as subjectsOfCalls, w as fieldEventStorage, x as detectDestructiveChanges, xt as unmatchedColumnRename, y as createMigrationPlan, yt as unconvertedFieldOf, z as planEnumValueRewrites } from "./control-kHFMtE8A.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-DUbuxp4j.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";
11
11
  import { t as SqlMigration } from "./migration-BJQjkqFz.mjs";
12
12
  import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-D1CTmC3a.mjs";
13
13
  import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as sameInNormalForm, r as inferColumnTypes, s as writtenTypeChoiceCall, t as fewestArgumentsCall } from "./psl-build-BA0Ndi1v.mjs";
14
- import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-C9kVS9ma.mjs";
14
+ import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-Ckg3t4Kr.mjs";
15
15
  import { i as timestampNowRuntimeGenerator, n as resolveDomainModel, t as UNBOUND_DOMAIN_NAMESPACE_ID } from "./runtime-DkUiQi00.mjs";
16
- export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, SqlMigration as Migration, NO_RENAMED_ORIGINS, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID, UnfilledValue, acceptedByDataType, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, mapDefault, modelRenameStorageEffect, otherSpaceDeclaring, parseContractMarkerRow, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, sameInNormalForm, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf, verifySqlSchemaByDiff, writtenTypeChoiceCall };
16
+ export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, SqlMigration as Migration, NO_RENAMED_ORIGINS, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, StorageRenames, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID, UnfilledValue, acceptedByDataType, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, exactName, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, mapDefault, modelRenameStorageEffect, otherSpaceDeclaring, parseContractMarkerRow, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, sameInNormalForm, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf, verifySqlSchemaByDiff, writtenTypeChoiceCall };
@@ -1,3 +1,3 @@
1
- import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-0z3ce44U-CLj4kqLI.mjs";
2
- import { t as resolveIntrospectedColumnType } from "./control-adapter-DIwBUSs6.mjs";
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";
3
3
  export { type ExecuteRequestLowerer, type Lowerer, type SqlControlAdapter, type SqlControlAdapterDescriptor, resolveIntrospectedColumnType };
@@ -1,5 +1,5 @@
1
- import { h as checkSqlDefaultText } from "./validators-Dt-19ywK.mjs";
2
- import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-CWvmfrfd-DLQYhSUx.mjs";
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";
3
3
  import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BXkhxcPs.mjs";
4
- import { $ as SqlDescribedContractSpace, $t as fieldEventStorage, A as MigrationPlannerResult, An as resolveColumnRenameAgainst, At as UnfilledValue, B as PlannedStoredRewrites, Bn as slotSource, Bt as checkSqlExpressionText, C as MarkedRemoval, Cn as plannerSuccess, Ct as TableMove, D as MigrationPlanOperation, Dn as requiredColumnMeta, Dt as TableRenameRequest, E as MigrationPlan, En as removalsOfMigration, Et as TableRenameByHand, F as NamespaceStatementTarget, Fn as rowsWithoutValueFailure, Ft as acceptedByDataType, G as RequiredColumn, Gn as storedValueOperationIndexes, Gt as convertedColumnMeta, H as ReadReportedDefault, Hn as sqlOfSlot, Ht as contractColumns, I as NoTable, In as rowsWithoutValueSummary, It as appliedStatementsInOrder, J as SchemaTables, Jn as unconvertedFieldOf, Jt as createSqlTextSources, K as RequiredColumnMark, Kn as storedValueSubjects, Kt as convertedColumnOf, L as PlanFieldEventOperationsOptions, Ln as runnerFailure, Lt as assembleAuthoringContributions, M as ModelTable, Mn as rowsHoldingValueFailure, Mt as VariantRowRewrite, N as NO_RENAMED_ORIGINS, Nn as rowsHoldingValueMeta, Nt as WorkingSchemaOrigins, O as MigrationPlanner, On as requiredColumnOf, Ot as TargetMigrationsCapability, P as NamespaceRename, Pn as rowsHoldingValueOf, Pt as _default, Q as SqlDefaultFunctionName, Qn as unnamedFieldFillOf, Qt as extractCodecControlHooks, R as PlannedStatement, Rn as runnerSuccess, Rt as backfillOfDefaultedField, S as JsonPathStep, Sn as plannerFailure, St as TABLE_NAME_CASE_CHANGED_CODE, T as MigrationOperationPolicy, Tn as readReportedDefault, Tt as TableRename, U as ReportedBody, Un as sqlTypeLookupsOf, Ut as contractNamespaceToSchemaIR, V as ReadColumnDefault, Vn as sqlDefaultFunctions, Vt as columnTakesTemporaryValue, W as ReportedLiteralDefault, Wn as storageNameOfOperation, Wt as contractToSchemaIR, X as SqlControlFamilyInstance, Xn as unmatchedColumnRename, Xt as detectTableNameCaseChanges, Y as SingleOperationCall, Yn as unknownCallNames, Yt as detectDestructiveChanges, Z as SqlControlTargetDescriptor, Zn as unmatchedTableRename, Zt as encodeStoredValue, _ as FillValueCheck, _n as planStatements, _t as StoredValueReplacement, a as ColumnRename, an as isUnfilledSlot, at as StatementColumn, b as JsonKeyPath, bn as planValueObjectFieldRewrites, bt as SubjectStorage, c as ContractColumns, cn as keyPathOf, ct as StatementPlanningTarget, d as ConvertedColumn, dn as parseJsonPath, dt as StoredKeyFillField, en as fieldOfColumn, et as SqlPslBuildContext, f as DefaultResolver, fn as partitionCallsByControlPolicy, ft as StoredKeyRewrite, g as FieldStorageEffect, gn as planFieldEventOperations, gt as StoredValueCodec, h as FieldStatementColumns, hn as planFieldEventCalls, ht as StoredValueCallClasses, i as ColumnOnOneSide, in as fillValueProblem, it as SqlTextSources, j as ModelStorageEffect, jn as resolveTableRenameAgainst, jt as UnnamedFieldFill, k as MigrationPlannerConflict, kn as requiredColumnsOfMigration, kt as TargetRefusal, l as ContractToSchemaIROptions, ln as modelRenameStorageEffect, lt as StoredEnumValue, m as FieldEventCall, mn as planEnumValueRewrites, mt as StoredRewriteCalls, n as CallSubjects, nn as fieldStatementColumns, nt as SqlQuotingRules, o as ColumnRenameRequest, on as jsonPathText, ot as StatementOperations, p as DefaultResolverColumn, pn as partitionIssuesByControlPolicy, pt as StoredRewrite, q as RowsHoldingValueMark, qn as subjectsOfCalls, qt as createMigrationPlan, r as CallWithCompanions, rn as fillKeyProblem, rt as SqlSlot, s as ContractColumn, sn as keepRowsEdit, st as StatementOwnership, t as COLUMN_RENAME_UNMATCHED_CODE, tn as fieldRenameStorageEffect, tt as SqlQuote, u as ControlPolicySubject, un as otherSpaceDeclaring, ut as StoredKeyFill, v as FillValueTypes, vn as planStoredRewrites, vt as StoredValueRewrite, w as MigrationOperationClass, wn as readColumnDefault, wt as TableNameCaseGuardTable, x as JsonPath, xn as planVariantRowRewrites, xt as SuppressionRecord, y as INIT_ADDITIVE_POLICY, yn as planValueObjectFieldFills, yt as StoredValueSubject, z as PlannedStatements, zn as scalarTypeNamesOf, zt as checkDatabasePoliciesHeld } from "./control-Cb6YoQ8j.mjs";
5
- export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractColumn, type ContractColumns, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultResolver, type DefaultResolverColumn, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, type FillValueCheck, type FillValueTypes, INIT_ADDITIVE_POLICY, type JsonKeyPath, type JsonPath, type JsonPathStep, type MarkedRemoval, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, NO_RENAMED_ORIGINS, type NamespaceRename, type NamespaceStatementTarget, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatement, type PlannedStatements, type PlannedStoredRewrites, type ReadColumnDefault, type ReadReportedDefault, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type RowsHoldingValueMark, type SchemaTables, type SingleOperationCall, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementOperations, type StatementOwnership, type StatementPlanningTarget, type StorageTypePlanResult, type StoredEnumValue, type StoredKeyFill, type StoredKeyFillField, type StoredKeyRewrite, type StoredRewrite, type StoredRewriteCalls, type StoredValueCallClasses, type StoredValueCodec, type StoredValueReplacement, type StoredValueRewrite, type StoredValueSubject, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableMove, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, type TargetRefusal, UnfilledValue, type UnnamedFieldFill, type VariantRowRewrite, type WorkingSchemaOrigins, acceptedByDataType, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkDatabasePoliciesHeld, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, encodeStoredValue, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, fillKeyProblem, fillValueProblem, isUnfilledSlot, jsonPathText, keepRowsEdit, keyPathOf, modelRenameStorageEffect, otherSpaceDeclaring, parseJsonPath, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planEnumValueRewrites, planFieldEventCalls, planFieldEventOperations, planStatements, planStoredRewrites, planValueObjectFieldFills, planValueObjectFieldRewrites, planVariantRowRewrites, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, removalsOfMigration, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsHoldingValueFailure, rowsHoldingValueMeta, rowsHoldingValueOf, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, scalarTypeNamesOf, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, storedValueOperationIndexes, storedValueSubjects, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, unnamedFieldFillOf };
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";
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-CWcdf_jZ.mjs";
1
+ import { n as checkSqlDefaultText } from "./validators-CcR6gGf_.mjs";
2
2
  import { s as extractCodecControlHooks } from "./schema-verify-C3wbdviw-nQ4tG9N7.mjs";
3
- import { $ as requiredColumnOf, A as isUnfilledSlot, B as planFieldEventCalls, C as encodeStoredValue, Ct as unnamedFieldFillOf, D as fieldStatementColumns, E as fieldRenameStorageEffect, F as otherSpaceDeclaring, G as planValueObjectFieldRewrites, H as planStatements, I as parseJsonPath, J as plannerSuccess, K as planVariantRowRewrites, L as partitionCallsByControlPolicy, M as keepRowsEdit, N as keyPathOf, O as fillKeyProblem, P as modelRenameStorageEffect, Q as requiredColumnMeta, R as partitionIssuesByControlPolicy, S as detectTableNameCaseChanges, St as unmatchedTableRename, T as fieldOfColumn, U as planStoredRewrites, V as planFieldEventOperations, W as planValueObjectFieldFills, X as readReportedDefault, Y as readColumnDefault, Z as removalsOfMigration, _ as convertedColumnMeta, _t as storedValueSubjects, a as UnfilledValue, at as rowsHoldingValueOf, b as createSqlTextSources, bt as unknownCallNames, c as assembleAuthoringContributions, ct as runnerFailure, d as checkSqlExpressionText, dt as slotSource, et as requiredColumnsOfMigration, f as columnTakesTemporaryValue, ft as sqlDefaultFunctions, g as control_default, gt as storedValueOperationIndexes, h as contractToSchemaIR, ht as storageNameOfOperation, i as TABLE_NAME_CASE_CHANGED_CODE, it as rowsHoldingValueMeta, j as jsonPathText, k as fillValueProblem, l as backfillOfDefaultedField, lt as runnerSuccess, m as contractNamespaceToSchemaIR, mt as sqlTypeLookupsOf, n as INIT_ADDITIVE_POLICY, nt as resolveTableRenameAgainst, o as acceptedByDataType, ot as rowsWithoutValueFailure, p as contractColumns, pt as sqlOfSlot, q as plannerFailure, r as NO_RENAMED_ORIGINS, rt as rowsHoldingValueFailure, s as appliedStatementsInOrder, st as rowsWithoutValueSummary, t as COLUMN_RENAME_UNMATCHED_CODE, tt as resolveColumnRenameAgainst, u as checkDatabasePoliciesHeld, ut as scalarTypeNamesOf, v as convertedColumnOf, vt as subjectsOfCalls, w as fieldEventStorage, x as detectDestructiveChanges, xt as unmatchedColumnRename, y as createMigrationPlan, yt as unconvertedFieldOf, z as planEnumValueRewrites } from "./control-kHFMtE8A.mjs";
4
- export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, NO_RENAMED_ORIGINS, 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, 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 };
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-DUbuxp4j.mjs";
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-DbkXUf4C.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-DZHlisyY.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-D_K7uFJk.mjs";
1
+ import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-hb9EW6FW.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-DctFInNJ.mjs";
1
+ import { t as SqlMigration } from "./migration-BUWF9_Tx.mjs";
2
2
  export { SqlMigration as Migration };
@@ -1,2 +1,2 @@
1
- import { i as sqlTargetTypeConstructors, n as sqlFamilyPack, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-BBsFyTEv.mjs";
1
+ import { i as sqlTargetTypeConstructors, n as sqlFamilyPack, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-CbYm5Bfz.mjs";
2
2
  export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors };
@@ -1,6 +1,6 @@
1
1
  import { f as sqlExpressionRegistration } from "./sql-expression-CKgKznXS.mjs";
2
- import { b as sqlAttributeSpecs } from "./psl-field-resolution-GN4iup8d-DjlZymdL.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-Cetbgui3.mjs";
2
+ import { S as sqlAttributeSpecs } from "./psl-field-resolution-CpxUePg1-tvt3yqqs.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-Bg9PVsti.mjs";
4
4
  //#region ../../../2-sql-family/9-family/dist/pack.mjs
5
5
  const sqlFamilyPack = {
6
6
  kind: "family",
@@ -1,2 +1,2 @@
1
- import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-C9kVS9ma.mjs";
1
+ import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-Ckg3t4Kr.mjs";
2
2
  export { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, pluralize, toEnumName, toFieldName, toModelName };
@@ -7,6 +7,12 @@ import "./types-B-dwfOwQ.mjs";
7
7
  import { AuthoringWarningSink } from "@prisma/orm-framework/components/authoring";
8
8
  //#region ../../../2-sql-family/1-core/contract/dist/foreign-key-materialization.d.mts
9
9
  //#region src/index-equivalence.d.ts
10
+ /** The schema node the planner builds for an index the contract states, which is what it compares. */
11
+ declare function indexNodeOf(index: IndexInput): SqlIndexIR;
12
+ /** Whether the planner sees two indexes as the same index apart from their names. */
13
+ declare function identicalIndexes(a: SqlIndexIR, b: SqlIndexIR): boolean;
14
+ /** The index the contract build derives to back a foreign key on `columns`, as the planner sees it. */
15
+ declare function derivedBackingIndexNode(columns: readonly string[]): SqlIndexIR;
10
16
  type Keyed = {
11
17
  readonly columns: readonly string[];
12
18
  };
@@ -94,5 +100,5 @@ declare function defaultForeignKeyIndex(tableName: string, columns: readonly str
94
100
  readonly primaryKey: PrimaryKeyInput | undefined;
95
101
  }): ForeignKeyIndex | undefined;
96
102
  //#endregion
97
- export { declaredBackingObjectName as a, derivedBackingIndexIsRedundant as c, MaterializedTableConstraints as i, leadingBackingObjectName as l, ForeignKeyAuthoringInput as n, declaredIndexesServeForeignKey as o, IndexCandidate as r, defaultForeignKeyIndex as s, FOREIGN_KEY_INDEX_UNRESOLVED as t, materializeForeignKeysAndIndexes as u };
98
- //# sourceMappingURL=foreign-key-materialization-C53nVQuD.d.mts.map
103
+ export { declaredBackingObjectName as a, derivedBackingIndexIsRedundant as c, indexNodeOf as d, leadingBackingObjectName as f, MaterializedTableConstraints as i, derivedBackingIndexNode as l, ForeignKeyAuthoringInput as n, declaredIndexesServeForeignKey as o, materializeForeignKeysAndIndexes as p, IndexCandidate as r, defaultForeignKeyIndex as s, FOREIGN_KEY_INDEX_UNRESOLVED as t, identicalIndexes as u };
104
+ //# sourceMappingURL=foreign-key-materialization-Dntzsl64.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foreign-key-materialization-Dntzsl64.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/foreign-key-materialization.d.mts"],"mappings":";;;;;;;;;;iBAQiB,YAAY,OAAO,aAAa;;iBAEhC,iBAAiB,GAAG,YAAY,GAAG;;iBAEnC,wBAAwB,6BAA6B;KACjE;WACM;;UAED,WAAW,QAAQ,gBAAgB,OAAO,oBAAoB;WAC7D,kBAAkB;WAClB,SAAS,OAAO,WAAW;WAC3B,kBAAkB;WAClB,YAAY;;;;;iBAKN,+BAA+B,QAAQ,gBAAgB,OAAO,oBAAoB,OAAO,4BAA4B,OAAO,WAAW,QAAQ,SAAS;KACpK,WAAW;WACL;;;;;iBAKM,yBAAyB,QAAQ,gBAAgB,UAAU,oBAAoB,UAAU,4BAA4B,OAAO,WAAW,QAAQ,SAAS;WAC9J,SAAS,OAAO;;;;;UAKjB;WACC,OAAO;;WAEP;;;;;cAKG;;;;UAIJ;WACC,QAAQ;WACR,QAAQ;WACR;WACA,WAAW;WACX,WAAW;WACX;WACA;;UAED;WACC,sBAAsB;WACtB,kBAAkB;;;;;iBAKZ,iCAAiC;WACvC;WACA,sBAAsB;WACtB,0BAA0B;WAC1B,kBAAkB;WAClB,YAAY;WACZ,UAAU;WACV,YAAY,KAAK;IACxB;;;;iBAIa,+BAA+B,4BAA4B;WACjE,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;;;;;iBAKN,0BAA0B,4BAA4B;WAC5D,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;;;;;iBAKN,uBAAuB,mBAAmB,4BAA4B;WAC5E,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;IACnB"}
@@ -2,7 +2,7 @@ import { t as contractError } from "./contract-errors-BCN6RVI5-DoH6b_KZ.mjs";
2
2
  import { a as rendersIndexBody, t as accessMethodOf } from "./index-types-pC_5vADQ-BOOBi14R.mjs";
3
3
  import { _ as truncateToWireNamePrefixBytes, s as defaultIndexName, u as nameOf } from "./naming-DEpT6Zad-C9PFkWt6.mjs";
4
4
  import { r as lowerAuthoredIndex } from "./index-naming-BOcJT1B3-D-49owHA.mjs";
5
- import { i as leadingBackingObjectName, n as identicalIndexes, o as servingKey, r as indexNodeOf, s as startsWithColumns, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-9GNm8oG9.mjs";
5
+ import { a as leadingBackingObjectName, c as startsWithColumns, i as indexNodeOf, r as identicalIndexes, s as servingKey, t as derivedBackingIndexIsRedundant } from "./index-equivalence-eC2jGpOp-SkExsiy1.mjs";
6
6
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
7
7
  import { asNamespaceId } from "@prisma/orm-framework/contract/types";
8
8
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -284,4 +284,4 @@ function foreignKeyIndexOf(backing) {
284
284
  //#endregion
285
285
  export { materializeForeignKeysAndIndexes as a, defaultForeignKeyIndex as i, declaredBackingObjectName as n, declaredIndexesServeForeignKey as r, FOREIGN_KEY_INDEX_UNRESOLVED as t };
286
286
 
287
- //# sourceMappingURL=foreign-key-materialization-CCHAR789.mjs.map
287
+ //# sourceMappingURL=foreign-key-materialization-pYirysH0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foreign-key-materialization-pYirysH0.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/foreign-key-materialization.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { a as rendersIndexBody, t as accessMethodOf } from \"./index-types-pC_5vADQ.mjs\";\nimport { r as lowerAuthoredIndex } from \"./index-naming-BOcJT1B3.mjs\";\nimport { a as leadingBackingObjectName, c as startsWithColumns, i as indexNodeOf, n as derivedBackingIndexNode, r as identicalIndexes, s as servingKey, t as derivedBackingIndexIsRedundant } from \"./index-equivalence-eC2jGpOp.mjs\";\nimport { defaultIndexName, nameOf, truncateToWireNamePrefixBytes } from \"@internal/sql-schema-ir/naming\";\nimport { asNamespaceId } from \"@internal/contract/types\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/index-deduplication.ts\nconst IDENTICAL_DESCRIPTION = \"the planner sees them as the same index. The contract keeps both because each is named.\";\nconst REDUNDANT_DESCRIPTION = \"which already serves the same lookups.\";\n/**\n* Removes the indexes of one table that duplicate another. Two indexes are identical when the planner sees them as the same index apart from their names (see {@link identicalIndexes}); of an identical group the pass keeps the indexes named by the user, or the first one when none is. A plain non-unique index whose columns are those of the primary key, a unique constraint or a unique index without a predicate is redundant (see {@link servingKey}), and the pass removes it unless it is named by the user. Every index named by the user survives; the pass warns about each one that duplicates another, and refuses two identical indexes both named with `name:`, whose wire names the planner could not tell apart.\n*/\nfunction deduplicateIndexes(input) {\n\tconst { tableName, warnings } = input;\n\tconst replacements = /* @__PURE__ */ new Map();\n\tconst nodes = new Map(input.indexes.map((candidate) => [candidate, indexNodeOf(candidate.index)]));\n\tconst nodeOf = (candidate) => {\n\t\tconst node = nodes.get(candidate);\n\t\tif (node === void 0) throw new InternalError(\"every candidate has a node\");\n\t\treturn node;\n\t};\n\tconst groups = [];\n\tfor (const candidate of input.indexes) {\n\t\tconst position = groups.findIndex(([first]) => identicalIndexes(nodeOf(first), nodeOf(candidate)));\n\t\tconst group = groups[position];\n\t\tif (group === void 0) groups.push([candidate]);\n\t\telse groups[position] = [...group, candidate];\n\t}\n\tfor (const group of groups) {\n\t\tconst named = group.filter((candidate) => candidate.namedByUser);\n\t\tconst wireNamed = named.filter((candidate) => candidate.index.naming.kind === \"wire\");\n\t\tif (wireNamed.length > 1) throw identicalWireNamedIndexesError(tableName, wireNamed);\n\t\tconst kept = named[0] ?? group[0];\n\t\tfor (const candidate of group) if (candidate !== kept && !candidate.namedByUser) replacements.set(candidate, {\n\t\t\tkind: \"index\",\n\t\t\tindex: kept\n\t\t});\n\t\tif (named.length > 1) warnings.push(identicalIndexesWarning(tableName, named));\n\t}\n\tconst survivors = input.indexes.filter((candidate) => !replacements.has(candidate));\n\tfor (const candidate of survivors) {\n\t\tconst servedBy = servingKey(nodeOf(candidate), {\n\t\t\tindexes: survivors,\n\t\t\tnodeOf,\n\t\t\tuniques: input.uniques,\n\t\t\tprimaryKey: input.primaryKey\n\t\t});\n\t\tif (servedBy === void 0) continue;\n\t\tif (candidate.namedByUser) warnings.push(redundantIndexWarning(tableName, candidate, servedBy));\n\t\telse replacements.set(candidate, servedBy);\n\t}\n\treturn {\n\t\tindexes: input.indexes.filter((candidate) => !replacements.has(candidate)),\n\t\treplacements\n\t};\n}\nfunction identicalWireNamedIndexesError(tableName, wireNamed) {\n\treturn contractError(\"CONTRACT.ARGUMENT_INVALID\", `Indexes ${quotedList(wireNamed.map((candidate) => writtenName(candidate.index)))} on table \"${tableName}\" are identical and both named with name:; the planner pairs wire-named indexes by their content, so it could not tell them apart.`, {\n\t\tfix: \"Remove one of them, or name one with map: to keep both under exact names.\",\n\t\tmeta: {\n\t\t\ttableName,\n\t\t\tindexes: wireNamed.map((candidate) => writtenName(candidate.index))\n\t\t}\n\t});\n}\n/** The name the source wrote: the prefix of a wire-named index, the whole name of an exact one. */\nfunction writtenName(index) {\n\treturn index.naming.kind === \"wire\" ? index.naming.prefix : index.naming.name;\n}\nfunction quotedList(names) {\n\tconst quoted = names.map((name) => `\"${name}\"`);\n\treturn quoted.length <= 2 ? quoted.join(\" and \") : `${quoted.slice(0, -1).join(\", \")} and ${quoted.at(-1)}`;\n}\nfunction identicalIndexesWarning(tableName, named) {\n\tconst names = quotedList(named.map((candidate) => writtenName(candidate.index)));\n\treturn {\n\t\tcode: \"PN_INDEX_DUPLICATE\",\n\t\tmessage: `Indexes ${names} on table \"${tableName}\" are identical: ${IDENTICAL_DESCRIPTION} Remove one of them.`,\n\t\titem: `table \"${tableName}\": indexes ${names}`,\n\t\tsummary: `tables have named indexes that are identical: ${IDENTICAL_DESCRIPTION} Remove one of each.`\n\t};\n}\nfunction describeReplacement(replacement) {\n\tswitch (replacement.kind) {\n\t\tcase \"primaryKey\": return \"the primary key\";\n\t\tcase \"uniqueConstraint\": return replacement.unique.name === void 0 ? `the unique constraint on (${replacement.unique.columns.join(\", \")})` : `the unique constraint \"${replacement.unique.name}\"`;\n\t\tcase \"index\": return `the unique index \"${writtenName(replacement.index.index)}\"`;\n\t}\n}\nfunction redundantIndexWarning(tableName, candidate, servedBy) {\n\tconst name = writtenName(candidate.index);\n\treturn {\n\t\tcode: \"PN_INDEX_REDUNDANT\",\n\t\tmessage: `Index \"${name}\" on table \"${tableName}\" has the same columns as ${describeReplacement(servedBy)}, ${REDUNDANT_DESCRIPTION} The contract keeps the index because it is named. Remove it.`,\n\t\titem: `table \"${tableName}\": index \"${name}\"`,\n\t\tsummary: `tables have a named index with the same columns as a unique constraint, unique index or primary key, ${REDUNDANT_DESCRIPTION} The contract keeps each index because it is named. Remove them.`\n\t};\n}\n//#endregion\n//#region src/foreign-key-materialization.ts\n/** The `meta.reason` of the refusal of a relation's `index: \"<name>\"`, which a source can report at the relation. */\nconst FOREIGN_KEY_INDEX_UNRESOLVED = \"foreign-key-index-unresolved\";\n/**\n* Lowers a table's authored foreign keys and indexes into the entities `contract.json` persists. A `constraint: false` foreign key contributes no `foreignKeys[]` entry. A foreign key with `index: true` gets a derived backing index; one with `index: \"<name>\"` uses what the table declares under that name. The table's indexes then pass through {@link deduplicateIndexes}, and each foreign key states what backs it in the result: an index by name, or the primary key or a unique constraint by kind.\n*/\nfunction materializeForeignKeysAndIndexes(input) {\n\tconst { tableName, declaredIndexes, uniques, primaryKey, indexTypes } = input;\n\tconst derivedIndexes = [];\n\tconst intents = input.foreignKeys.map((foreignKey) => {\n\t\tconst { constraint, index, ...reference } = foreignKey;\n\t\tif (index !== true) return {\n\t\t\tconstraint,\n\t\t\treference,\n\t\t\tindex\n\t\t};\n\t\tconst derived = derivedBackingIndex(tableName, reference.source.columns);\n\t\tderivedIndexes.push(derived);\n\t\treturn {\n\t\t\tconstraint,\n\t\t\treference,\n\t\t\tindex: derived\n\t\t};\n\t});\n\tconst deduplicated = deduplicateIndexes({\n\t\ttableName,\n\t\tindexes: [...declaredIndexes, ...derivedIndexes],\n\t\tuniques,\n\t\tprimaryKey,\n\t\twarnings: input.warnings\n\t});\n\tconst resolve = (backing) => foreignKeyIndexOf(resolveReplacement(backing, deduplicated.replacements));\n\treturn {\n\t\tforeignKeys: intents.flatMap(({ constraint, reference, index }) => {\n\t\t\tconst backing = index === false ? void 0 : typeof index === \"string\" ? namedBackingObject(reference.source, index, {\n\t\t\t\tdeclaredIndexes,\n\t\t\t\tuniques,\n\t\t\t\tprimaryKey,\n\t\t\t\tindexTypes,\n\t\t\t\tresolve\n\t\t\t}) : resolve({\n\t\t\t\tkind: \"index\",\n\t\t\t\tindex\n\t\t\t});\n\t\t\tif (!constraint) return [];\n\t\t\treturn [backing === void 0 ? reference : {\n\t\t\t\t...reference,\n\t\t\t\tindex: backing\n\t\t\t}];\n\t\t}),\n\t\tindexes: deduplicated.indexes.map((candidate) => candidate.index)\n\t};\n}\n/**\n* Whether a table's declared indexes, unique constraints or primary key already serve a foreign key on `columns`, so the build would drop a derived backing index again. A source that writes no backing index of its own, such as a Prisma 7 schema, leaves the foreign key's `index` to the build where this holds, so the stored foreign key states what backs it.\n*/\nfunction declaredIndexesServeForeignKey(columns, table) {\n\treturn derivedBackingIndexIsRedundant(columns, {\n\t\tindexes: table.indexes,\n\t\tnodeOf: indexNodeOf,\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey\n\t});\n}\n/**\n* The name to give a relation's `index` argument when the table's declared indexes and keys serve a foreign key on `columns` although the build would keep a derived backing index beside them (see {@link leadingBackingObjectName}).\n*/\nfunction declaredBackingObjectName(columns, table) {\n\treturn leadingBackingObjectName(columns, {\n\t\tindexes: table.indexes,\n\t\tnodeOf: indexNodeOf,\n\t\tnameOf: (index) => nameOf(index.naming),\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey\n\t});\n}\n/**\n* What a foreign key on `columns` states it is backed by when its relation says nothing, beside a table whose indexes all carry the `name` or `map` the source gave them, as a printed contract's do. A printer writes a relation's `index` argument only where the stored foreign key differs from this.\n*/\nfunction defaultForeignKeyIndex(tableName, columns, table) {\n\tconst reference = {\n\t\tnamespaceId: asNamespaceId(UNBOUND_NAMESPACE_ID),\n\t\ttableName,\n\t\tcolumns\n\t};\n\tconst [foreignKey] = materializeForeignKeysAndIndexes({\n\t\ttableName,\n\t\tforeignKeys: [{\n\t\t\tsource: reference,\n\t\t\ttarget: reference,\n\t\t\tconstraint: true,\n\t\t\tindex: true\n\t\t}],\n\t\tdeclaredIndexes: table.indexes.map((index) => ({\n\t\t\tindex,\n\t\t\tnamedByUser: true\n\t\t})),\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey,\n\t\twarnings: [],\n\t\tindexTypes: void 0\n\t}).foreignKeys;\n\treturn typeof foreignKey?.index === \"object\" ? foreignKey.index : void 0;\n}\nfunction derivedBackingIndex(tableName, columns) {\n\treturn {\n\t\tindex: lowerAuthoredIndex(tableName, {\n\t\t\tcolumns,\n\t\t\twhere: void 0,\n\t\t\tunique: void 0,\n\t\t\tmap: void 0,\n\t\t\tname: truncateToWireNamePrefixBytes(defaultIndexName(tableName, columns)),\n\t\t\ttype: void 0,\n\t\t\toptions: void 0\n\t\t}),\n\t\tnamedByUser: false\n\t};\n}\n/**\n* What a relation's `index: \"<name>\"` points at. The name is the `name` or `map` the source gave an index, unique constraint or primary key, or an index's stored name; an unnamed index's default name does not count. Identical indexes count as one, so the name is resolved after they merge. The object must start with the foreign key's columns, in order, or it would not serve the foreign key's lookups. An index of a type whose body is rendered from its options (see {@link rendersIndexBody}) is refused too: its columns are not its key.\n*/\nfunction namedBackingObject(source, name, table) {\n\tconst { namespaceId, tableName, columns } = source;\n\tconst subject = `The foreign key on table \"${tableName}\" columns (${columns.join(\", \")}) names \"${name}\" as its index`;\n\tconst meta = {\n\t\treason: FOREIGN_KEY_INDEX_UNRESOLVED,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tcolumns,\n\t\tindex: name\n\t};\n\tconst indexes = table.declaredIndexes.filter((candidate) => candidate.namedByUser && writtenName(candidate.index) === name || nameOf(candidate.index.naming) === name);\n\tconst keys = [...table.uniques.filter((unique) => unique.name === name), ...table.primaryKey?.name === name ? [table.primaryKey] : []];\n\tconst resolvedIndexes = [...new Map(indexes.map((index) => {\n\t\tconst resolved = table.resolve({\n\t\t\tkind: \"index\",\n\t\t\tindex\n\t\t});\n\t\treturn [JSON.stringify(resolved), {\n\t\t\tindex,\n\t\t\tresolved\n\t\t}];\n\t})).values()];\n\tconst matches = resolvedIndexes.length + keys.length;\n\tif (matches === 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but table \"${tableName}\" has no index, unique constraint or primary key with that name.`, {\n\t\tfix: `Declare an index, unique constraint or primary key named \"${name}\" on table \"${tableName}\", or drop the index argument so the foreign key gets its own backing index.`,\n\t\tmeta\n\t});\n\tif (matches > 1) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but table \"${tableName}\" has more than one index, unique constraint or primary key with that name.`, {\n\t\tfix: `Give the object the foreign key should use a name no other index, unique constraint or primary key of table \"${tableName}\" has, and name that on the relation.`,\n\t\tmeta\n\t});\n\tconst [match] = resolvedIndexes;\n\tconst key = keys[0];\n\tconst matchType = match?.index.index.type;\n\tconst typeEntry = matchType === void 0 ? void 0 : table.indexTypes?.get(matchType);\n\tif (typeEntry !== void 0 && rendersIndexBody(typeEntry)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but it is a \"${typeEntry.type}\" index, a \"${accessMethodOf(typeEntry)}\" index whose key is rendered from its options rather than its columns, so it does not serve the foreign key's lookups.`, {\n\t\tfix: `Name an index, unique constraint or primary key whose first columns are (${columns.join(\", \")}), or drop the index argument so the foreign key gets its own backing index beside the \"${typeEntry.type}\" index.`,\n\t\tmeta\n\t});\n\tconst objectColumns = match !== void 0 ? match.index.index.columns : key?.columns;\n\tif (objectColumns === void 0 || !startsWithColumns(objectColumns, columns)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but ${objectColumns === void 0 ? \"it indexes an expression, not the foreign key's columns\" : `its columns (${objectColumns.join(\", \")}) do not start with the foreign key's columns`}, so it does not serve the foreign key's lookups.`, {\n\t\tfix: `Name an index, unique constraint or primary key whose first columns are (${columns.join(\", \")}), or drop the index argument so the foreign key gets its own backing index.`,\n\t\tmeta\n\t});\n\tif (match !== void 0) return match.resolved;\n\treturn key === table.primaryKey ? { primaryKey: true } : { unique: objectColumns };\n}\nfunction resolveReplacement(backing, replacements) {\n\tlet current = backing;\n\twhile (current.kind === \"index\") {\n\t\tconst replacement = replacements.get(current.index);\n\t\tif (replacement === void 0) break;\n\t\tcurrent = replacement;\n\t}\n\treturn current;\n}\nfunction foreignKeyIndexOf(backing) {\n\tswitch (backing.kind) {\n\t\tcase \"index\": return { name: nameOf(backing.index.index.naming) };\n\t\tcase \"uniqueConstraint\": return { unique: backing.unique.columns };\n\t\tcase \"primaryKey\": return { primaryKey: true };\n\t}\n}\n//#endregion\nexport { FOREIGN_KEY_INDEX_UNRESOLVED, declaredBackingObjectName, declaredIndexesServeForeignKey, defaultForeignKeyIndex, derivedBackingIndexIsRedundant, derivedBackingIndexNode, identicalIndexes, indexNodeOf, leadingBackingObjectName, materializeForeignKeysAndIndexes };\n\n//# sourceMappingURL=foreign-key-materialization.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;;;;AAI9B,SAAS,mBAAmB,OAAO;CAClC,MAAM,EAAE,WAAW,aAAa;CAChC,MAAM,+BAA+B,IAAI,IAAI;CAC7C,MAAM,QAAQ,IAAI,IAAI,MAAM,QAAQ,KAAK,cAAc,CAAC,WAAW,YAAY,UAAU,KAAK,CAAC,CAAC,CAAC;CACjG,MAAM,UAAU,cAAc;EAC7B,MAAM,OAAO,MAAM,IAAI,SAAS;EAChC,IAAI,SAAS,KAAK,GAAG,MAAM,IAAI,cAAc,4BAA4B;EACzE,OAAO;CACR;CACA,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,aAAa,MAAM,SAAS;EACtC,MAAM,WAAW,OAAO,WAAW,CAAC,WAAW,iBAAiB,OAAO,KAAK,GAAG,OAAO,SAAS,CAAC,CAAC;EACjG,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,KA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cAAc;CAClD,IAAI,UAAU;CACd,OAAO,QAAQ,SAAS,SAAS;EAChC,MAAM,cAAc,aAAa,IAAI,QAAQ,KAAK;EAClD,IAAI,gBAAgB,KAAK,GAAG;EAC5B,UAAU;CACX;CACA,OAAO;AACR;AACA,SAAS,kBAAkB,SAAS;CACnC,QAAQ,QAAQ,MAAhB;EACC,KAAK,SAAS,OAAO,EAAE,MAAM,OAAO,QAAQ,MAAM,MAAM,MAAM,EAAE;EAChE,KAAK,oBAAoB,OAAO,EAAE,QAAQ,QAAQ,OAAO,QAAQ;EACjE,KAAK,cAAc,OAAO,EAAE,YAAY,KAAK;CAC9C;AACD"}
@@ -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-wn1bXh0b-CJPAJi22.mjs";
2
- import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-DHdjzqE3-Cd9gP7oC.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-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";
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-Cl_egJ2w.mjs.map
88
+ //# sourceMappingURL=functions-DGketpiK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions-Cl_egJ2w.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-wn1bXh0b.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-DHdjzqE3.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/functions.ts\nconst BOOL_FIELD = {\n\tcodecId: \"pg/bool@1\",\n\tnullable: false\n};\n/**\n* Resolve a binary-comparison operand into an AST expression, threading the column-bound side's {@link CodecRef} to the raw-value side.\n*\n* For `fns.eq(f.email, 'alice@example.com')`, `f.email` is the column-bound expression carrying a `ColumnRef` AST and a `CodecRef` derived from contract storage; the raw string operand has no codec context. By deriving the codec context from the column-bound side and forwarding it via `toExpr(value, codec)`, the resulting `ParamRef` carries the `CodecRef` that encode-side dispatch needs to materialise the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction resolveOperand(operand, otherCodec) {\n\tif (isExpression(operand)) return operand.buildAst();\n\treturn toExpr(operand, otherCodec);\n}\n/**\n* Resolves an Expression via `buildAst()`, or wraps a raw value as a `LiteralExpr` — an SQL literal inlined into the query text, not a bound parameter.\n*\n* Used for `and` / `or` operands. The usual operand is an `Expression<bool>` (e.g. the result of `fns.eq`), which this function passes through by calling `buildAst()`. The only time the raw-value branch fires is when the caller writes `fns.and(true, x)` or similar — inlining `TRUE`/`FALSE` literals lets the SQL planner statically simplify `TRUE AND x` to `x`, which it cannot do for an opaque `ParamRef`.\n*/\nfunction toLiteralExpr(value) {\n\tif (isExpression(value)) return value.buildAst();\n\treturn new LiteralExpr(value);\n}\nfunction boolExpr(astNode) {\n\treturn new ExpressionImpl(astNode, BOOL_FIELD);\n}\nfunction binaryWithSharedCodec(a, b, build) {\n\tconst aCodec = codecOf(a);\n\treturn build(resolveOperand(a, codecOf(b)), resolveOperand(b, aCodec));\n}\nfunction eq(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"eq\", l, r)));\n}\nfunction ne(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"neq\", l, r)));\n}\nfunction comparison(a, b, op) {\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(op, l, r)));\n}\nfunction inOrNotIn(expr, valuesOrSubquery, op) {\n\tconst left = expr.buildAst();\n\tconst leftCodec = codecOf(expr);\n\tconst binaryFn = op === \"in\" ? BinaryExpr.in : BinaryExpr.notIn;\n\tif (Array.isArray(valuesOrSubquery)) {\n\t\tconst refs = valuesOrSubquery.map((v) => resolveOperand(v, leftCodec));\n\t\treturn boolExpr(binaryFn(left, ListExpression.of(refs)));\n\t}\n\treturn boolExpr(binaryFn(left, SubqueryExpr.of(valuesOrSubquery.buildAst())));\n}\nfunction createBuiltinFunctions(rawCodecInferer) {\n\treturn {\n\t\teq: (a, b) => eq(a, b),\n\t\tne: (a, b) => ne(a, b),\n\t\tgt: (a, b) => comparison(a, b, \"gt\"),\n\t\tgte: (a, b) => comparison(a, b, \"gte\"),\n\t\tlt: (a, b) => comparison(a, b, \"lt\"),\n\t\tlte: (a, b) => comparison(a, b, \"lte\"),\n\t\tand: (...exprs) => boolExpr(AndExpr.of(exprs.map(toLiteralExpr))),\n\t\tor: (...exprs) => boolExpr(OrExpr.of(exprs.map(toLiteralExpr))),\n\t\texists: (subquery) => boolExpr(ExistsExpr.exists(subquery.buildAst())),\n\t\tnotExists: (subquery) => boolExpr(ExistsExpr.notExists(subquery.buildAst())),\n\t\tin: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"in\"),\n\t\tnotIn: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"notIn\"),\n\t\traw: createRawSql(rawCodecInferer)\n\t};\n}\n/**\n* The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.\n*/\nfunction createFunctions(operations, rawCodecInferer) {\n\tconst builtins = createBuiltinFunctions(rawCodecInferer);\n\treturn new Proxy(blindCast({}), { get(_target, prop) {\n\t\tif (Object.hasOwn(builtins, prop)) return blindCast(builtins)[prop];\n\t\tconst op = operations[prop];\n\t\tif (op) return op.impl;\n\t} });\n}\n//#endregion\nexport { createFunctions };\n\n//# sourceMappingURL=functions.mjs.map"],"mappings":";;;;AAIA,MAAM,aAAa;CAClB,SAAS;CACT,UAAU;AACX;;;;;;AAMA,SAAS,eAAe,SAAS,YAAY;CAC5C,IAAI,aAAa,OAAO,GAAG,OAAO,QAAQ,SAAS;CACnD,OAAO,OAAO,SAAS,UAAU;AAClC;;;;;;AAMA,SAAS,cAAc,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,OAAO,IAAI,YAAY,KAAK;AAC7B;AACA,SAAS,SAAS,SAAS;CAC1B,OAAO,IAAI,eAAe,SAAS,UAAU;AAC9C;AACA,SAAS,sBAAsB,GAAG,GAAG,OAAO;CAC3C,MAAM,SAAS,QAAQ,CAAC;CACxB,OAAO,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,GAAG,eAAe,GAAG,MAAM,CAAC;AACtE;AACA,SAAS,GAAG,GAAG,GAAG;CACjB,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,OAAO,SAAS,sBAAsB,GAAG,IAAI,GAAG,MAAM,IAAI,WAAW,MAAM,GAAG,CAAC,CAAC,CAAC;AAClF;AACA,SA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AAM,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-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,SA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B,EAAE,CAAC;AACJ"}
@@ -0,0 +1 @@
1
+ import "./expression-DYRYmkMl-BMKxN8Wf.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-Dbo5LeXs.mjs";
3
- import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-BO3Wgbrl.mjs";
2
+ import { l as enumType } from "./contract-builder-BqswyknO.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";
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-Cetbgui3.mjs.map
410
+ //# sourceMappingURL=generator-functions-Bze9nVHL-Bg9PVsti.mjs.map