@prisma/orm-family-sql 8.0.0-rc.17-dev.2 → 8.0.0-rc.17-dev.4

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 (269) hide show
  1. package/dist/{ast-DUU5OVjo.mjs → ast-De8XGuVW.mjs} +2 -2
  2. package/dist/{ast-DUU5OVjo.mjs.map → ast-De8XGuVW.mjs.map} +1 -1
  3. package/dist/{ast-Bmb-2vbO.d.mts → ast-Dp6lQXUX.d.mts} +3 -3
  4. package/dist/{ast-Bmb-2vbO.d.mts.map → ast-Dp6lQXUX.d.mts.map} +1 -1
  5. package/dist/{authored-check-naming-C8_TvzU6.d.mts → authored-check-naming-CK6T_Dfh.d.mts} +2 -2
  6. package/dist/{authored-check-naming-C8_TvzU6.d.mts.map → authored-check-naming-CK6T_Dfh.d.mts.map} +1 -1
  7. package/dist/{authored-check-naming-BBdhHujS.mjs → authored-check-naming-CO3GA46Y.mjs} +3 -3
  8. package/dist/{authored-check-naming-BBdhHujS.mjs.map → authored-check-naming-CO3GA46Y.mjs.map} +1 -1
  9. package/dist/{authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts → authoring-entity-types-CZ-vdwYS-BQPeBSla.d.mts} +2 -2
  10. package/dist/{authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts.map → authoring-entity-types-CZ-vdwYS-BQPeBSla.d.mts.map} +1 -1
  11. package/dist/{authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs → authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs} +2 -2
  12. package/dist/{authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs.map → authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs.map} +1 -1
  13. package/dist/builder.d.mts +2 -2
  14. package/dist/builder__runtime.d.mts +9 -9
  15. package/dist/builder__runtime.mjs +129 -2
  16. package/dist/builder__runtime.mjs.map +1 -1
  17. package/dist/builder__types.d.mts +3 -3
  18. package/dist/{check-constraint-B7qGu6rc-agxAjKLG.d.mts → check-constraint-B7qGu6rc-CBVYAMwG.d.mts} +2 -2
  19. package/dist/{check-constraint-B7qGu6rc-agxAjKLG.d.mts.map → check-constraint-B7qGu6rc-CBVYAMwG.d.mts.map} +1 -1
  20. package/dist/{codec-descriptor-registry-CdIIOkuE.mjs → codec-descriptor-registry-CYK0Wzja.mjs} +2 -2
  21. package/dist/{codec-descriptor-registry-CdIIOkuE.mjs.map → codec-descriptor-registry-CYK0Wzja.mjs.map} +1 -1
  22. package/dist/{config-types-DB6gRJ5K.d.mts → config-types-Ci51fcnp.d.mts} +4 -4
  23. package/dist/{config-types-DB6gRJ5K.d.mts.map → config-types-Ci51fcnp.d.mts.map} +1 -1
  24. package/dist/{config-types-D0sxpKAN.mjs → config-types-DsRO_uxd.mjs} +3 -3
  25. package/dist/{config-types-D0sxpKAN.mjs.map → config-types-DsRO_uxd.mjs.map} +1 -1
  26. package/dist/{contract-builder-tEax3I2q.mjs → contract-builder-DEtvdts6.mjs} +15 -9
  27. package/dist/contract-builder-DEtvdts6.mjs.map +1 -0
  28. package/dist/{contract-builder-V5pFHDv3.d.mts → contract-builder-DWQhH8FQ.d.mts} +21 -13
  29. package/dist/contract-builder-DWQhH8FQ.d.mts.map +1 -0
  30. package/dist/contract-emitter.mjs +1 -1
  31. package/dist/contract-prisma7__provider.d.mts +2 -2
  32. package/dist/contract-prisma7__provider.mjs +8 -8
  33. package/dist/contract-psl.d.mts +3 -3
  34. package/dist/contract-psl.mjs +1 -1
  35. package/dist/contract-psl__attribute-specs.d.mts +2 -2
  36. package/dist/contract-psl__attribute-specs.mjs +1 -1
  37. package/dist/contract-psl__provider.d.mts +2 -2
  38. package/dist/contract-psl__provider.mjs +3 -3
  39. package/dist/contract-ts.d.mts +5 -5
  40. package/dist/contract-ts.mjs +3 -3
  41. package/dist/contract-ts__config-types.d.mts +1 -1
  42. package/dist/contract-ts__config-types.mjs +1 -1
  43. package/dist/contract-ts__contract-builder.d.mts +4 -4
  44. package/dist/contract-ts__contract-builder.mjs +2 -2
  45. package/dist/{contract-view-C1xX3yIj.d.mts → contract-view-CijuTaer.d.mts} +2 -2
  46. package/dist/{contract-view-C1xX3yIj.d.mts.map → contract-view-CijuTaer.d.mts.map} +1 -1
  47. package/dist/contract.d.mts +19 -19
  48. package/dist/contract.mjs +14 -14
  49. package/dist/contract__authored-check-naming.d.mts +1 -1
  50. package/dist/contract__authored-check-naming.mjs +1 -1
  51. package/dist/contract__contract-view.d.mts +1 -1
  52. package/dist/contract__data-type.mjs +1 -1
  53. package/dist/contract__entity-kinds.d.mts +1 -1
  54. package/dist/contract__entity-kinds.mjs +1 -1
  55. package/dist/contract__factories.d.mts +1 -1
  56. package/dist/contract__factories.mjs +1 -1
  57. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  58. package/dist/contract__foreign-key-materialization.mjs +2 -2
  59. package/dist/contract__index-naming.d.mts +1 -1
  60. package/dist/contract__index-naming.mjs +1 -1
  61. package/dist/contract__index-type-validation.d.mts +2 -2
  62. package/dist/contract__index-type-validation.mjs +1 -1
  63. package/dist/contract__index-types.d.mts +3 -3
  64. package/dist/contract__index-types.mjs +2 -2
  65. package/dist/contract__resolve-storage-table.d.mts +1 -1
  66. package/dist/contract__types.d.mts +7 -7
  67. package/dist/contract__types.mjs +3 -3
  68. package/dist/contract__validators.d.mts +1 -1
  69. package/dist/contract__validators.mjs +2 -2
  70. package/dist/{control-C5Yy0n3w.mjs → control-4kwMnHYO.mjs} +13 -13
  71. package/dist/{control-C5Yy0n3w.mjs.map → control-4kwMnHYO.mjs.map} +1 -1
  72. package/dist/{control-B3Mb21Md.d.mts → control-BK2oKZmT.d.mts} +16 -16
  73. package/dist/{control-B3Mb21Md.d.mts.map → control-BK2oKZmT.d.mts.map} +1 -1
  74. package/dist/{control-adapter-CkFfBVei-BLYeKcLW.d.mts → control-adapter-CkFfBVei-DH5DAObc.d.mts} +8 -8
  75. package/dist/{control-adapter-CkFfBVei-BLYeKcLW.d.mts.map → control-adapter-CkFfBVei-DH5DAObc.d.mts.map} +1 -1
  76. package/dist/control-adapter-DB7MPI5L.d.mts +1 -0
  77. package/dist/{data-type-CAPmGXg9.mjs → data-type-C_PI_Jsa.mjs} +2 -2
  78. package/dist/{data-type-CAPmGXg9.mjs.map → data-type-C_PI_Jsa.mjs.map} +1 -1
  79. package/dist/{db-D7R5zKiH-P7Tg4ZXk.d.mts → db-DB1FVK1P-DbwoL7vg.d.mts} +48 -11
  80. package/dist/db-DB1FVK1P-DbwoL7vg.d.mts.map +1 -0
  81. package/dist/{ddl-types-DtKZjNtN-CByECwns.d.mts → ddl-types-DtKZjNtN-CwtcEWLd.d.mts} +3 -3
  82. package/dist/{ddl-types-DtKZjNtN-CByECwns.d.mts.map → ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map} +1 -1
  83. package/dist/{derived-checks-D5zdlyyh-CPofdm1W.mjs → derived-checks-CfXjGvNH-CrXoMrPU.mjs} +22 -32
  84. package/dist/derived-checks-CfXjGvNH-CrXoMrPU.mjs.map +1 -0
  85. package/dist/{derived-checks-DpPkO6Dt-D3M7YEr2.d.mts → derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts} +3 -3
  86. package/dist/{derived-checks-DpPkO6Dt-D3M7YEr2.d.mts.map → derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts.map} +1 -1
  87. package/dist/{diff-CBqsNkxe.d.mts → diff-l4-qJpTV.d.mts} +8 -8
  88. package/dist/{diff-CBqsNkxe.d.mts.map → diff-l4-qJpTV.d.mts.map} +1 -1
  89. package/dist/{dist-Dm_hQ-hh.mjs → dist-D8EkCena.mjs} +2 -2
  90. package/dist/{dist-Dm_hQ-hh.mjs.map → dist-D8EkCena.mjs.map} +1 -1
  91. package/dist/{entity-kinds-O3V1K26U-B8TUrsX2.mjs → entity-kinds-DDTkNIr9-DJ2EIO94.mjs} +5 -5
  92. package/dist/{entity-kinds-O3V1K26U-B8TUrsX2.mjs.map → entity-kinds-DDTkNIr9-DJ2EIO94.mjs.map} +1 -1
  93. package/dist/{entity-kinds--HvqT50S.d.mts → entity-kinds-DqUYen0Y.d.mts} +5 -5
  94. package/dist/{entity-kinds--HvqT50S.d.mts.map → entity-kinds-DqUYen0Y.d.mts.map} +1 -1
  95. package/dist/{expression-DE893va7.d.mts → expression-CvXfXCGs.d.mts} +7 -7
  96. package/dist/{expression-DE893va7.d.mts.map → expression-CvXfXCGs.d.mts.map} +1 -1
  97. package/dist/{factories-DzLBAAvj.d.mts → factories-BVIVyHQU.d.mts} +4 -4
  98. package/dist/{factories-DzLBAAvj.d.mts.map → factories-BVIVyHQU.d.mts.map} +1 -1
  99. package/dist/{factories-Bp41Aity.mjs → factories-CScqMnFk.mjs} +3 -3
  100. package/dist/{factories-Bp41Aity.mjs.map → factories-CScqMnFk.mjs.map} +1 -1
  101. package/dist/family.d.mts +13 -13
  102. package/dist/family.mjs +6 -6
  103. package/dist/family__control-adapter.d.mts +2 -2
  104. package/dist/family__control.d.mts +4 -4
  105. package/dist/family__control.mjs +3 -3
  106. package/dist/family__diff.d.mts +2 -2
  107. package/dist/family__diff.mjs +1 -1
  108. package/dist/family__ir.d.mts +1 -1
  109. package/dist/family__ir.mjs +1 -1
  110. package/dist/family__migration.d.mts +1 -1
  111. package/dist/family__pack.d.mts +1 -1
  112. package/dist/family__pack.mjs +2 -2
  113. package/dist/family__psl-build.mjs +1 -1
  114. package/dist/family__psl-infer.d.mts +1 -1
  115. package/dist/family__psl-infer.mjs +1 -1
  116. package/dist/family__runtime.d.mts +2 -2
  117. package/dist/{foreign-key-materialization-D0Ltg78T.d.mts → foreign-key-materialization-DBYDet74.d.mts} +6 -4
  118. package/dist/foreign-key-materialization-DBYDet74.d.mts.map +1 -0
  119. package/dist/{foreign-key-materialization-Cv3q8Pix.mjs → foreign-key-materialization-DyoakLGY.mjs} +16 -7
  120. package/dist/foreign-key-materialization-DyoakLGY.mjs.map +1 -0
  121. package/dist/{index-oNRBExeI.d.mts → index-BzAG1PFV.d.mts} +11 -11
  122. package/dist/{index-oNRBExeI.d.mts.map → index-BzAG1PFV.d.mts.map} +1 -1
  123. package/dist/{index-CnpTmyXs.d.mts → index-We-mbWnZ.d.mts} +3 -3
  124. package/dist/{index-CnpTmyXs.d.mts.map → index-We-mbWnZ.d.mts.map} +1 -1
  125. package/dist/{index-equivalence-DswCiq5l-C7wLMPwF.mjs → index-equivalence-DswCiq5l-_gF1Un8p.mjs} +2 -2
  126. package/dist/{index-equivalence-DswCiq5l-C7wLMPwF.mjs.map → index-equivalence-DswCiq5l-_gF1Un8p.mjs.map} +1 -1
  127. package/dist/{index-naming-Cj1Anq-T-NX841eiU.mjs → index-naming-BOcJT1B3-CeEoP8t3.mjs} +7 -5
  128. package/dist/index-naming-BOcJT1B3-CeEoP8t3.mjs.map +1 -0
  129. package/dist/{index-naming-UEtT94f5.d.mts → index-naming-C7pme5Pj.d.mts} +4 -3
  130. package/dist/index-naming-C7pme5Pj.d.mts.map +1 -0
  131. package/dist/index-type-validation-Bcme_Ust.mjs +42 -0
  132. package/dist/index-type-validation-Bcme_Ust.mjs.map +1 -0
  133. package/dist/index-type-validation-D7-fPxIJ.d.mts +16 -0
  134. package/dist/index-type-validation-D7-fPxIJ.d.mts.map +1 -0
  135. package/dist/index-types-ByX8MLso.d.mts +1 -0
  136. package/dist/index-types-H1O43iYT-ONvDbszL.d.mts +66 -0
  137. package/dist/index-types-H1O43iYT-ONvDbszL.d.mts.map +1 -0
  138. package/dist/index-types-pC_5vADQ-TTUXAfmL.mjs +95 -0
  139. package/dist/index-types-pC_5vADQ-TTUXAfmL.mjs.map +1 -0
  140. package/dist/{interpreter-DlG-2o64-DmykcFbp.mjs → interpreter-DlG-2o64-CDb20sM1.mjs} +7 -7
  141. package/dist/{interpreter-DlG-2o64-DmykcFbp.mjs.map → interpreter-DlG-2o64-CDb20sM1.mjs.map} +1 -1
  142. package/dist/{ir-BPrf_vgX.d.mts → ir-OBn7ct21.d.mts} +3 -3
  143. package/dist/{ir-BPrf_vgX.d.mts.map → ir-OBn7ct21.d.mts.map} +1 -1
  144. package/dist/middleware-FHkIPvYR.d.mts +1 -0
  145. package/dist/{middleware-mLwvcOLS-SaqhgsmA.d.mts → middleware-mLwvcOLS-wIYSKgog.d.mts} +2 -2
  146. package/dist/{middleware-mLwvcOLS-SaqhgsmA.d.mts.map → middleware-mLwvcOLS-wIYSKgog.d.mts.map} +1 -1
  147. package/dist/{migration-C_J49WKy.d.mts → migration-DEK3Hxlo.d.mts} +4 -4
  148. package/dist/{migration-C_J49WKy.d.mts.map → migration-DEK3Hxlo.d.mts.map} +1 -1
  149. package/dist/{naming-C1OcnGJg-DB1o9TS6.d.mts → naming-BcD36g9T-DFyaudUa.d.mts} +3 -10
  150. package/dist/{naming-C1OcnGJg-DB1o9TS6.d.mts.map → naming-BcD36g9T-DFyaudUa.d.mts.map} +1 -1
  151. package/dist/{naming-DkG_OegU-DpENNdZX.mjs → naming-CT8tRisJ-DLHKo0Hm.mjs} +9 -10
  152. package/dist/{naming-DkG_OegU-DpENNdZX.mjs.map → naming-CT8tRisJ-DLHKo0Hm.mjs.map} +1 -1
  153. package/dist/operations.d.mts +1 -1
  154. package/dist/orm-client.d.mts +22 -25
  155. package/dist/orm-client.d.mts.map +1 -1
  156. package/dist/orm-client.mjs +20 -7
  157. package/dist/orm-client.mjs.map +1 -1
  158. package/dist/{pack-DZtuLikU.d.mts → pack-D3L1b4Ag.d.mts} +2 -2
  159. package/dist/{pack-DZtuLikU.d.mts.map → pack-D3L1b4Ag.d.mts.map} +1 -1
  160. package/dist/plan-_8dKi13Q.d.mts +2 -0
  161. package/dist/{plan-cGEaSXHv-BeW-cC5v.d.mts → plan-cGEaSXHv-j0w37mVT.d.mts} +4 -4
  162. package/dist/{plan-cGEaSXHv-BeW-cC5v.d.mts.map → plan-cGEaSXHv-j0w37mVT.d.mts.map} +1 -1
  163. package/dist/{prepared-statement-YtgdlN7e-CI1fD5IM.d.mts → prepared-statement-YtgdlN7e-D4MSU3i0.d.mts} +16 -16
  164. package/dist/{prepared-statement-YtgdlN7e-CI1fD5IM.d.mts.map → prepared-statement-YtgdlN7e-D4MSU3i0.d.mts.map} +1 -1
  165. package/dist/{psl-build-B5iMVWHu.mjs → psl-build-DTE03hcr.mjs} +2 -2
  166. package/dist/{psl-build-B5iMVWHu.mjs.map → psl-build-DTE03hcr.mjs.map} +1 -1
  167. package/dist/{psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts → psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts} +2 -2
  168. package/dist/{psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts.map → psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts.map} +1 -1
  169. package/dist/{psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs → psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs} +4 -4
  170. package/dist/{psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs.map → psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs.map} +1 -1
  171. package/dist/{psl-infer-B0yuv-j_.mjs → psl-infer-DHO72J_m.mjs} +2 -2
  172. package/dist/{psl-infer-B0yuv-j_.mjs.map → psl-infer-DHO72J_m.mjs.map} +1 -1
  173. package/dist/{psl-infer-DkPZJnUM.d.mts → psl-infer-DsHE9xAU.d.mts} +3 -3
  174. package/dist/{psl-infer-DkPZJnUM.d.mts.map → psl-infer-DsHE9xAU.d.mts.map} +1 -1
  175. package/dist/{query-lane-context-CJoNBspB-CR_n8DNB.d.mts → query-lane-context-CJoNBspB--ieuKEei.d.mts} +5 -5
  176. package/dist/{query-lane-context-CJoNBspB-CR_n8DNB.d.mts.map → query-lane-context-CJoNBspB--ieuKEei.d.mts.map} +1 -1
  177. package/dist/query-lane-context-DNt2DeQu.d.mts +1 -0
  178. package/dist/relational-core.d.mts +11 -11
  179. package/dist/relational-core.mjs +1 -1
  180. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  181. package/dist/relational-core__ast.d.mts +3 -3
  182. package/dist/relational-core__ast.mjs +1 -1
  183. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  184. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  185. package/dist/relational-core__contract-free.d.mts +3 -3
  186. package/dist/relational-core__expression.d.mts +1 -1
  187. package/dist/relational-core__middleware.d.mts +2 -2
  188. package/dist/relational-core__plan.d.mts +3 -3
  189. package/dist/relational-core__query-lane-context.d.mts +2 -2
  190. package/dist/relational-core__types.d.mts +2 -2
  191. package/dist/{resolve-storage-table-B7m9cFy4.d.mts → resolve-storage-table-wSUswl-4.d.mts} +3 -3
  192. package/dist/{resolve-storage-table-B7m9cFy4.d.mts.map → resolve-storage-table-wSUswl-4.d.mts.map} +1 -1
  193. package/dist/{runtime-Ca7PVQcJ.d.mts → runtime-BHJXmBhw.d.mts} +2 -2
  194. package/dist/{runtime-Ca7PVQcJ.d.mts.map → runtime-BHJXmBhw.d.mts.map} +1 -1
  195. package/dist/runtime.d.mts +4 -4
  196. package/dist/runtime.mjs +2 -2
  197. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  198. package/dist/{schema-differ-CqWOkoW9-BABSAGGB.d.mts → schema-differ-CqWOkoW9-DQkzKV8b.d.mts} +5 -5
  199. package/dist/{schema-differ-CqWOkoW9-BABSAGGB.d.mts.map → schema-differ-CqWOkoW9-DQkzKV8b.d.mts.map} +1 -1
  200. package/dist/schema-ir.d.mts +1 -1
  201. package/dist/schema-ir.mjs +1 -1
  202. package/dist/schema-ir__naming.d.mts +1 -1
  203. package/dist/schema-ir__naming.mjs +1 -1
  204. package/dist/schema-ir__types.d.mts +2 -2
  205. package/dist/schema-ir__types.mjs +1 -1
  206. package/dist/{schema-verify-DIfHSB4I-Dx3Tq9hf.mjs → schema-verify-DIfHSB4I-k8l0LZZB.mjs} +4 -4
  207. package/dist/{schema-verify-DIfHSB4I-Dx3Tq9hf.mjs.map → schema-verify-DIfHSB4I-k8l0LZZB.mjs.map} +1 -1
  208. package/dist/{serialized-index-C26m_DWu-CnNi8WAI.mjs → serialized-index-C26m_DWu-BjU519sW.mjs} +3 -3
  209. package/dist/{serialized-index-C26m_DWu-CnNi8WAI.mjs.map → serialized-index-C26m_DWu-BjU519sW.mjs.map} +1 -1
  210. package/dist/{serialized-index-CrgG8ct1-D64Figsu.d.mts → serialized-index-CrgG8ct1-DDfHKUEK.d.mts} +3 -3
  211. package/dist/{serialized-index-CrgG8ct1-D64Figsu.d.mts.map → serialized-index-CrgG8ct1-DDfHKUEK.d.mts.map} +1 -1
  212. package/dist/{sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs → sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs} +5 -5
  213. package/dist/{sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs.map → sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs.map} +1 -1
  214. package/dist/{sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts → sql-execution-plan-C7XauPPu-eskZJbmm.d.mts} +2 -2
  215. package/dist/{sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts.map → sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map} +1 -1
  216. package/dist/{sql-index-ByAAE7K8-DPkZtr7t.d.mts → sql-index-ByAAE7K8-BpbPBWPD.d.mts} +2 -2
  217. package/dist/{sql-index-ByAAE7K8-DPkZtr7t.d.mts.map → sql-index-ByAAE7K8-BpbPBWPD.d.mts.map} +1 -1
  218. package/dist/{sql-storage-BTlJLUID-O6fBB_am.d.mts → sql-storage-BTlJLUID-CGy3wuH4.d.mts} +2 -2
  219. package/dist/{sql-storage-BTlJLUID-O6fBB_am.d.mts.map → sql-storage-BTlJLUID-CGy3wuH4.d.mts.map} +1 -1
  220. package/dist/{storage-table-B7OSPl3G-EOodFPzq.mjs → storage-table-B7OSPl3G-p1j6AjMS.mjs} +2 -2
  221. package/dist/{storage-table-B7OSPl3G-EOodFPzq.mjs.map → storage-table-B7OSPl3G-p1j6AjMS.mjs.map} +1 -1
  222. package/dist/{storage-table-WXeVNycx-tlFMnbig.d.mts → storage-table-WXeVNycx-BCwDhdq5.d.mts} +4 -4
  223. package/dist/{storage-table-WXeVNycx-tlFMnbig.d.mts.map → storage-table-WXeVNycx-BCwDhdq5.d.mts.map} +1 -1
  224. package/dist/types-BCPHaykc.d.mts +1 -0
  225. package/dist/{types-BJQcLx-8-DY221fiX.d.mts → types-BJQcLx-8-BHNxJ_df.d.mts} +10 -10
  226. package/dist/{types-BJQcLx-8-DY221fiX.d.mts.map → types-BJQcLx-8-BHNxJ_df.d.mts.map} +1 -1
  227. package/dist/{types-CzxOObSY-DEfjmbj1.d.mts → types-CzxOObSY-CxZ_bdVi.d.mts} +9 -9
  228. package/dist/{types-CzxOObSY-DEfjmbj1.d.mts.map → types-CzxOObSY-CxZ_bdVi.d.mts.map} +1 -1
  229. package/dist/{types-Cz_bcUWN-CC3lFQOi.mjs → types-D0GFxty0-CP8b4dR3.mjs} +4 -4
  230. package/dist/{types-Cz_bcUWN-CC3lFQOi.mjs.map → types-D0GFxty0-CP8b4dR3.mjs.map} +1 -1
  231. package/dist/{types-DFZhLz18-C_h0u-Zx.d.mts → types-DFZhLz18-Msi8wwig.d.mts} +6 -6
  232. package/dist/{types-DFZhLz18-C_h0u-Zx.d.mts.map → types-DFZhLz18-Msi8wwig.d.mts.map} +1 -1
  233. package/dist/{types-CLsPsUiw-Db1BsN9R.d.mts → types-DIZSW9JI-DNUF-RnL.d.mts} +3 -3
  234. package/dist/{types-CLsPsUiw-Db1BsN9R.d.mts.map → types-DIZSW9JI-DNUF-RnL.d.mts.map} +1 -1
  235. package/dist/{types-C7oOtFcJ.mjs → types-DXrO0fxT.mjs} +2 -2
  236. package/dist/{types-C7oOtFcJ.mjs.map → types-DXrO0fxT.mjs.map} +1 -1
  237. package/dist/types-DqSCaTK3.d.mts +1 -0
  238. package/dist/{types-Sh5HuaZE-B_FQUPng.d.mts → types-Sh5HuaZE-CqThc46M.d.mts} +2 -2
  239. package/dist/{types-Sh5HuaZE-B_FQUPng.d.mts.map → types-Sh5HuaZE-CqThc46M.d.mts.map} +1 -1
  240. package/dist/{types-BURWzacK.d.mts → types-Uv3oTMAb.d.mts} +7 -7
  241. package/dist/{types-BURWzacK.d.mts.map → types-Uv3oTMAb.d.mts.map} +1 -1
  242. package/dist/{validators-oyDG5mVX.mjs → validators-CIfn8ezs.mjs} +5 -5
  243. package/dist/{validators-oyDG5mVX.mjs.map → validators-CIfn8ezs.mjs.map} +1 -1
  244. package/dist/{validators-Cr_FFJAG.d.mts → validators-COcD3_iw.d.mts} +3 -3
  245. package/dist/{validators-Cr_FFJAG.d.mts.map → validators-COcD3_iw.d.mts.map} +1 -1
  246. package/package.json +18 -18
  247. package/dist/contract-builder-V5pFHDv3.d.mts.map +0 -1
  248. package/dist/contract-builder-tEax3I2q.mjs.map +0 -1
  249. package/dist/control-adapter-BXQ29_fa.d.mts +0 -1
  250. package/dist/db-D7R5zKiH-P7Tg4ZXk.d.mts.map +0 -1
  251. package/dist/derived-checks-D5zdlyyh-CPofdm1W.mjs.map +0 -1
  252. package/dist/foreign-key-materialization-Cv3q8Pix.mjs.map +0 -1
  253. package/dist/foreign-key-materialization-D0Ltg78T.d.mts.map +0 -1
  254. package/dist/index-naming-Cj1Anq-T-NX841eiU.mjs.map +0 -1
  255. package/dist/index-naming-UEtT94f5.d.mts.map +0 -1
  256. package/dist/index-type-validation-B925ye4q.d.mts +0 -10
  257. package/dist/index-type-validation-B925ye4q.d.mts.map +0 -1
  258. package/dist/index-type-validation-COH4d78M.mjs +0 -17
  259. package/dist/index-type-validation-COH4d78M.mjs.map +0 -1
  260. package/dist/index-types-CNhHgKHi.d.mts +0 -1
  261. package/dist/index-types-DJQ_xwaE.mjs +0 -40
  262. package/dist/index-types-DJQ_xwaE.mjs.map +0 -1
  263. package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +0 -31
  264. package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +0 -1
  265. package/dist/middleware-DwaZ6s12.d.mts +0 -1
  266. package/dist/plan-Dhl03MtT.d.mts +0 -2
  267. package/dist/query-lane-context-BaoHpLsE.d.mts +0 -1
  268. package/dist/types-D6XuABFQ.d.mts +0 -1
  269. package/dist/types-DLjT0ADz.d.mts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schema-verify-DIfHSB4I-Dx3Tq9hf.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, enforceSqlDataTypeInvariants as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-DIfHSB4I.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,YAAY;CACzC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,UAAU,UAAU,CAAC,CAAC,OAAO,YAAY;CACvD,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,M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ClC,QAAQ,MAAM;EACd,sBAAsB,MAAM,SAAS;EACrC,eAAe,MAAM;CACtB,CAAC;CACD,MAAM,qBAAqB,0BAA0B;EACpD,UAAU,MAAM;EAChB,gBAAgB,YAAY;EAC5B,YAAY,yBAAyB,MAAM,mBAAmB;CAC/D,CAAC;CACD,MAAM,YAAY,YAAY,SAAS,SAAS,mBAAmB,SAAS;CAC5E,MAAM,KAAK,cAAc;CACzB,MAAM,cAAc,iBAAiB,MAAM,YAAY,OAAO,MAAM,SAAS,gBAAgB,WAAW,MAAM,SAAS,cAAc,KAAK;CAC1I,OAAO;EACN;EACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,2BAA2B;EAChD,SAAS,KAAK,uCAAuC,8CAA8C,UAAU,UAAU,cAAc,IAAI,KAAK,IAAI;EAClJ,UAAU;GACT,aAAa,MAAM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
1
+ {"version":3,"file":"schema-verify-DIfHSB4I-k8l0LZZB.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, enforceSqlDataTypeInvariants as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-DIfHSB4I.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,YAAY;CACzC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,UAAU,UAAU,CAAC,CAAC,OAAO,YAAY;CACvD,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM;EAC3D,IAAI,CAAC,qBAAqB,UAAU,GAAG;EACvC,MAAM,oBAAoB,WAAW,MAAM,WAAW;EACtD,KAAK,MAAM,CAAC,SAAS,SAAS,OAAO,QAAQ,iBAAiB,GAAG;GAChE,uBAAuB;IACtB;IACA;IACA,cAAc,WAAW;IACzB,aAAa;IACb,sBAAsB;GACvB,CAAC;GACD,MAAM,IAAI,SAAS,IAAI;GACvB,OAAO,IAAI,SAAS,WAAW,EAAE;EAClC;CACD;CACA,OAAO;AACR;;;;;;;;AAQA,SAAS,6BAA6B,mBAAmB,kBAAkB;CAC1E,MAAM,eAAe,IAAI,IAAI,kBAAkB,KAAK,aAAa,CAAC,SAAS,KAAK,IAAI,QAAQ,CAAC,CAAC;CAC9F,MAAM,YAAY,SAAS,cAAc,KAAK,GAAG,oBAAoB,aAAa,IAAI,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AM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
@@ -1,5 +1,5 @@
1
- import { m as parseNaming } from "./naming-DkG_OegU-DpENNdZX.mjs";
2
- import { o as SqlNode } from "./storage-table-B7OSPl3G-EOodFPzq.mjs";
1
+ import { m as parseNaming } from "./naming-CT8tRisJ-DLHKo0Hm.mjs";
2
+ import { o as SqlNode } from "./storage-table-B7OSPl3G-p1j6AjMS.mjs";
3
3
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
4
4
  import { freezeNode } from "@prisma/orm-framework/components/ir";
5
5
  //#region ../../../2-sql/1-core/contract/dist/serialized-index-C26m_DWu.mjs
@@ -71,4 +71,4 @@ function indexInputFromSerialized(flat) {
71
71
  //#endregion
72
72
  export { isStorageValueSet as i, checkConstraintInputFromSerialized as n, indexInputFromSerialized as r, StorageValueSet as t };
73
73
 
74
- //# sourceMappingURL=serialized-index-C26m_DWu-CnNi8WAI.mjs.map
74
+ //# sourceMappingURL=serialized-index-C26m_DWu-BjU519sW.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialized-index-C26m_DWu-CnNi8WAI.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-C26m_DWu.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-B7OSPl3G.mjs\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\n//#region src/ir/storage-value-set.ts\n/**\n* SQL Contract IR node for a value-set entry in a namespace's `valueSet`\n* map (`SqlNamespace.entries.valueSet`).\n*\n* A value-set records the ordered set of permitted codec-encoded values for\n* an enum-like column restriction. It does not carry a `codecId` — the\n* column that references it already holds the codec; the value-set holds\n* only the permitted values.\n*\n* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope\n* carries the discriminator and the serializer hydration walker can\n* dispatch on it. This follows the per-leaf enumerable-kind convention\n* established in the SQL-node comment (future polymorphic dispatch on\n* namespace entries needs the discriminator in JSON).\n*\n* The entry's name is not on the class — value-sets are keyed by name in\n* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.\n*/\nvar StorageValueSet = class extends SqlNode {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\nfunction isStorageValueSet(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn \"kind\" in value && value.kind === \"valueSet\" && \"values\" in value;\n}\n//#endregion\n//#region src/serialized-check-constraint.ts\n/**\n* Hydrates one stored check constraint into constructor input. `parseNaming`\n* is what rejects a hand-edited file whose `prefix` and `name` disagree.\n*/\nfunction checkConstraintInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\texpression: flat.expression\n\t};\n}\n//#endregion\n//#region src/serialized-index.ts\n/**\n* Hydrates one stored index into constructor input. The parameter is typed\n* but the values are whatever the file held, so each field the union depends\n* on is checked here rather than downstream — by the time `Index` sees the\n* data it is already a valid union.\n*/\nfunction indexInputFromSerialized(flat) {\n\tif (flat.name === void 0 || flat.name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\tif (flat.columns === void 0 === (flat.expression === void 0)) throw new ContractValidationError(`Index \"${flat.name}\": exactly one of columns or expression must be set.`, \"storage\");\n\tconst carried = {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\twhere: flat.where,\n\t\tunique: flat.unique,\n\t\ttype: flat.type,\n\t\toptions: flat.options\n\t};\n\treturn flat.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: flat.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: flat.columns ?? []\n\t};\n}\n//#endregion\nexport { isStorageValueSet as i, checkConstraintInputFromSerialized as n, StorageValueSet as r, indexInputFromSerialized as t };\n\n//# sourceMappingURL=serialized-index-C26m_DWu.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,QAAQ;CAC3C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,UAAU,SAAS,MAAM,SAAS,cAAc,YAAY;AACpE;;;;;AAOA,SAAS,mCAAmC,MAAM;CACjD,OAAO;EACN,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,YAAY,KAAK;CAClB;AACD;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,IAAI,KAAK,SAAS,KAAK,KAAK,KAAK,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;CACvP,IAAI,KAAK,YAAY,KAAK,OAAO,KAAK,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,KAAK,uDAAuD,SAAS;CACpL,MAAM,UAAU;EACf,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,MAAM,KAAK;EACX,SAAS,KAAK;CACf;CACA,OAAO,KAAK,eAAe,KAAK,IAAI;EACnC,GAAG;EACH,YAAY,KAAK;CAClB,IAAI;EACH,GAAG;EACH,SAAS,KAAK,WAAW,CAAC;CAC3B;AACD"}
1
+ {"version":3,"file":"serialized-index-C26m_DWu-BjU519sW.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-C26m_DWu.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-B7OSPl3G.mjs\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\n//#region src/ir/storage-value-set.ts\n/**\n* SQL Contract IR node for a value-set entry in a namespace's `valueSet`\n* map (`SqlNamespace.entries.valueSet`).\n*\n* A value-set records the ordered set of permitted codec-encoded values for\n* an enum-like column restriction. It does not carry a `codecId` — the\n* column that references it already holds the codec; the value-set holds\n* only the permitted values.\n*\n* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope\n* carries the discriminator and the serializer hydration walker can\n* dispatch on it. This follows the per-leaf enumerable-kind convention\n* established in the SQL-node comment (future polymorphic dispatch on\n* namespace entries needs the discriminator in JSON).\n*\n* The entry's name is not on the class — value-sets are keyed by name in\n* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.\n*/\nvar StorageValueSet = class extends SqlNode {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\nfunction isStorageValueSet(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn \"kind\" in value && value.kind === \"valueSet\" && \"values\" in value;\n}\n//#endregion\n//#region src/serialized-check-constraint.ts\n/**\n* Hydrates one stored check constraint into constructor input. `parseNaming`\n* is what rejects a hand-edited file whose `prefix` and `name` disagree.\n*/\nfunction checkConstraintInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\texpression: flat.expression\n\t};\n}\n//#endregion\n//#region src/serialized-index.ts\n/**\n* Hydrates one stored index into constructor input. The parameter is typed\n* but the values are whatever the file held, so each field the union depends\n* on is checked here rather than downstream — by the time `Index` sees the\n* data it is already a valid union.\n*/\nfunction indexInputFromSerialized(flat) {\n\tif (flat.name === void 0 || flat.name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\tif (flat.columns === void 0 === (flat.expression === void 0)) throw new ContractValidationError(`Index \"${flat.name}\": exactly one of columns or expression must be set.`, \"storage\");\n\tconst carried = {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\twhere: flat.where,\n\t\tunique: flat.unique,\n\t\ttype: flat.type,\n\t\toptions: flat.options\n\t};\n\treturn flat.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: flat.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: flat.columns ?? []\n\t};\n}\n//#endregion\nexport { isStorageValueSet as i, checkConstraintInputFromSerialized as n, StorageValueSet as r, indexInputFromSerialized as t };\n\n//# sourceMappingURL=serialized-index-C26m_DWu.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,QAAQ;CAC3C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,UAAU,SAAS,MAAM,SAAS,cAAc,YAAY;AACpE;;;;;AAOA,SAAS,mCAAmC,MAAM;CACjD,OAAO;EACN,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,YAAY,KAAK;CAClB;AACD;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,IAAI,KAAK,SAAS,KAAK,KAAK,KAAK,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;CACvP,IAAI,KAAK,YAAY,KAAK,OAAO,KAAK,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,KAAK,uDAAuD,SAAS;CACpL,MAAM,UAAU;EACf,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,MAAM,KAAK;EACX,SAAS,KAAK;CACf;CACA,OAAO,KAAK,eAAe,KAAK,IAAI;EACnC,GAAG;EACH,YAAY,KAAK;CAClB,IAAI;EACH,GAAG;EACH,SAAS,KAAK,WAAW,CAAC;CAC3B;AACD"}
@@ -1,5 +1,5 @@
1
- import { n as CheckConstraintInput } from "./check-constraint-B7qGu6rc-agxAjKLG.mjs";
2
- import { n as IndexElements, r as IndexInput } from "./sql-index-ByAAE7K8-DPkZtr7t.mjs";
1
+ import { n as CheckConstraintInput } from "./check-constraint-B7qGu6rc-CBVYAMwG.mjs";
2
+ import { n as IndexElements, r as IndexInput } from "./sql-index-ByAAE7K8-BpbPBWPD.mjs";
3
3
  //#region ../../../2-sql/1-core/contract/dist/serialized-index-CrgG8ct1.d.mts
4
4
  //#region src/serialized-check-constraint.d.ts
5
5
  /**
@@ -41,4 +41,4 @@ type SerializedIndex = IndexElements & {
41
41
  declare function indexInputFromSerialized(flat: SerializedIndex): IndexInput;
42
42
  //#endregion
43
43
  export { indexInputFromSerialized as i, SerializedIndex as n, checkConstraintInputFromSerialized as r, SerializedCheckConstraint as t };
44
- //# sourceMappingURL=serialized-index-CrgG8ct1-D64Figsu.d.mts.map
44
+ //# sourceMappingURL=serialized-index-CrgG8ct1-DDfHKUEK.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialized-index-CrgG8ct1-D64Figsu.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-CrgG8ct1.d.mts"],"mappings":";;;;;;;;;UAQU;WACC;WACA;WACA;;;;;;iBAMM,mCAAmC,MAAM,4BAA4B;;;;;;;;KAQjF,kBAAkB;WACZ;WACA;WACA;WACA;WACA;WACA,UAAU;;;;;;;;iBAQJ,yBAAyB,MAAM,kBAAkB"}
1
+ {"version":3,"file":"serialized-index-CrgG8ct1-DDfHKUEK.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-CrgG8ct1.d.mts"],"mappings":";;;;;;;;;UAQU;WACC;WACA;WACA;;;;;;iBAMM,mCAAmC,MAAM,4BAA4B;;;;;;;;KAQjF,kBAAkB;WACZ;WACA;WACA;WACA;WACA;WACA,UAAU;;;;;;;;iBAQJ,yBAAyB,MAAM,kBAAkB"}
@@ -1,12 +1,12 @@
1
1
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
2
- import { f as composeSqlEntityKinds } from "./entity-kinds-O3V1K26U-B8TUrsX2.mjs";
3
- import { c as isMaterializedSqlNamespace, o as SqlStorage } from "./types-C7oOtFcJ.mjs";
4
- import { i as createSqlContractSchema, s as resolveSqlToOneRelationStorage, u as validateSqlContractFully } from "./validators-oyDG5mVX.mjs";
2
+ import { f as composeSqlEntityKinds } from "./entity-kinds-DDTkNIr9-DJ2EIO94.mjs";
3
+ import { c as isMaterializedSqlNamespace, o as SqlStorage } from "./types-DXrO0fxT.mjs";
4
+ import { i as createSqlContractSchema, s as resolveSqlToOneRelationStorage, u as validateSqlContractFully } from "./validators-CIfn8ezs.mjs";
5
5
  import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
6
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
7
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
7
8
  import { hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
8
9
  import { blindCast } from "@prisma/orm-framework/utils/casts";
9
- import { ifDefined } from "@prisma/orm-framework/utils/defined";
10
10
  import { type } from "arktype";
11
11
  import { withDerivedToOneRelationNullability } from "@prisma/orm-framework/contract-authoring";
12
12
  import { isPlainRecord as isPlainRecord$1 } from "@prisma/orm-framework/contract/is-plain-record";
@@ -188,4 +188,4 @@ var SqlContractSerializer = class extends SqlContractSerializerBase {
188
188
  //#endregion
189
189
  export { SqlContractSerializerBase as n, SqlContractSerializer as t };
190
190
 
191
- //# sourceMappingURL=sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs.map
191
+ //# sourceMappingURL=sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-DDaAVCQr.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { createSqlContractSchema, resolveSqlToOneRelationStorage, validateSqlContractFully } from \"@internal/sql-contract/validators\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { withDerivedToOneRelationNullability } from \"@internal/contract-authoring\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { type } from \"arktype\";\n//#region src/core/ir/sql-contract-serializer-base.ts\nconst NamespaceRawSchema = type({\n\tid: \"string\",\n\t\"kind?\": \"string\",\n\tentries: type({ \"+\": \"ignore\" })\n});\n/**\n* A `contract.json` written before to-one relations recorded `nullable` (rc.9 and earlier)\n* loads with the flag derived from storage: nullable when any local FK column is nullable or\n* cannot be resolved.\n*/\nfunction withSqlToOneRelationNullability(contract) {\n\tconst domain = withDerivedToOneRelationNullability(contract.domain, ({ model, relation }) => {\n\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, blindCast(model.storage), relation);\n\t\treturn {\n\t\t\townsReference: ownsForeignKey,\n\t\t\tlocalFieldNullability: columns.map((column) => column.nullable)\n\t\t};\n\t});\n\treturn {\n\t\t...contract,\n\t\tdomain\n\t};\n}\n/**\n* SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n* deserialization pipeline:\n*\n* 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n* against the SQL contract arktype schema (`validateSqlContractFully`)\n* and returns the validated flat-data shape.\n* 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n* constructs the family-shared SQL Contract IR class hierarchy\n* (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n* / …). The rest of the contract envelope is JSON-clean primitive\n* data and passes through unchanged.\n* 3. `constructTargetContract` is the target-specific extension hook;\n* defaults to identity. Targets that need to attach target-only\n* fields (e.g. target-specific derived storage fields) override it.\n*\n* Default `serializeContract` is identity over the contract — concrete\n* SQL targets ship JSON-clean class instances, so the contract value\n* can be stringified directly. The non-enumerable family-level `kind`\n* discriminator on `SqlNode` instances stays out of the persisted\n* envelope automatically. Targets that need to canonicalize on the way\n* out (key ordering, dropping computed-only fields) override\n* `serializeContract` directly.\n*/\nvar SqlContractSerializerBase = class {\n\tentityHydrationRegistry;\n\tcontractSchema;\n\tentryKinds;\n\tconstructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {\n\t\tthis.entityHydrationRegistry = entityHydrationRegistry;\n\t\tthis.entryKinds = composeSqlEntityKinds(packEntityKinds);\n\t\tthis.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;\n\t}\n\tdeserializeContract(json) {\n\t\tconst validated = withSqlToOneRelationNullability(this.parseSqlContractStructure(json));\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn blindCast(this.constructTargetContract(hydrated));\n\t}\n\tserializeContract(contract) {\n\t\treturn blindCast(contract);\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\thashCanonicalizationHooks = sqlContractCanonicalizationHooks;\n\tparseSqlContractStructure(json) {\n\t\treturn validateSqlContractFully(json, this.contractSchema !== void 0 ? { contractSchema: this.contractSchema } : void 0);\n\t}\n\thydrateSqlStorage(validated) {\n\t\tconst types = validated.storage.types;\n\t\tconst hydratedTypes = types !== void 0 ? Object.fromEntries(Object.entries(types).map(([name, entry]) => [name, this.hydrateStorageTypeEntry(entry)])) : void 0;\n\t\tconst rawNamespaces = validated.storage.namespaces;\n\t\tif (rawNamespaces === void 0) throw new ContractValidationError(\"Contract storage.namespaces is required after structural validation\", \"structural\");\n\t\tconst hydratedNamespaces = this.hydrateSqlNamespaceMap(blindCast(rawNamespaces));\n\t\treturn {\n\t\t\t...validated,\n\t\t\tstorage: new SqlStorage({\n\t\t\t\tstorageHash: validated.storage.storageHash,\n\t\t\t\t...ifDefined(\"types\", hydratedTypes),\n\t\t\t\tnamespaces: blindCast(hydratedNamespaces)\n\t\t\t})\n\t\t};\n\t}\n\thydrateSqlNamespaceMap(namespaces) {\n\t\treturn Object.fromEntries(Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n\t\t\tconst namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n\t\t\tif (!isMaterializedSqlNamespace(namespaceHydrated)) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Target serializer bug: hydrateSqlNamespaceEntry for namespace \"${nsId}\" returned a non-NamespaceBase value. Override hydrateSqlNamespaceEntry to produce a target namespace concretion.`, {\n\t\t\t\twhy: \"The target contract serializer hydrated a namespace into a value that is not a materialized namespace concretion.\",\n\t\t\t\tfix: \"Fix the target package: its hydrateSqlNamespaceEntry override must return a target namespace concretion.\",\n\t\t\t\tmeta: { namespaceId: nsId }\n\t\t\t});\n\t\t\treturn [nsId, namespaceHydrated];\n\t\t}));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst id = typeof raw[\"id\"] === \"string\" ? raw[\"id\"] : nsId;\n\t\tconst parsed = NamespaceRawSchema({\n\t\t\t...raw,\n\t\t\tid\n\t\t});\n\t\tif (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join(\"; \")}`, \"structural\");\n\t\tconst entriesRaw = parsed.entries;\n\t\tconst rawEntriesMap = isPlainRecord$1(entriesRaw) ? entriesRaw : {};\n\t\tconst entriesInput = {};\n\t\tfor (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord$1(innerMap) ? innerMap : Object.freeze({});\n\t\tconst entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, \"fail\", id);\n\t\tif (!Object.hasOwn(entriesOutput, \"table\")) entriesOutput[\"table\"] = {};\n\t\treturn blindCast({\n\t\t\tid,\n\t\t\tentries: entriesOutput\n\t\t});\n\t}\n\thydrateStorageTypeEntry(entry) {\n\t\tif (typeof entry !== \"object\" || entry === null) return entry;\n\t\tconst kind = isPlainRecord$1(entry) && \"kind\" in entry ? entry.kind : void 0;\n\t\tif (typeof kind !== \"string\") return entry;\n\t\tconst factory = this.entityHydrationRegistry.get(kind);\n\t\tif (factory === void 0) return entry;\n\t\treturn blindCast(factory(entry));\n\t}\n\tconstructTargetContract(hydrated) {\n\t\treturn blindCast(hydrated);\n\t}\n\t/**\n\t* Serializes a namespace's `entries` dict by walking every enumerable\n\t* kind — no kind is named here, mirroring the generic hydrate walk in\n\t* `hydrateSqlNamespaceEntry` above. `table` is the SQL family's one\n\t* universal base kind (every namespace carries it), so it is always\n\t* emitted, even when empty; every other kind — target- or\n\t* pack-contributed — is emitted only when it holds at least one entry.\n\t* A kind carried non-enumerable on `entries` is excluded here for free,\n\t* since `Object.entries` honors enumerability.\n\t*/\n\tserializeNamespaceEntries(entries) {\n\t\tconst out = { table: this.serializeEntries(entries[\"table\"] ?? {}) };\n\t\tfor (const [kind, record] of Object.entries(entries)) {\n\t\t\tif (kind === \"table\" || record == null || Object.keys(record).length === 0) continue;\n\t\t\tout[kind] = this.serializeEntries(record);\n\t\t}\n\t\treturn out;\n\t}\n\tserializeEntries(entries) {\n\t\tconst out = {};\n\t\tfor (const [name, entry] of Object.entries(entries)) out[name] = this.serializeJsonObject(entry);\n\t\treturn out;\n\t}\n\tserializeJsonObject(value) {\n\t\treturn blindCast(this.serializeJsonValue(value));\n\t}\n\tserializeJsonValue(value) {\n\t\treturn blindCast(JSON.parse(JSON.stringify(value)));\n\t}\n};\n//#endregion\n//#region src/core/ir/sql-contract-serializer.ts\n/**\n* Default SQL family `ContractSerializer` concretion. Inherits the\n* full SQL-shared deserialization pipeline (structural validation +\n* IR-class hydration) without pack-registered `storage.types`\n* hydration factories — targets that emit polymorphic JSON outside the\n* codec-typed envelope wire a target-specific subclass with a populated\n* registry (see Postgres). Family-level call sites instantiate this\n* default directly when no target serializer is supplied.\n*\n* Because this serializer has no target concretion, deserialization of\n* contracts that include namespace entries from JSON will throw unless\n* the caller provides pre-hydrated `NamespaceBase` instances. Production\n* paths always supply a target-specific serializer.\n*/\nvar SqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map());\n\t}\n};\n//#endregion\nexport { SqlContractSerializerBase as n, SqlContractSerializer as t };\n\n//# sourceMappingURL=sql-contract-serializer-DDaAVCQr.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;AAMD,SAAS,gCAAgC,UAAU;CAClD,MAAM,SAAS,oCAAoC,SAAS,SAAS,EAAE,OAAO,eAAe;EAC5F,MAAM,EAAE,gBAAgB,YAAY,+BAA+B,UAAU,UAAU,MAAM,OAAO,GAAG,QAAQ;EAC/G,OAAO;GACN,eAA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AAI,OAAO,SAAS,UAAU,OAAO;EACrC,MAAM,UAAU,KAAK,wBAAwB,IAAI,IAAI;EACrD,IAAI,YAAY,KAAK,GAAG,OAAO;EAC/B,OAAO,UAAU,QAAQ,KAAK,CAAC;CAChC;CACA,wBAAwB,UAAU;EACjC,OAAO,UAAU,QAAQ;CAC1B;;;;;;;;;;;CAWA,0BAA0B,SAAS;EAClC,MAAM,MAAM,EAAE,OAAO,KAAK,iBAAiB,QAAQ,YAAY,CAAC,CAAC,EAAE;EACnE,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,OAAO,GAAG;GACrD,IAAI,SAAS,WAAW,UAAU,QAAQ,OAAO,KAAK,MAAM,CAAC,CAAC,WAAW,GAAG;GAC5E,IAAI,QAAQ,KAAK,iBAAiB,MAAM;EACzC;EACA,OAAO;CACR;CACA,iBAAiB,SAAS;EACzB,MAAM,MAAM,CAAC;EACb,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,OAAO,GAAG,IAAI,QAAQ,KAAK,oBAAoB,KAAK;EAC/F,OAAO;CACR;CACA,oBAAoB,OAAO;EAC1B,OAAO,UAAU,KAAK,mBAAmB,KAAK,CAAC;CAChD;CACA,mBAAmB,OAAO;EACzB,OAAO,UAAU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC;CACnD;AACD;;;;;;;;;;;;;;;AAiBA,IAAI,wBAAwB,cAAc,0BAA0B;CACnE,cAAc;EACb,sBAAsB,IAAI,IAAI,CAAC;CAChC;AACD"}
1
+ {"version":3,"file":"sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-DDaAVCQr.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { createSqlContractSchema, resolveSqlToOneRelationStorage, validateSqlContractFully } from \"@internal/sql-contract/validators\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { withDerivedToOneRelationNullability } from \"@internal/contract-authoring\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { type } from \"arktype\";\n//#region src/core/ir/sql-contract-serializer-base.ts\nconst NamespaceRawSchema = type({\n\tid: \"string\",\n\t\"kind?\": \"string\",\n\tentries: type({ \"+\": \"ignore\" })\n});\n/**\n* A `contract.json` written before to-one relations recorded `nullable` (rc.9 and earlier)\n* loads with the flag derived from storage: nullable when any local FK column is nullable or\n* cannot be resolved.\n*/\nfunction withSqlToOneRelationNullability(contract) {\n\tconst domain = withDerivedToOneRelationNullability(contract.domain, ({ model, relation }) => {\n\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, blindCast(model.storage), relation);\n\t\treturn {\n\t\t\townsReference: ownsForeignKey,\n\t\t\tlocalFieldNullability: columns.map((column) => column.nullable)\n\t\t};\n\t});\n\treturn {\n\t\t...contract,\n\t\tdomain\n\t};\n}\n/**\n* SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n* deserialization pipeline:\n*\n* 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n* against the SQL contract arktype schema (`validateSqlContractFully`)\n* and returns the validated flat-data shape.\n* 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n* constructs the family-shared SQL Contract IR class hierarchy\n* (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n* / …). The rest of the contract envelope is JSON-clean primitive\n* data and passes through unchanged.\n* 3. `constructTargetContract` is the target-specific extension hook;\n* defaults to identity. Targets that need to attach target-only\n* fields (e.g. target-specific derived storage fields) override it.\n*\n* Default `serializeContract` is identity over the contract — concrete\n* SQL targets ship JSON-clean class instances, so the contract value\n* can be stringified directly. The non-enumerable family-level `kind`\n* discriminator on `SqlNode` instances stays out of the persisted\n* envelope automatically. Targets that need to canonicalize on the way\n* out (key ordering, dropping computed-only fields) override\n* `serializeContract` directly.\n*/\nvar SqlContractSerializerBase = class {\n\tentityHydrationRegistry;\n\tcontractSchema;\n\tentryKinds;\n\tconstructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {\n\t\tthis.entityHydrationRegistry = entityHydrationRegistry;\n\t\tthis.entryKinds = composeSqlEntityKinds(packEntityKinds);\n\t\tthis.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;\n\t}\n\tdeserializeContract(json) {\n\t\tconst validated = withSqlToOneRelationNullability(this.parseSqlContractStructure(json));\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn blindCast(this.constructTargetContract(hydrated));\n\t}\n\tserializeContract(contract) {\n\t\treturn blindCast(contract);\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\thashCanonicalizationHooks = sqlContractCanonicalizationHooks;\n\tparseSqlContractStructure(json) {\n\t\treturn validateSqlContractFully(json, this.contractSchema !== void 0 ? { contractSchema: this.contractSchema } : void 0);\n\t}\n\thydrateSqlStorage(validated) {\n\t\tconst types = validated.storage.types;\n\t\tconst hydratedTypes = types !== void 0 ? Object.fromEntries(Object.entries(types).map(([name, entry]) => [name, this.hydrateStorageTypeEntry(entry)])) : void 0;\n\t\tconst rawNamespaces = validated.storage.namespaces;\n\t\tif (rawNamespaces === void 0) throw new ContractValidationError(\"Contract storage.namespaces is required after structural validation\", \"structural\");\n\t\tconst hydratedNamespaces = this.hydrateSqlNamespaceMap(blindCast(rawNamespaces));\n\t\treturn {\n\t\t\t...validated,\n\t\t\tstorage: new SqlStorage({\n\t\t\t\tstorageHash: validated.storage.storageHash,\n\t\t\t\t...ifDefined(\"types\", hydratedTypes),\n\t\t\t\tnamespaces: blindCast(hydratedNamespaces)\n\t\t\t})\n\t\t};\n\t}\n\thydrateSqlNamespaceMap(namespaces) {\n\t\treturn Object.fromEntries(Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n\t\t\tconst namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n\t\t\tif (!isMaterializedSqlNamespace(namespaceHydrated)) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Target serializer bug: hydrateSqlNamespaceEntry for namespace \"${nsId}\" returned a non-NamespaceBase value. Override hydrateSqlNamespaceEntry to produce a target namespace concretion.`, {\n\t\t\t\twhy: \"The target contract serializer hydrated a namespace into a value that is not a materialized namespace concretion.\",\n\t\t\t\tfix: \"Fix the target package: its hydrateSqlNamespaceEntry override must return a target namespace concretion.\",\n\t\t\t\tmeta: { namespaceId: nsId }\n\t\t\t});\n\t\t\treturn [nsId, namespaceHydrated];\n\t\t}));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst id = typeof raw[\"id\"] === \"string\" ? raw[\"id\"] : nsId;\n\t\tconst parsed = NamespaceRawSchema({\n\t\t\t...raw,\n\t\t\tid\n\t\t});\n\t\tif (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join(\"; \")}`, \"structural\");\n\t\tconst entriesRaw = parsed.entries;\n\t\tconst rawEntriesMap = isPlainRecord$1(entriesRaw) ? entriesRaw : {};\n\t\tconst entriesInput = {};\n\t\tfor (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord$1(innerMap) ? innerMap : Object.freeze({});\n\t\tconst entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, \"fail\", id);\n\t\tif (!Object.hasOwn(entriesOutput, \"table\")) entriesOutput[\"table\"] = {};\n\t\treturn blindCast({\n\t\t\tid,\n\t\t\tentries: entriesOutput\n\t\t});\n\t}\n\thydrateStorageTypeEntry(entry) {\n\t\tif (typeof entry !== \"object\" || entry === null) return entry;\n\t\tconst kind = isPlainRecord$1(entry) && \"kind\" in entry ? entry.kind : void 0;\n\t\tif (typeof kind !== \"string\") return entry;\n\t\tconst factory = this.entityHydrationRegistry.get(kind);\n\t\tif (factory === void 0) return entry;\n\t\treturn blindCast(factory(entry));\n\t}\n\tconstructTargetContract(hydrated) {\n\t\treturn blindCast(hydrated);\n\t}\n\t/**\n\t* Serializes a namespace's `entries` dict by walking every enumerable\n\t* kind — no kind is named here, mirroring the generic hydrate walk in\n\t* `hydrateSqlNamespaceEntry` above. `table` is the SQL family's one\n\t* universal base kind (every namespace carries it), so it is always\n\t* emitted, even when empty; every other kind — target- or\n\t* pack-contributed — is emitted only when it holds at least one entry.\n\t* A kind carried non-enumerable on `entries` is excluded here for free,\n\t* since `Object.entries` honors enumerability.\n\t*/\n\tserializeNamespaceEntries(entries) {\n\t\tconst out = { table: this.serializeEntries(entries[\"table\"] ?? {}) };\n\t\tfor (const [kind, record] of Object.entries(entries)) {\n\t\t\tif (kind === \"table\" || record == null || Object.keys(record).length === 0) continue;\n\t\t\tout[kind] = this.serializeEntries(record);\n\t\t}\n\t\treturn out;\n\t}\n\tserializeEntries(entries) {\n\t\tconst out = {};\n\t\tfor (const [name, entry] of Object.entries(entries)) out[name] = this.serializeJsonObject(entry);\n\t\treturn out;\n\t}\n\tserializeJsonObject(value) {\n\t\treturn blindCast(this.serializeJsonValue(value));\n\t}\n\tserializeJsonValue(value) {\n\t\treturn blindCast(JSON.parse(JSON.stringify(value)));\n\t}\n};\n//#endregion\n//#region src/core/ir/sql-contract-serializer.ts\n/**\n* Default SQL family `ContractSerializer` concretion. Inherits the\n* full SQL-shared deserialization pipeline (structural validation +\n* IR-class hydration) without pack-registered `storage.types`\n* hydration factories — targets that emit polymorphic JSON outside the\n* codec-typed envelope wire a target-specific subclass with a populated\n* registry (see Postgres). Family-level call sites instantiate this\n* default directly when no target serializer is supplied.\n*\n* Because this serializer has no target concretion, deserialization of\n* contracts that include namespace entries from JSON will throw unless\n* the caller provides pre-hydrated `NamespaceBase` instances. Production\n* paths always supply a target-specific serializer.\n*/\nvar SqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map());\n\t}\n};\n//#endregion\nexport { SqlContractSerializerBase as n, SqlContractSerializer as t };\n\n//# sourceMappingURL=sql-contract-serializer-DDaAVCQr.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;AAMD,SAAS,gCAAgC,UAAU;CAClD,MAAM,SAAS,oCAAoC,SAAS,SAAS,EAAE,OAAO,eAAe;EAC5F,MAAM,EAAE,gBAAgB,YAAY,+BAA+B,UAAU,UAAU,MAAM,OAAO,GAAG,QAAQ;EAC/G,OAAO;GACN,eAAe;GACf,uBAAuB,QAAQ,KAAK,WAAW,OAAO,QAAQ;EAC/D;CACD,CAAC;CACD,OAAO;EACN,GAAG;EACH;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,4BAA4B,MAAM;CACrC;CACA;CACA;CACA,YAAY,0CAA0C,IAAI,IAAI,GAAG,kBAAkB,CAAC,GAAG;EACtF,KAAK,0BAA0B;EAC/B,KAAK,aAAa,sBAAsB,eAAe;EACvD,KAAK,iBAAiB,gBAAgB,SAAS,IAAI,wBAAwB,KAAK,UAAU,IAAI,KAAK;CACpG;CACA,oBAAoB,MAAM;EACzB,MAAM,YAAY,gCAAgC,KAAK,0BAA0B,IAAI,CAAC;EACtF,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,UAAU,KAAK,wBAAwB,QAAQ,CAAC;CACxD;CACA,kBAAkB,UAAU;EAC3B,OAAO,UAAU,QAAQ;CAC1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AAC,MAAM,UAAU,OAAO,QAAQ,OAAO,GAAG,IAAI,QAAQ,KAAK,oBAAoB,KAAK;EAC/F,OAAO;CACR;CACA,oBAAoB,OAAO;EAC1B,OAAO,UAAU,KAAK,mBAAmB,KAAK,CAAC;CAChD;CACA,mBAAmB,OAAO;EACzB,OAAO,UAAU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC;CACnD;AACD;;;;;;;;;;;;;;;AAiBA,IAAI,wBAAwB,cAAc,0BAA0B;CACnE,cAAc;EACb,sBAAsB,IAAI,IAAI,CAAC;CAChC;AACD"}
@@ -1,4 +1,4 @@
1
- import { h as AnyQueryAst } from "./types-Sh5HuaZE-B_FQUPng.mjs";
1
+ import { h as AnyQueryAst } from "./types-Sh5HuaZE-CqThc46M.mjs";
2
2
  import { ExecutionPlan } from "@prisma/orm-framework/components/runtime";
3
3
  //#region ../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts
4
4
  //#region src/sql-execution-plan.d.ts
@@ -28,4 +28,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
28
28
  }
29
29
  //#endregion
30
30
  export { SqlExecutionPlan as t };
31
- //# sourceMappingURL=sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts.map
31
+ //# sourceMappingURL=sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
1
+ {"version":3,"file":"sql-execution-plan-C7XauPPu-eskZJbmm.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
@@ -1,5 +1,5 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { r as SqlObjectNaming } from "./naming-C1OcnGJg-DB1o9TS6.mjs";
2
+ import { r as SqlObjectNaming } from "./naming-BcD36g9T-DFyaudUa.mjs";
3
3
  //#region ../../../2-sql/1-core/contract/dist/sql-index-ByAAE7K8.d.mts
4
4
  //#region src/ir/sql-index.d.ts
5
5
  /**
@@ -70,4 +70,4 @@ declare class Index extends SqlNode {
70
70
  }
71
71
  //#endregion
72
72
  export { IndexElements as n, IndexInput as r, Index as t };
73
- //# sourceMappingURL=sql-index-ByAAE7K8-DPkZtr7t.d.mts.map
73
+ //# sourceMappingURL=sql-index-ByAAE7K8-BpbPBWPD.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-index-ByAAE7K8-DPkZtr7t.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-index-ByAAE7K8.d.mts"],"mappings":";;;;;;;;;;;KAUK;;WAEM;WACA;;WAEA;;;;;WAKA;;;;;;;;KAQN,aAAa;;WAEP,QAAQ;;WAER;;WAEA;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;cAoBN,cAAc;WACjB;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,UAAU;EACnB,YAAY,OAAO;SACZ,KAAK,OAAO,QAAQ,aAAa"}
1
+ {"version":3,"file":"sql-index-ByAAE7K8-BpbPBWPD.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-index-ByAAE7K8.d.mts"],"mappings":";;;;;;;;;;;KAUK;;WAEM;WACA;;WAEA;;;;;WAKA;;;;;;;;KAQN,aAAa;;WAEP,QAAQ;;WAER;;WAEA;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;cAoBN,cAAc;WACjB;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,UAAU;EACnB,YAAY,OAAO;SACZ,KAAK,OAAO,QAAQ,aAAa"}
@@ -1,5 +1,5 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { r as StorageTable } from "./storage-table-WXeVNycx-tlFMnbig.mjs";
2
+ import { r as StorageTable } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
3
3
  import { t as StorageValueSet } from "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
4
4
  import { AuthoringContributions } from "@prisma/orm-framework/components/authoring";
5
5
  import { Namespace, NamespaceBase, Storage, StorageType } from "@prisma/orm-framework/components/ir";
@@ -168,4 +168,4 @@ declare class SqlStorage<THash extends string = string> extends SqlNode implemen
168
168
  }
169
169
  //#endregion
170
170
  export { resolvedTypeParams as _, SqlNamespaceBase as a, SqlNamespaceInput as c, SqlStorageTypeEntry as d, StorageTypeInstance as f, isStorageTypeInstance as g, isSqlAuthoringContributions as h, SqlNamespace as i, SqlStorage as l, isMaterializedSqlNamespace as m, CODEC_INSTANCE_KIND as n, SqlNamespaceEntries as o, StorageTypeInstanceInput as p, SqlAuthoringContributions as r, SqlNamespaceFactory as s, AuthoredStorageTypeInstance as t, SqlStorageInput as u, toStorageTypeInstance as v };
171
- //# sourceMappingURL=sql-storage-BTlJLUID-O6fBB_am.d.mts.map
171
+ //# sourceMappingURL=sql-storage-BTlJLUID-CGy3wuH4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-storage-BTlJLUID-O6fBB_am.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-storage-BTlJLUID.d.mts"],"mappings":";;;;;;;;;;;;;;;cAcc;;;;UAIJ,4BAA4B;WAC3B,aAAa;WACb;WACA;WACA,YAAY;;;;;KAKlB,8BAA8B,KAAK;;;;KAInC,2BAA2B,KAAK;WAC1B,aAAa;;;;;;;iBAOP,sBAAsB,OAAO,2BAA2B;;;;iBAIxD,mBAAmB;WACzB,aAAa;WACb;GACR,YAAY,SAAS,eAAe,KAAK,wDAAwD;;;;;;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;UAQ/C,kCAAkC;WACjC,kBAAkB;;;;;;iBAMZ,4BAA4B,WAAW,qCAAqC,aAAa;UAChG,gBAAgB;WACf,aAAa,gBAAgB;WAC7B,QAAQ,eAAe;WACvB,YAAY,SAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B1C,sBAAsB,SAAS,eAAe,SAAS;WACjD,QAAQ,SAAS,eAAe;WAChC,WAAW,SAAS,eAAe;;;;;;;;;;;UAWpC;WACC;WACA;WACA,SAAS;WACT;EACT,cAAc;;;;;;;;uBAQO,yBAAyB,yBAAyB;oBACrD;oBACA,SAAS;WAClB,aAAa;;;;;;;;;;;;iBAYP,2BAA2B,aAAa,KAAK;cAChD,WAAW,uCAAuC,mBAAmB;WACxE,aAAa,gBAAgB;WAC7B,YAAY,SAAS,eAAe;WACpC,QAAQ,SAAS,eAAe;EACzC,YAAY,OAAO,gBAAgB"}
@@ -1,5 +1,5 @@
1
1
  import { t as contractError } from "./contract-errors-BCN6RVI5-5IHBF_lg.mjs";
2
- import { l as nameOf } from "./naming-DkG_OegU-DpENNdZX.mjs";
2
+ import { l as nameOf } from "./naming-CT8tRisJ-DLHKo0Hm.mjs";
3
3
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
4
4
  import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
5
5
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -307,4 +307,4 @@ var StorageTable = class StorageTable extends SqlNode {
307
307
  //#endregion
308
308
  export { PrimaryKey as a, StorageTable as c, Index as i, UniqueConstraint as l, ForeignKey as n, SqlNode as o, ForeignKeyReference as r, StorageColumn as s, CheckConstraint as t };
309
309
 
310
- //# sourceMappingURL=storage-table-B7OSPl3G-EOodFPzq.mjs.map
310
+ //# sourceMappingURL=storage-table-B7OSPl3G-p1j6AjMS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-table-B7OSPl3G-EOodFPzq.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-B7OSPl3G.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/ir/sql-node.ts\n/**\n* SQL family IR node base. Carries the family-level `kind` discriminator\n* `'sql'` and inherits the framework's `freezeNode` affordance.\n*\n* Single family-level discriminator (not per-leaf) reflects the fact that\n* SQL IR has no polymorphic dispatch today — verifiers and serializers\n* walk by structural position (`storage.tables[name].columns[name]`),\n* not by inspecting `kind`. The abstract bar for per-leaf discriminators\n* isn't earned until a future polymorphic consumer arrives.\n*\n* `kind` is installed as a non-enumerable own property on every instance,\n* which keeps three things clean simultaneously:\n*\n* - `JSON.stringify(node)` produces the canonical pre-lift JSON envelope\n* shape (no `kind` field), so emitted contract.json files and the\n* `validateSqlContractFully` arktype schemas stay unchanged.\n* - Test assertions that use `toEqual({...})` against the pre-lift flat\n* shape continue to pass — only enumerable own properties are\n* compared.\n* - Direct access (`node.kind`) and runtime narrowing\n* (`if (node.kind === 'sql')`) still work, so future polymorphic\n* dispatch can begin reading `kind` without a runtime change.\n*\n* Future per-leaf overrides land cleanly: a class that gains a\n* polymorphic-dispatch consumer (e.g. an enum type instance walked\n* alongside other types) overrides `kind` with its narrower literal\n* at that leaf level. Per-leaf overrides will use enumerable kind\n* (matching the Mongo per-class-discriminator precedent) because they\n* encode dispatch-relevant information that callers need to see in\n* JSON envelopes; the family-level `'sql'` is uniform across all SQL\n* IR and carries no dispatch-relevant information.\n*/\nvar SqlNode = class extends IRNodeBase {\n\tkind;\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n};\n//#endregion\n//#region src/ir/check-constraint.ts\n/**\n* SQL Contract IR node for a table-level check constraint, name-identified:\n* `name` is the full physical name; a present `prefix` marks the constraint as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)` over the expression's\n* content hash), an absent `prefix` marks it exact (the name is adopted\n* verbatim). This is the convention indexes and RLS policies already use — see\n* ADR 234, \"Content-addressed wire names for Postgres-normalized objects\".\n*\n* The predicate is opaque: one SQL string, never parsed and never rendered\n* from structured parts. A database reprints predicates in its own normalized\n* form, so a wire-named check is compared by name — the hash already commits\n* to the expression the contract declared.\n*/\nvar CheckConstraint = class CheckConstraint extends SqlNode {\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"CheckConstraint: every check constraint carries a full physical name.\", \"storage\");\n\t\tthis.name = name;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Normalizes either shape into an instance: an existing `CheckConstraint`\n\t* passes through, canonical input is constructed. Callers that accept\n\t* \"instance or input\" go through this, so the constructor keeps one\n\t* canonical shape instead of widening to a union.\n\t*/\n\tstatic from(value) {\n\t\treturn value instanceof CheckConstraint ? value : new CheckConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/sql-index.ts\n/**\n* SQL Contract IR node for a table-level secondary index, name-identified:\n* `name` is the full physical name; a present `prefix` marks the index as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)`), an absent `prefix`\n* marks it exact (the name is adopted verbatim).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL supported natively by\n* Postgres and SQLite alike, and the family IR must be able to represent\n* anything any SQL target can introspect. A target declining to AUTHOR them\n* (SQLite's rejection at namespace construction) is a capability decision,\n* not evidence of target-specificity.\n*\n* Note that this class shadows the global TypeScript `Index` lib type\n* at the family-shared name; consumer files that need both should\n* alias one (e.g.\n* `import { Index as SqlIndexNode } from '@internal/sql-contract/types'`).\n*/\nvar Index = class Index extends SqlNode {\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new ContractValidationError(`Index \"${name}\": exactly one of columns or expression must be set.`, \"storage\");\n\t\tthis.name = name;\n\t\tthis.unique = input.unique;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tif (input.columns !== void 0) this.columns = input.columns;\n\t\tif (input.expression !== void 0) this.expression = input.expression;\n\t\tif (input.where !== void 0) this.where = input.where;\n\t\tif (input.type !== void 0) this.type = input.type;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof Index ? value : new Index(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key-reference.ts\n/**\n* SQL Contract IR node for one side (source or target) of a foreign-key\n* declaration. Carries the full coordinate: namespace, table, and columns.\n*\n* Cross-space discrimination is based on `spaceId` presence: absent means\n* local (same contract-space); present means cross-space (the referenced\n* table lives in the contract-space identified by `spaceId`).\n*\n* For local references `spaceId` is absent from JSON, keeping the serialized\n* shape byte-identical to contracts authored before cross-space support was\n* added. For cross-space references `spaceId` appears in JSON so round-trips\n* are lossless.\n*\n* Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`\n* as the sentinel `namespaceId` for single-namespace (unbound) references.\n*/\nvar ForeignKeyReference = class ForeignKeyReference extends SqlNode {\n\tnamespaceId;\n\ttableName;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaceId = asNamespaceId(input.namespaceId);\n\t\tthis.tableName = input.tableName;\n\t\tthis.columns = input.columns;\n\t\tif (input.spaceId !== void 0) this.spaceId = input.spaceId;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKeyReference ? value : new ForeignKeyReference(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key.ts\n/**\n* SQL Contract IR node for a table-level foreign-key declaration — the\n* referential constraint only (source, target, `onDelete`/`onUpdate`).\n*\n* A persisted `foreignKeys[]` entry always denotes a real constraint: whether\n* to emit the constraint at all, and whether to back it with an index, are\n* authoring-time decisions (PSL `@relation(index:)`, TS `fk({ constraint,\n* index })`) resolved once at `contract emit` — a `constraint: false` FK\n* simply has no entry here, and a backing index (if any) is its own discrete,\n* named entry in the table's `indexes[]`. `index` says what serves the\n* foreign key's lookups; it is absent when nothing backs the foreign key.\n*\n* Each FK carries explicit `source` and `target` {@link ForeignKeyReference}\n* coordinates (namespace, table, columns). For single-namespace contracts the\n* sentinel `UNBOUND_NAMESPACE_ID` appears on both sides.\n*\n* The nested references are normalised to {@link ForeignKeyReference}\n* instances inside the constructor so downstream walks see a uniform AST\n* regardless of whether the input was a JSON literal or an already-constructed\n* class instance.\n*/\nvar ForeignKey = class ForeignKey extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = ForeignKeyReference.from(input.source);\n\t\tthis.target = ForeignKeyReference.from(input.target);\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tif (typeof input.index === \"object\") this.index = input.index;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKey ? value : new ForeignKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* SQL Contract IR node for a table's primary-key constraint.\n*/\nvar PrimaryKey = class PrimaryKey extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-column.ts\n/**\n* SQL Contract IR node for a single column entry in `StorageTable.columns`.\n*\n* Single concrete family-shared class — every SQL target reads the\n* same column shape today, so there is no per-target subclass. The\n* class type accepts any caller that constructs via\n* `new StorageColumn(input)`; literal construction sites must pass\n* through the constructor or the family-base hydration walker.\n*\n* The column's `name` is not on the class — columns are keyed by name\n* in the parent `StorageTable.columns: Record<string, StorageColumn>`\n* map, so a `name` field would be redundant with the key.\n*/\nvar StorageColumn = class StorageColumn extends SqlNode {\n\tdataType;\n\tcodecId;\n\tnullable;\n\tmany;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (Object.hasOwn(input, \"elementNullable\")) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"StorageColumn elementNullable must be nested under many.\", { meta: { reason: \"sibling-elementNullable\" } });\n\t\tthis.dataType = input.dataType;\n\t\tthis.codecId = input.codecId;\n\t\tthis.nullable = input.nullable;\n\t\tthis.many = input.many ?? false;\n\t\tif (input.noCheck !== void 0) this.noCheck = input.noCheck;\n\t\tif (input.typeParams !== void 0) this.typeParams = input.typeParams;\n\t\tif (input.typeRef !== void 0) this.typeRef = input.typeRef;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.valueSet !== void 0) this.valueSet = input.valueSet;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof StorageColumn ? value : new StorageColumn(value);\n\t}\n};\n//#endregion\n//#region src/ir/unique-constraint.ts\n/**\n* SQL Contract IR node for a table-level unique constraint.\n*/\nvar UniqueConstraint = class UniqueConstraint extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof UniqueConstraint ? value : new UniqueConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-table.ts\n/**\n* SQL Contract IR node for a single table entry in a namespace's\n* `tables` map.\n*\n* The constructor normalises nested IR-class fields (columns, primary\n* key, uniques, indexes, foreign keys) into the appropriate class\n* instances so downstream walks see a uniform AST regardless of whether\n* the input was a JSON literal or an already-constructed class.\n*\n* The table's `name` is not on the class — tables are keyed by name in\n* the parent namespace's `tables: Record<string, StorageTable>` map.\n*/\nvar StorageTable = class StorageTable extends SqlNode {\n\tcolumns;\n\tuniques;\n\tindexes;\n\tforeignKeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, StorageColumn.from(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map(UniqueConstraint.from));\n\t\tthis.indexes = Object.freeze(input.indexes.map(Index.from));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map(ForeignKey.from));\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(CheckConstraint.from));\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Runtime guard that a namespace `table` entry is really a `StorageTable`.\n\t* The compiler already types the entry as `StorageTable`, but a\n\t* freshly-deserialized contract may carry plain JSON at that slot until\n\t* hydration; this duck-types the structural shape. Accepts `undefined` so\n\t* optional-chained entry lookups pass straight through.\n\t*/\n\tstatic is(value) {\n\t\tif (typeof value !== \"object\" || value === null) return false;\n\t\treturn \"columns\" in value && \"uniques\" in value && \"indexes\" in value && \"foreignKeys\" in value;\n\t}\n\tstatic assert(value, coordinate) {\n\t\tif (!StorageTable.is(value)) throw new InternalError(`Expected a StorageTable at ${coordinate}`);\n\t}\n};\n//#endregion\nexport { ForeignKey as a, CheckConstraint as c, PrimaryKey as i, SqlNode as l, UniqueConstraint as n, ForeignKeyReference as o, StorageColumn as r, Index as s, StorageTable as t };\n\n//# sourceMappingURL=storage-table-B7OSPl3G.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAI,UAAU,cAAc,WAAW;CACtC;CACA,cAAc;EACb,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;CACF;AACD;;;;;;;;;;;;;;AAgBA,IAAI,kBAAkB,MAAM,wBAAwB,QAAQ;CAC3D;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,yEAAyE,SAAS;EAC3I,KAAK,OAAO;EACZ,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,aAAa,MAAM;EACxB,WAAW,IAAI;CAChB;;;;;;;CAOA,OAAO,KAAK,OAAO;EAClB,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI,gBAAgB,KAAK;CAC5E;AACD;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,QAAQ,MAAM,cAAc,QAAQ;CACvC;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;EAC1N,IAAI,MAAM,YAAY,KAAK,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,uDAAuD,SAAS;EACjL,KAAK,OAAO;EACZ,KAAK,SAAS,MAAM;EACpB,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,IAAI,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;CAChB;CACA,OAAO,KAAK,OAAO;EAClB,OAAO,iBAAiB,mBAAmB,QAAQ,IAAI,iBAAiB,KAAK;CAC9E;AACD;;;;;;;;;;;;;AAeA,IAAI,eAAe,MAAM,qBAAqB,QAAQ;CACrD;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,UAAU,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,MAAM,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;EACpI,IAAI,MAAM,eAAe,KAAK,GAAG,KAAK,aAAa,WAAW,KAAK,MAAM,UAAU;EACnF,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,iBAAiB,IAAI,CAAC;EACrE,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC;EAC1D,KAAK,cAAc,OAAO,OAAO,MAAM,YAAY,IAAI,WAAW,IAAI,CAAC;EACvE,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,WAAW,KAAK,KAAK,MAAM,OAAO,SAAS,GAAG,KAAK,SAAS,OAAO,OAAO,MAAM,OAAO,IAAI,gBAAgB,IAAI,CAAC;EAC1H,WAAW,IAAI;CAChB;;;;;;;;CAQA,OAAO,GAAG,OAAO;EAChB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,OAAO,aAAa,SAAS,aAAa,SAAS,aAAa,SAAS,iBAAiB;CAC3F;CACA,OAAO,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
1
+ {"version":3,"file":"storage-table-B7OSPl3G-p1j6AjMS.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-B7OSPl3G.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/ir/sql-node.ts\n/**\n* SQL family IR node base. Carries the family-level `kind` discriminator\n* `'sql'` and inherits the framework's `freezeNode` affordance.\n*\n* Single family-level discriminator (not per-leaf) reflects the fact that\n* SQL IR has no polymorphic dispatch today — verifiers and serializers\n* walk by structural position (`storage.tables[name].columns[name]`),\n* not by inspecting `kind`. The abstract bar for per-leaf discriminators\n* isn't earned until a future polymorphic consumer arrives.\n*\n* `kind` is installed as a non-enumerable own property on every instance,\n* which keeps three things clean simultaneously:\n*\n* - `JSON.stringify(node)` produces the canonical pre-lift JSON envelope\n* shape (no `kind` field), so emitted contract.json files and the\n* `validateSqlContractFully` arktype schemas stay unchanged.\n* - Test assertions that use `toEqual({...})` against the pre-lift flat\n* shape continue to pass — only enumerable own properties are\n* compared.\n* - Direct access (`node.kind`) and runtime narrowing\n* (`if (node.kind === 'sql')`) still work, so future polymorphic\n* dispatch can begin reading `kind` without a runtime change.\n*\n* Future per-leaf overrides land cleanly: a class that gains a\n* polymorphic-dispatch consumer (e.g. an enum type instance walked\n* alongside other types) overrides `kind` with its narrower literal\n* at that leaf level. Per-leaf overrides will use enumerable kind\n* (matching the Mongo per-class-discriminator precedent) because they\n* encode dispatch-relevant information that callers need to see in\n* JSON envelopes; the family-level `'sql'` is uniform across all SQL\n* IR and carries no dispatch-relevant information.\n*/\nvar SqlNode = class extends IRNodeBase {\n\tkind;\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n};\n//#endregion\n//#region src/ir/check-constraint.ts\n/**\n* SQL Contract IR node for a table-level check constraint, name-identified:\n* `name` is the full physical name; a present `prefix` marks the constraint as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)` over the expression's\n* content hash), an absent `prefix` marks it exact (the name is adopted\n* verbatim). This is the convention indexes and RLS policies already use — see\n* ADR 234, \"Content-addressed wire names for Postgres-normalized objects\".\n*\n* The predicate is opaque: one SQL string, never parsed and never rendered\n* from structured parts. A database reprints predicates in its own normalized\n* form, so a wire-named check is compared by name — the hash already commits\n* to the expression the contract declared.\n*/\nvar CheckConstraint = class CheckConstraint extends SqlNode {\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"CheckConstraint: every check constraint carries a full physical name.\", \"storage\");\n\t\tthis.name = name;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Normalizes either shape into an instance: an existing `CheckConstraint`\n\t* passes through, canonical input is constructed. Callers that accept\n\t* \"instance or input\" go through this, so the constructor keeps one\n\t* canonical shape instead of widening to a union.\n\t*/\n\tstatic from(value) {\n\t\treturn value instanceof CheckConstraint ? value : new CheckConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/sql-index.ts\n/**\n* SQL Contract IR node for a table-level secondary index, name-identified:\n* `name` is the full physical name; a present `prefix` marks the index as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)`), an absent `prefix`\n* marks it exact (the name is adopted verbatim).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL supported natively by\n* Postgres and SQLite alike, and the family IR must be able to represent\n* anything any SQL target can introspect. A target declining to AUTHOR them\n* (SQLite's rejection at namespace construction) is a capability decision,\n* not evidence of target-specificity.\n*\n* Note that this class shadows the global TypeScript `Index` lib type\n* at the family-shared name; consumer files that need both should\n* alias one (e.g.\n* `import { Index as SqlIndexNode } from '@internal/sql-contract/types'`).\n*/\nvar Index = class Index extends SqlNode {\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new ContractValidationError(`Index \"${name}\": exactly one of columns or expression must be set.`, \"storage\");\n\t\tthis.name = name;\n\t\tthis.unique = input.unique;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tif (input.columns !== void 0) this.columns = input.columns;\n\t\tif (input.expression !== void 0) this.expression = input.expression;\n\t\tif (input.where !== void 0) this.where = input.where;\n\t\tif (input.type !== void 0) this.type = input.type;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof Index ? value : new Index(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key-reference.ts\n/**\n* SQL Contract IR node for one side (source or target) of a foreign-key\n* declaration. Carries the full coordinate: namespace, table, and columns.\n*\n* Cross-space discrimination is based on `spaceId` presence: absent means\n* local (same contract-space); present means cross-space (the referenced\n* table lives in the contract-space identified by `spaceId`).\n*\n* For local references `spaceId` is absent from JSON, keeping the serialized\n* shape byte-identical to contracts authored before cross-space support was\n* added. For cross-space references `spaceId` appears in JSON so round-trips\n* are lossless.\n*\n* Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`\n* as the sentinel `namespaceId` for single-namespace (unbound) references.\n*/\nvar ForeignKeyReference = class ForeignKeyReference extends SqlNode {\n\tnamespaceId;\n\ttableName;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaceId = asNamespaceId(input.namespaceId);\n\t\tthis.tableName = input.tableName;\n\t\tthis.columns = input.columns;\n\t\tif (input.spaceId !== void 0) this.spaceId = input.spaceId;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKeyReference ? value : new ForeignKeyReference(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key.ts\n/**\n* SQL Contract IR node for a table-level foreign-key declaration — the\n* referential constraint only (source, target, `onDelete`/`onUpdate`).\n*\n* A persisted `foreignKeys[]` entry always denotes a real constraint: whether\n* to emit the constraint at all, and whether to back it with an index, are\n* authoring-time decisions (PSL `@relation(index:)`, TS `fk({ constraint,\n* index })`) resolved once at `contract emit` — a `constraint: false` FK\n* simply has no entry here, and a backing index (if any) is its own discrete,\n* named entry in the table's `indexes[]`. `index` says what serves the\n* foreign key's lookups; it is absent when nothing backs the foreign key.\n*\n* Each FK carries explicit `source` and `target` {@link ForeignKeyReference}\n* coordinates (namespace, table, columns). For single-namespace contracts the\n* sentinel `UNBOUND_NAMESPACE_ID` appears on both sides.\n*\n* The nested references are normalised to {@link ForeignKeyReference}\n* instances inside the constructor so downstream walks see a uniform AST\n* regardless of whether the input was a JSON literal or an already-constructed\n* class instance.\n*/\nvar ForeignKey = class ForeignKey extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = ForeignKeyReference.from(input.source);\n\t\tthis.target = ForeignKeyReference.from(input.target);\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tif (typeof input.index === \"object\") this.index = input.index;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKey ? value : new ForeignKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* SQL Contract IR node for a table's primary-key constraint.\n*/\nvar PrimaryKey = class PrimaryKey extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-column.ts\n/**\n* SQL Contract IR node for a single column entry in `StorageTable.columns`.\n*\n* Single concrete family-shared class — every SQL target reads the\n* same column shape today, so there is no per-target subclass. The\n* class type accepts any caller that constructs via\n* `new StorageColumn(input)`; literal construction sites must pass\n* through the constructor or the family-base hydration walker.\n*\n* The column's `name` is not on the class — columns are keyed by name\n* in the parent `StorageTable.columns: Record<string, StorageColumn>`\n* map, so a `name` field would be redundant with the key.\n*/\nvar StorageColumn = class StorageColumn extends SqlNode {\n\tdataType;\n\tcodecId;\n\tnullable;\n\tmany;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (Object.hasOwn(input, \"elementNullable\")) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"StorageColumn elementNullable must be nested under many.\", { meta: { reason: \"sibling-elementNullable\" } });\n\t\tthis.dataType = input.dataType;\n\t\tthis.codecId = input.codecId;\n\t\tthis.nullable = input.nullable;\n\t\tthis.many = input.many ?? false;\n\t\tif (input.noCheck !== void 0) this.noCheck = input.noCheck;\n\t\tif (input.typeParams !== void 0) this.typeParams = input.typeParams;\n\t\tif (input.typeRef !== void 0) this.typeRef = input.typeRef;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.valueSet !== void 0) this.valueSet = input.valueSet;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof StorageColumn ? value : new StorageColumn(value);\n\t}\n};\n//#endregion\n//#region src/ir/unique-constraint.ts\n/**\n* SQL Contract IR node for a table-level unique constraint.\n*/\nvar UniqueConstraint = class UniqueConstraint extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof UniqueConstraint ? value : new UniqueConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-table.ts\n/**\n* SQL Contract IR node for a single table entry in a namespace's\n* `tables` map.\n*\n* The constructor normalises nested IR-class fields (columns, primary\n* key, uniques, indexes, foreign keys) into the appropriate class\n* instances so downstream walks see a uniform AST regardless of whether\n* the input was a JSON literal or an already-constructed class.\n*\n* The table's `name` is not on the class — tables are keyed by name in\n* the parent namespace's `tables: Record<string, StorageTable>` map.\n*/\nvar StorageTable = class StorageTable extends SqlNode {\n\tcolumns;\n\tuniques;\n\tindexes;\n\tforeignKeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, StorageColumn.from(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map(UniqueConstraint.from));\n\t\tthis.indexes = Object.freeze(input.indexes.map(Index.from));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map(ForeignKey.from));\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(CheckConstraint.from));\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Runtime guard that a namespace `table` entry is really a `StorageTable`.\n\t* The compiler already types the entry as `StorageTable`, but a\n\t* freshly-deserialized contract may carry plain JSON at that slot until\n\t* hydration; this duck-types the structural shape. Accepts `undefined` so\n\t* optional-chained entry lookups pass straight through.\n\t*/\n\tstatic is(value) {\n\t\tif (typeof value !== \"object\" || value === null) return false;\n\t\treturn \"columns\" in value && \"uniques\" in value && \"indexes\" in value && \"foreignKeys\" in value;\n\t}\n\tstatic assert(value, coordinate) {\n\t\tif (!StorageTable.is(value)) throw new InternalError(`Expected a StorageTable at ${coordinate}`);\n\t}\n};\n//#endregion\nexport { ForeignKey as a, CheckConstraint as c, PrimaryKey as i, SqlNode as l, UniqueConstraint as n, ForeignKeyReference as o, StorageColumn as r, Index as s, StorageTable as t };\n\n//# sourceMappingURL=storage-table-B7OSPl3G.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAI,UAAU,cAAc,WAAW;CACtC;CACA,cAAc;EACb,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;CACF;AACD;;;;;;;;;;;;;;AAgBA,IAAI,kBAAkB,MAAM,wBAAwB,QAAQ;CAC3D;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,yEAAyE,SAAS;EAC3I,KAAK,OAAO;EACZ,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,aAAa,MAAM;EACxB,WAAW,IAAI;CAChB;;;;;;;CAOA,OAAO,KAAK,OAAO;EAClB,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI,gBAAgB,KAAK;CAC5E;AACD;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,QAAQ,MAAM,cAAc,QAAQ;CACvC;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;EAC1N,IAAI,MAAM,YAAY,KAAK,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,uDAAuD,SAAS;EACjL,KAAK,OAAO;EACZ,KAAK,SAAS,MAAM;EACpB,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,e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AQ,IAAI,iBAAiB,KAAK;CAC9E;AACD;;;;;;;;;;;;;AAeA,IAAI,eAAe,MAAM,qBAAqB,QAAQ;CACrD;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,UAAU,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,MAAM,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;EACpI,IAAI,MAAM,eAAe,KAAK,GAAG,KAAK,aAAa,WAAW,KAAK,MAAM,UAAU;EACnF,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,iBAAiB,IAAI,CAAC;EACrE,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC;EAC1D,KAAK,cAAc,OAAO,OAAO,MAAM,YAAY,IAAI,WAAW,IAAI,CAAC;EACvE,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,WAAW,KAAK,KAAK,MAAM,OAAO,SAAS,GAAG,KAAK,SAAS,OAAO,OAAO,MAAM,OAAO,IAAI,gBAAgB,IAAI,CAAC;EAC1H,WAAW,IAAI;CAChB;;;;;;;;CAQA,OAAO,GAAG,OAAO;EAChB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,OAAO,aAAa,SAAS,aAAa,SAAS,aAAa,SAAS,iBAAiB;CAC3F;CACA,OAAO,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
@@ -1,9 +1,9 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { t as CheckKind } from "./naming-C1OcnGJg-DB1o9TS6.mjs";
3
- import { n as CheckConstraintInput, t as CheckConstraint } from "./check-constraint-B7qGu6rc-agxAjKLG.mjs";
2
+ import { t as CheckKind } from "./naming-BcD36g9T-DFyaudUa.mjs";
3
+ import { n as CheckConstraintInput, t as CheckConstraint } from "./check-constraint-B7qGu6rc-CBVYAMwG.mjs";
4
4
  import { r as ForeignKeyInput, t as ForeignKey } from "./foreign-key-qkDFfG8t-Fyrzd0VI.mjs";
5
5
  import { i as UniqueConstraintInput, n as PrimaryKeyInput, r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-M5TlQnJQ-BiIHJ85k.mjs";
6
- import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-DPkZtr7t.mjs";
6
+ import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-BpbPBWPD.mjs";
7
7
  import { ColumnDefault, ControlPolicy, ValueSetRef } from "@prisma/orm-framework/contract/types";
8
8
  //#region ../../../2-sql/1-core/contract/dist/storage-table-WXeVNycx.d.mts
9
9
  //#region src/ir/storage-column.d.ts
@@ -106,4 +106,4 @@ declare class StorageTable extends SqlNode {
106
106
  }
107
107
  //#endregion
108
108
  export { StorageTableInput as i, StorageColumnInput as n, StorageTable as r, StorageColumn as t };
109
- //# sourceMappingURL=storage-table-WXeVNycx-tlFMnbig.d.mts.map
109
+ //# sourceMappingURL=storage-table-WXeVNycx-BCwDhdq5.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-table-WXeVNycx-tlFMnbig.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-WXeVNycx.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;KAkBK;WACM;;KAEN;;WAEM;WACA;WACA;WACA,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;WACnB,OAAO;;;;;;;;;;;;;;;cAeJ,sBAAsB;WACzB;WACA;WACA;WACA,MAAM;WACN,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;EAC5B,YAAY,OAAO;SACZ,KAAK,OAAO,gBAAgB,qBAAqB;;;;UAIhD;WACC,SAAS,eAAe,gBAAgB;WACxC,aAAa,aAAa;WAC1B,SAAS,cAAc,mBAAmB;WAC1C,SAAS,cAAc,QAAQ;WAC/B,aAAa,cAAc,aAAa;WACxC,UAAU;WACV,SAAS,cAAc,kBAAkB;;;;;;;;;;;;;;cActC,qBAAqB;WACxB,SAAS,SAAS,eAAe;WACjC,SAAS,cAAc;WACvB,SAAS,cAAc;WACvB,aAAa,cAAc;WAC3B,aAAa;WACb,UAAU;WACV,SAAS,cAAc;EAChC,YAAY,OAAO;;;;;;;;SAQZ,GAAG,OAAO,2BAA2B,SAAS;SAC9C,OAAO,OAAO,0BAA0B,6BAA6B,SAAS"}
1
+ {"version":3,"file":"storage-table-WXeVNycx-BCwDhdq5.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-WXeVNycx.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;KAkBK;WACM;;KAEN;;WAEM;WACA;WACA;WACA,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;WACnB,OAAO;;;;;;;;;;;;;;;cAeJ,sBAAsB;WACzB;WACA;WACA;WACA,MAAM;WACN,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;EAC5B,YAAY,OAAO;SACZ,KAAK,OAAO,gBAAgB,qBAAqB;;;;UAIhD;WACC,SAAS,eAAe,gBAAgB;WACxC,aAAa,aAAa;WAC1B,SAAS,cAAc,mBAAmB;WAC1C,SAAS,cAAc,QAAQ;WAC/B,aAAa,cAAc,aAAa;WACxC,UAAU;WACV,SAAS,cAAc,kBAAkB;;;;;;;;;;;;;;cActC,qBAAqB;WACxB,SAAS,SAAS,eAAe;WACjC,SAAS,cAAc;WACvB,SAAS,cAAc;WACvB,aAAa,cAAc;WAC3B,aAAa;WACb,UAAU;WACV,SAAS,cAAc;EAChC,YAAY,OAAO;;;;;;;;SAQZ,GAAG,OAAO,2BAA2B,SAAS;SAC9C,OAAO,OAAO,0BAA0B,6BAA6B,SAAS"}
@@ -0,0 +1 @@
1
+ import "./types-BJQcLx-8-BHNxJ_df.mjs";
@@ -1,13 +1,13 @@
1
- import { t as StorageColumn } from "./storage-table-WXeVNycx-tlFMnbig.mjs";
2
- import { l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
3
- import { f as ExtractFieldOutputTypes } from "./types-DFZhLz18-C_h0u-Zx.mjs";
4
- import "./types-BURWzacK.mjs";
5
- import { t as SqlLoweringSpec } from "./index-CnpTmyXs.mjs";
6
- import { Ct as ParamRef, O as ColumnRef } from "./types-Sh5HuaZE-B_FQUPng.mjs";
1
+ import { t as StorageColumn } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
2
+ import { l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
3
+ import { f as ExtractFieldOutputTypes } from "./types-DFZhLz18-Msi8wwig.mjs";
4
+ import "./types-Uv3oTMAb.mjs";
5
+ import { t as SqlLoweringSpec } from "./index-We-mbWnZ.mjs";
6
+ import { Ct as ParamRef, O as ColumnRef } from "./types-Sh5HuaZE-CqThc46M.mjs";
7
7
  import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
8
- import { n as SqlQueryPlan } from "./plan-cGEaSXHv-BeW-cC5v.mjs";
9
- import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BFhGKvp4.mjs";
10
- import { n as ExecutionContext } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
8
+ import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
9
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mjs";
10
+ import { n as ExecutionContext } from "./query-lane-context-CJoNBspB--ieuKEei.mjs";
11
11
  import { Contract } from "@prisma/orm-framework/contract/types";
12
12
  import { AsyncIterableResult, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
13
13
  import { ParamSpec } from "@prisma/orm-framework/operations";
@@ -236,4 +236,4 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
236
236
  }
237
237
  //#endregion
238
238
  export { TablesOf as S, SqlOrmPlan as _, ColumnsOf as a, TableKey as b, META as c, ModelMetadata as d, OperationTypeSignature as f, SqlBuilderOptions as g, RuntimeScope as h, ColumnResolutionContract as i, Meta as l, OperationsForTypeId as m, BuildParamsMap as n, ComputeColumnJsType as o, OperationTypes as p, CodecTypes as r, Expr as s, BuildOptions as t, ModelDef as u, SqlPlan as v, TableMetadata as x, TableDef as y };
239
- //# sourceMappingURL=types-BJQcLx-8-DY221fiX.d.mts.map
239
+ //# sourceMappingURL=types-BJQcLx-8-BHNxJ_df.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-BJQcLx-8-DY221fiX.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/types-BJQcLx-8.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBK,WAAW,iBAAiB,iBAAiB,OAAO,aAAa;;;;;;;;UAQ5D;EACR,MAAM,KAAK,MAAM,WAAW,MAAM,UAAU,wBAAwB,oBAAoB;EACxF,QAAQ,MAAM,YAAY,UAAU,wBAAwB,QAAQ;;;;KAIjE,OAAO,YAAY;;;;;;;;;;KAUnB;WACM;aACE,YAAY,SAAS;eACnB,QAAQ,SAAS;;;WAGrB;aACE,YAAY,SAAS;eACnB,SAAS,SAAS,eAAe,SAAS;;;;KAIpD,gBAAgB,kBAAkB,0BAA0B,uBAAuB,kCAAkC;WAC/G,cAAc,eAAe;IACpC;KACC,oBAAoB,kBAAkB,0BAA0B,qBAAqB,4BAA4B,gBAAgB,WAAW,qBAAqB,eAAe,8BAA8B,WAAW,kBAAkB,OAAO;WAC5O;aACE,OAAO;;IAEhB,mBAAmB;KAClB,qBAAqB,kBAAkB,0BAA0B,qBAAqB,0BAA0B,6BAA6B,oBAAoB,WAAW,MAAM,0BAA0B,4BAA4B,gBAAgB,WAAW,qBAAqB,e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1M,oBAAoB,kBAAkB,0BAA0B,qBAAqB,0BAA0B,2BAA2B,mBAAmB;WACvJ;MACL,oBAAoB,WAAW,MAAM,0BAA0B,cAAc,6BAA6B,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAAc,2BAA2B,qBAAqB,WAAW,MAAM,WAAW,2BAA2B,cAAc,6BAA6B,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAAc,2BAA2B,qBAAqB,WAAW,MAAM,WAAW,0BAA0B,QAAQ,uBAAuB,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAAc;;;;;;KAMhmB,QAAQ,iBAAiB,iBAAiB;;;;KAI1C,SAAS,aAAa;EACzB;IACE,cAAc;;IAEd;KACC,SAAS,aAAa,cAAc,SAAS;;;;cAIpC;;;;KAIT,KAAK;GACP;KACE,SAAS;;;;UAIJ,cAAc;EACtB,MAAM;;;;;UAKE,cAAc;EACtB,MAAM;;;;;;UAME,SAAS;YACP,OAAO,cAAc;;;;;;UAMvB,SAAS;YACP,OAAO,cAAc;;KAE5B,UAAU,WAAW,UAAU,SAAS,cAAc,gBAAgB,SAAS,aAAa,SAAS,WAAW;EACnH,eAAe;IACb;UACM;YACE;;UAEF;WACC,SAAS;;UAEV,kBAAkB,kBAAkB,SAAS,cAAc,SAAS;WACnE,SAAS,iBAAiB"}
@@ -1,11 +1,11 @@
1
- import { r as StorageTable, t as StorageColumn } from "./storage-table-WXeVNycx-tlFMnbig.mjs";
2
- import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
3
- import { O as SqlControlDriverInstance } from "./types-DFZhLz18-C_h0u-Zx.mjs";
4
- import "./types-BURWzacK.mjs";
5
- import { r as SqlOperationDescriptors } from "./index-CnpTmyXs.mjs";
6
- import { y as SqlSchemaIRNode } from "./types-CLsPsUiw-Db1BsN9R.mjs";
7
- import "./types-D6XuABFQ.mjs";
8
- import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-BLYeKcLW.mjs";
1
+ import { r as StorageTable, t as StorageColumn } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
2
+ import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
3
+ import { O as SqlControlDriverInstance } from "./types-DFZhLz18-Msi8wwig.mjs";
4
+ import "./types-Uv3oTMAb.mjs";
5
+ import { r as SqlOperationDescriptors } from "./index-We-mbWnZ.mjs";
6
+ import { y as SqlSchemaIRNode } from "./types-DIZSW9JI-DNUF-RnL.mjs";
7
+ import "./types-DqSCaTK3.mjs";
8
+ import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-DH5DAObc.mjs";
9
9
  import { Contract } from "@prisma/orm-framework/contract/types";
10
10
  import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
11
11
  import { ContractSpace, ControlAdapterDescriptor, ControlExtensionDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerPerSpaceSuccessValue, MigrationRunnerResult, OpFactoryCall, OperationContext, PlanOrigin, ResolvedMigrationStatement, SchemaDiffIssue, SchemaOwnership } from "@prisma/orm-framework/components/control";
@@ -408,4 +408,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
408
408
  }
409
409
  //#endregion
410
410
  export { StorageTypePlanResult as A, SqlPlanTargetDetails as C, SqlPlannerFailureResult as D, SqlPlannerConflictLocation as E, SqlPlannerResult as O, SqlMigrationRunnerSuccessValue as S, SqlPlannerConflictKind as T, SqlMigrationRunnerErrorCode as _, FieldEventContext as a, SqlMigrationRunnerFailure as b, SqlControlExtensionDescriptor as c, SqlMigrationPlanOperation as d, SqlMigrationPlanOperationStep as f, SqlMigrationRunner as g, SqlMigrationPlannerPlanOptions as h, FieldEvent as i, SqlPlannerSuccessResult as k, SqlMigrationPlan as l, SqlMigrationPlanner as m, CodecControlHooks as n, ResolveIdentityValueInput as o, SqlMigrationPlanOperationTarget as p, CreateSqlMigrationPlanOptions as r, SqlControlAdapterDescriptor as s, AnyRecord as t, SqlMigrationPlanContractInfo as u, SqlMigrationRunnerExecuteCallbacks as v, SqlPlannerConflict as w, SqlMigrationRunnerResult as x, SqlMigrationRunnerExecuteOptions as y };
411
- //# sourceMappingURL=types-CzxOObSY-DEfjmbj1.d.mts.map
411
+ //# sourceMappingURL=types-CzxOObSY-CxZ_bdVi.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CzxOObSY-DEfjmbj1.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-CzxOObSY.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;;;;;;;WASA;WACA,OAAO;;;;;;;;;UASR;WACC;WACA;;UAED,gCAAgC;WAC/B;WACA,UAAU;;UAEX,0BAA0B,wBAAwB;WACjD;WACA,QAA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AAS,iCAAiC,kBAAkB,QAAQ;;UAEhF,8BAA8B;WAC7B;;;;WAIA;WACA,SAAS;WACT,aAAa;WACb,qBAAqB,0BAA0B;;;;;;WAM/C;WACA,OAAO"}
1
+ {"version":3,"file":"types-CzxOObSY-CxZ_bdVi.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-CzxOObSY.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;;;;;;;WASA;WACA,OAAO;;;;;;;;;UASR;WACC;WACA;;UAED,gCAAgC;WAC/B;WACA,UAAU;;UAEX,0BAA0B,wBAAwB;WACjD;WACA,QAAQ,gCAAgC;WACxC,mBAAmB;WACnB,kBAAkB;WAClB,oBAAoB;WACpB,OAAO;;UAER;WACC;WACA;;UAED,iBAAiB,wBAAwB;;;;;;;;;;;;;;;WAexC;;;;;WAKA,SAAS;;;;WAIT,aAAa;WACb,sBAAsB,0BAA0B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f } from "./naming-DkG_OegU-DpENNdZX.mjs";
1
+ import { f as normalizeIndexOptionValue, l as nameOf } from "./naming-CT8tRisJ-DLHKo0Hm.mjs";
2
2
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
3
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
4
  import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
4
5
  import { blindCast } from "@prisma/orm-framework/utils/casts";
5
- import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
6
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
7
7
  import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
8
8
  import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
9
- //#region ../../../2-sql/1-core/schema-ir/dist/types-Cz_bcUWN.mjs
9
+ //#region ../../../2-sql/1-core/schema-ir/dist/types-D0GFxty0.mjs
10
10
  /**
11
11
  * A literal default in the canonical form of the column's values (ADR 254), element by element for
12
12
  * a list column. A `Date` is read as its ISO text first. A value the form refuses is kept as it is,
@@ -820,4 +820,4 @@ var SqlSchemaIR = class extends SqlSchemaIRNode {
820
820
  //#endregion
821
821
  export { relationalNodeGranularity as _, SqlColumnIR as a, SqlSchemaIR as c, SqlUniqueIR as d, assertNode as f, relationalNodeEntityKind as g, defineNonEnumerable as h, SqlColumnDefaultIR as i, SqlSchemaIRNode as l, defaultInCanonicalForm as m, RelationalSchemaNodeKind as n, SqlForeignKeyIR as o, contractDefaultRefusal as p, SqlCheckConstraintIR as r, SqlIndexIR as s, PrimaryKey as t, SqlTableIR as u };
822
822
 
823
- //# sourceMappingURL=types-Cz_bcUWN-CC3lFQOi.mjs.map
823
+ //# sourceMappingURL=types-D0GFxty0-CP8b4dR3.mjs.map