@prisma/orm-family-sql 8.0.0-rc.1-dev.13 → 8.0.0-rc.1-dev.15

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 (201) hide show
  1. package/dist/{ast-Du28qINj.d.mts → ast-Px7aAd_0.d.mts} +3 -3
  2. package/dist/{ast-Du28qINj.d.mts.map → ast-Px7aAd_0.d.mts.map} +1 -1
  3. package/dist/{authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs → authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs} +2 -2
  4. package/dist/{authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs.map → authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs.map} +1 -1
  5. package/dist/builder.d.mts +2 -2
  6. package/dist/builder__runtime.d.mts +9 -9
  7. package/dist/builder__runtime.mjs +1 -1
  8. package/dist/builder__types.d.mts +2 -2
  9. package/dist/{codec-descriptor-registry-BQPj9q8O.mjs → codec-descriptor-registry-DMUcCfyb.mjs} +2 -2
  10. package/dist/{codec-descriptor-registry-BQPj9q8O.mjs.map → codec-descriptor-registry-DMUcCfyb.mjs.map} +1 -1
  11. package/dist/{config-types-THGAJYUu.mjs → config-types-D7vjxNMf.mjs} +2 -2
  12. package/dist/{config-types-THGAJYUu.mjs.map → config-types-D7vjxNMf.mjs.map} +1 -1
  13. package/dist/{config-types-JLo8FI3b.d.mts → config-types-ktywvY7L.d.mts} +4 -4
  14. package/dist/{config-types-JLo8FI3b.d.mts.map → config-types-ktywvY7L.d.mts.map} +1 -1
  15. package/dist/{contract-builder-bNftqD4M.mjs → contract-builder-BFN7WSed.mjs} +3 -3
  16. package/dist/{contract-builder-bNftqD4M.mjs.map → contract-builder-BFN7WSed.mjs.map} +1 -1
  17. package/dist/{contract-builder-94EfE12M.d.mts → contract-builder-Dqnem9IW.d.mts} +8 -8
  18. package/dist/{contract-builder-94EfE12M.d.mts.map → contract-builder-Dqnem9IW.d.mts.map} +1 -1
  19. package/dist/contract-psl.d.mts +2 -2
  20. package/dist/contract-psl.mjs +1 -1
  21. package/dist/contract-psl__provider.d.mts +2 -2
  22. package/dist/contract-psl__provider.mjs +2 -2
  23. package/dist/contract-ts.d.mts +3 -3
  24. package/dist/contract-ts.mjs +3 -3
  25. package/dist/contract-ts__config-types.d.mts +1 -1
  26. package/dist/contract-ts__config-types.mjs +1 -1
  27. package/dist/contract-ts__contract-builder.d.mts +2 -2
  28. package/dist/contract-ts__contract-builder.mjs +2 -2
  29. package/dist/{contract-view-CX3RJUrm.d.mts → contract-view-C2LYZzWr.d.mts} +2 -2
  30. package/dist/{contract-view-CX3RJUrm.d.mts.map → contract-view-C2LYZzWr.d.mts.map} +1 -1
  31. package/dist/contract.d.mts +17 -17
  32. package/dist/contract.mjs +6 -6
  33. package/dist/contract__contract-view.d.mts +1 -1
  34. package/dist/contract__entity-kinds.d.mts +1 -1
  35. package/dist/contract__entity-kinds.mjs +1 -1
  36. package/dist/contract__factories.d.mts +1 -1
  37. package/dist/contract__factories.mjs +1 -1
  38. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  39. package/dist/contract__index-naming.d.mts +1 -1
  40. package/dist/contract__index-type-validation.d.mts +1 -1
  41. package/dist/contract__referential-action-sql.d.mts +1 -1
  42. package/dist/contract__resolve-storage-table.d.mts +1 -1
  43. package/dist/contract__types.d.mts +8 -8
  44. package/dist/contract__types.mjs +3 -3
  45. package/dist/contract__validators.d.mts +1 -1
  46. package/dist/contract__validators.mjs +2 -2
  47. package/dist/{control-CQGQNGSM.d.mts → control-0OFuH6HK.d.mts} +14 -14
  48. package/dist/{control-CQGQNGSM.d.mts.map → control-0OFuH6HK.d.mts.map} +1 -1
  49. package/dist/{control-jeE2ibQ5.mjs → control-DC3tc4EF.mjs} +7 -7
  50. package/dist/{control-jeE2ibQ5.mjs.map → control-DC3tc4EF.mjs.map} +1 -1
  51. package/dist/{control-adapter-C99J7aEF-DqhVuC1_.d.mts → control-adapter-C99J7aEF-B4MyB0B0.d.mts} +8 -8
  52. package/dist/{control-adapter-C99J7aEF-DqhVuC1_.d.mts.map → control-adapter-C99J7aEF-B4MyB0B0.d.mts.map} +1 -1
  53. package/dist/control-adapter-CTyZpWUT.d.mts +1 -0
  54. package/dist/{db-C5jmOFPM-C8E4QLgQ.d.mts → db-C5jmOFPM-BRijskUO.d.mts} +9 -9
  55. package/dist/{db-C5jmOFPM-C8E4QLgQ.d.mts.map → db-C5jmOFPM-BRijskUO.d.mts.map} +1 -1
  56. package/dist/{ddl-types-CnLSuwXa-BfAdBtW-.d.mts → ddl-types-CnLSuwXa-Dsz9N7Wm.d.mts} +4 -4
  57. package/dist/{ddl-types-CnLSuwXa-BfAdBtW-.d.mts.map → ddl-types-CnLSuwXa-Dsz9N7Wm.d.mts.map} +1 -1
  58. package/dist/{derived-checks-CmJgg-N0-Dt3bpEKZ.mjs → derived-checks-CmJgg-N0-CugkINPW.mjs} +6 -6
  59. package/dist/{derived-checks-CmJgg-N0-Dt3bpEKZ.mjs.map → derived-checks-CmJgg-N0-CugkINPW.mjs.map} +1 -1
  60. package/dist/{derived-checks-DPdD01O0-BusNrgPr.d.mts → derived-checks-DPdD01O0-CE4vJKET.d.mts} +3 -3
  61. package/dist/{derived-checks-DPdD01O0-BusNrgPr.d.mts.map → derived-checks-DPdD01O0-CE4vJKET.d.mts.map} +1 -1
  62. package/dist/{diff-lZRkiTxp.d.mts → diff-dX8KnmWc.d.mts} +8 -8
  63. package/dist/{diff-lZRkiTxp.d.mts.map → diff-dX8KnmWc.d.mts.map} +1 -1
  64. package/dist/{entity-kinds-BP9JRPX9-oeJ-t1iG.mjs → entity-kinds-CCzdAMq3-x9-uzHu1.mjs} +4 -4
  65. package/dist/{entity-kinds-BP9JRPX9-oeJ-t1iG.mjs.map → entity-kinds-CCzdAMq3-x9-uzHu1.mjs.map} +1 -1
  66. package/dist/{entity-kinds-CcRX_9l5.d.mts → entity-kinds-DZzdcuU5.d.mts} +4 -4
  67. package/dist/{entity-kinds-CcRX_9l5.d.mts.map → entity-kinds-DZzdcuU5.d.mts.map} +1 -1
  68. package/dist/{expression-X88ppPyv.d.mts → expression-E67TGFZA.d.mts} +5 -5
  69. package/dist/{expression-X88ppPyv.d.mts.map → expression-E67TGFZA.d.mts.map} +1 -1
  70. package/dist/{factories-MZugewOe.mjs → factories-BIzyHng2.mjs} +2 -2
  71. package/dist/{factories-MZugewOe.mjs.map → factories-BIzyHng2.mjs.map} +1 -1
  72. package/dist/{factories-DBqPbIcf.d.mts → factories-C8VyKQ90.d.mts} +6 -6
  73. package/dist/{factories-DBqPbIcf.d.mts.map → factories-C8VyKQ90.d.mts.map} +1 -1
  74. package/dist/family.d.mts +11 -11
  75. package/dist/family.mjs +3 -3
  76. package/dist/family__control-adapter.d.mts +2 -2
  77. package/dist/family__control.d.mts +3 -3
  78. package/dist/family__control.mjs +2 -2
  79. package/dist/family__diff.d.mts +2 -2
  80. package/dist/family__diff.mjs +1 -1
  81. package/dist/family__ir.d.mts +1 -1
  82. package/dist/family__ir.mjs +1 -1
  83. package/dist/family__migration.d.mts +1 -1
  84. package/dist/family__pack.mjs +1 -1
  85. package/dist/family__psl-infer.d.mts +1 -1
  86. package/dist/family__runtime.d.mts +2 -2
  87. package/dist/{foreign-key-BSy9u4O4-BnsOe5Nf.d.mts → foreign-key-C-iTPuRT-C9ip8zFx.d.mts} +4 -2
  88. package/dist/foreign-key-C-iTPuRT-C9ip8zFx.d.mts.map +1 -0
  89. package/dist/{foreign-key-materialization-CS5yxHpq.d.mts → foreign-key-materialization-CDDVZI8R.d.mts} +4 -4
  90. package/dist/{foreign-key-materialization-CS5yxHpq.d.mts.map → foreign-key-materialization-CDDVZI8R.d.mts.map} +1 -1
  91. package/dist/{index-CYUp-sEz.d.mts → index-BIj_Z-Yu.d.mts} +16 -16
  92. package/dist/{index-CYUp-sEz.d.mts.map → index-BIj_Z-Yu.d.mts.map} +1 -1
  93. package/dist/{index-CwtBEMZr.d.mts → index-DbDTloZS.d.mts} +3 -3
  94. package/dist/{index-CwtBEMZr.d.mts.map → index-DbDTloZS.d.mts.map} +1 -1
  95. package/dist/{index-naming-BD2dqoTC.d.mts → index-naming-BQXnMcXt.d.mts} +2 -2
  96. package/dist/{index-naming-BD2dqoTC.d.mts.map → index-naming-BQXnMcXt.d.mts.map} +1 -1
  97. package/dist/{index-type-validation-ko-AixNA.d.mts → index-type-validation-DS9n07WO.d.mts} +3 -3
  98. package/dist/{index-type-validation-ko-AixNA.d.mts.map → index-type-validation-DS9n07WO.d.mts.map} +1 -1
  99. package/dist/{interpreter-BDZ_Y5U--CWQ831IX.mjs → interpreter-BDZ_Y5U--CMEJIQ40.mjs} +2 -2
  100. package/dist/{interpreter-BDZ_Y5U--CWQ831IX.mjs.map → interpreter-BDZ_Y5U--CMEJIQ40.mjs.map} +1 -1
  101. package/dist/{ir-DS7g_cyQ.d.mts → ir-CVhRa-4t.d.mts} +3 -3
  102. package/dist/{ir-DS7g_cyQ.d.mts.map → ir-CVhRa-4t.d.mts.map} +1 -1
  103. package/dist/lane-query-builder.d.mts +4 -4
  104. package/dist/{middleware-Bp5oIYM0-B-m0jAm8.d.mts → middleware-Bp5oIYM0-9a28aLnt.d.mts} +2 -2
  105. package/dist/{middleware-Bp5oIYM0-B-m0jAm8.d.mts.map → middleware-Bp5oIYM0-9a28aLnt.d.mts.map} +1 -1
  106. package/dist/middleware-Pe2hkf2T.d.mts +1 -0
  107. package/dist/{migration-DoDR93C_.d.mts → migration-C8MAouav.d.mts} +4 -4
  108. package/dist/{migration-DoDR93C_.d.mts.map → migration-C8MAouav.d.mts.map} +1 -1
  109. package/dist/operations.d.mts +1 -1
  110. package/dist/orm-client.d.mts +11 -11
  111. package/dist/orm-client.mjs +1 -1
  112. package/dist/plan-DduVZV0X.d.mts +2 -0
  113. package/dist/{plan-DfLDIdep-qOGizVoO.d.mts → plan-DfLDIdep-CoshEetE.d.mts} +4 -4
  114. package/dist/{plan-DfLDIdep-qOGizVoO.d.mts.map → plan-DfLDIdep-CoshEetE.d.mts.map} +1 -1
  115. package/dist/{psl-infer-zSNyTUPT.d.mts → psl-infer-DmFgn-Ub.d.mts} +3 -3
  116. package/dist/{psl-infer-zSNyTUPT.d.mts.map → psl-infer-DmFgn-Ub.d.mts.map} +1 -1
  117. package/dist/query-lane-context-DojOMvih.d.mts +1 -0
  118. package/dist/{query-lane-context-DyDSQVS--UJOY8AwQ.d.mts → query-lane-context-DyDSQVS--ByM80KpV.d.mts} +5 -5
  119. package/dist/{query-lane-context-DyDSQVS--UJOY8AwQ.d.mts.map → query-lane-context-DyDSQVS--ByM80KpV.d.mts.map} +1 -1
  120. package/dist/{referential-action-sql-Csd6dA8G.d.mts → referential-action-sql-DJ9ps6-S.d.mts} +2 -2
  121. package/dist/referential-action-sql-DJ9ps6-S.d.mts.map +1 -0
  122. package/dist/relational-core.d.mts +11 -11
  123. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  124. package/dist/relational-core__ast.d.mts +3 -3
  125. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  126. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  127. package/dist/relational-core__contract-free.d.mts +4 -4
  128. package/dist/relational-core__expression.d.mts +1 -1
  129. package/dist/relational-core__middleware.d.mts +2 -2
  130. package/dist/relational-core__plan.d.mts +3 -3
  131. package/dist/relational-core__query-lane-context.d.mts +2 -2
  132. package/dist/relational-core__types.d.mts +2 -2
  133. package/dist/{resolve-storage-table-CQsGt37y.d.mts → resolve-storage-table-DFhpOR0X.d.mts} +3 -3
  134. package/dist/{resolve-storage-table-CQsGt37y.d.mts.map → resolve-storage-table-DFhpOR0X.d.mts.map} +1 -1
  135. package/dist/{runtime-CbcODreO.d.mts → runtime-VGVRdwBD.d.mts} +3 -3
  136. package/dist/{runtime-CbcODreO.d.mts.map → runtime-VGVRdwBD.d.mts.map} +1 -1
  137. package/dist/runtime.d.mts +3 -3
  138. package/dist/runtime.mjs +1 -1
  139. package/dist/{schema-differ-DpG_gnur-BYIE9qrd.d.mts → schema-differ-DpG_gnur-B7QINE8f.d.mts} +5 -5
  140. package/dist/{schema-differ-DpG_gnur-BYIE9qrd.d.mts.map → schema-differ-DpG_gnur-B7QINE8f.d.mts.map} +1 -1
  141. package/dist/schema-ir.d.mts +1 -1
  142. package/dist/schema-ir.mjs +1 -1
  143. package/dist/schema-ir__types.d.mts +2 -2
  144. package/dist/schema-ir__types.mjs +1 -1
  145. package/dist/{schema-verify-C_PEdlAr-CIgsqZ4M.mjs → schema-verify-C_PEdlAr-U3MX28Zu.mjs} +2 -2
  146. package/dist/{schema-verify-C_PEdlAr-CIgsqZ4M.mjs.map → schema-verify-C_PEdlAr-U3MX28Zu.mjs.map} +1 -1
  147. package/dist/{serialized-index-CEzaHjsj-DM-61QzZ.d.mts → serialized-index-D9YgVREe-KaLdoijn.d.mts} +4 -4
  148. package/dist/serialized-index-D9YgVREe-KaLdoijn.d.mts.map +1 -0
  149. package/dist/{serialized-index-BhiuLIBO-CRf7KRr_.mjs → serialized-index-DMOkKJdP-JPETIsd7.mjs} +3 -3
  150. package/dist/{serialized-index-BhiuLIBO-CRf7KRr_.mjs.map → serialized-index-DMOkKJdP-JPETIsd7.mjs.map} +1 -1
  151. package/dist/{sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs → sql-contract-serializer-2oBWuxTe-US2zhmuA.mjs} +4 -4
  152. package/dist/{sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map → sql-contract-serializer-2oBWuxTe-US2zhmuA.mjs.map} +1 -1
  153. package/dist/{sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts → sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts} +2 -2
  154. package/dist/{sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts.map → sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts.map} +1 -1
  155. package/dist/{sql-index-DsI8HAeK-DsSFxBGF.d.mts → sql-index-ByAAE7K8-C1h4IS27.d.mts} +3 -2
  156. package/dist/{sql-index-DsI8HAeK-DsSFxBGF.d.mts.map → sql-index-ByAAE7K8-C1h4IS27.d.mts.map} +1 -1
  157. package/dist/{sql-storage-DCUlYs47-Cosit03s.d.mts → sql-storage-CySVsLrY-e9C5Gszx.d.mts} +3 -3
  158. package/dist/{sql-storage-DCUlYs47-Cosit03s.d.mts.map → sql-storage-CySVsLrY-e9C5Gszx.d.mts.map} +1 -1
  159. package/dist/{storage-table-DBbCqpt7-PAuyeZA6.d.mts → storage-table-BLcRrDzz-D4JOM8FC.d.mts} +6 -5
  160. package/dist/storage-table-BLcRrDzz-D4JOM8FC.d.mts.map +1 -0
  161. package/dist/{storage-table-BDY-lx9O-t7-IoZ2B.mjs → storage-table-D8o37IKw-bbcikEu-.mjs} +33 -15
  162. package/dist/storage-table-D8o37IKw-bbcikEu-.mjs.map +1 -0
  163. package/dist/types-C0QjlN2G.d.mts +1 -0
  164. package/dist/{types-CYq2Cbzw-xEntZSCk.d.mts → types-C89S13jo-CGy-V60b.d.mts} +8 -8
  165. package/dist/{types-CYq2Cbzw-xEntZSCk.d.mts.map → types-C89S13jo-CGy-V60b.d.mts.map} +1 -1
  166. package/dist/{types-CLN9Y3BH-DiekC2oe.d.mts → types-CLN9Y3BH-B9xrXW2L.d.mts} +10 -10
  167. package/dist/{types-CLN9Y3BH-DiekC2oe.d.mts.map → types-CLN9Y3BH-B9xrXW2L.d.mts.map} +1 -1
  168. package/dist/{types-Bj2O1m67-BLTU_6HK.mjs → types-CRlrNF8_-xtE1f_Ya.mjs} +14 -5
  169. package/dist/types-CRlrNF8_-xtE1f_Ya.mjs.map +1 -0
  170. package/dist/{types-DuriYH5B.d.mts → types-D6ST3Gkf.d.mts} +8 -8
  171. package/dist/{types-DuriYH5B.d.mts.map → types-D6ST3Gkf.d.mts.map} +1 -1
  172. package/dist/{types-DHzMt9jy.mjs → types-DYXr7yN6.mjs} +2 -2
  173. package/dist/{types-DHzMt9jy.mjs.map → types-DYXr7yN6.mjs.map} +1 -1
  174. package/dist/{types-DtDXwS0i-BjB1HLTY.d.mts → types-H7xjfrKl-CHqi_h5i.d.mts} +5 -2
  175. package/dist/types-H7xjfrKl-CHqi_h5i.d.mts.map +1 -0
  176. package/dist/{types-IqZMLrFC-B8FPWCcB.d.mts → types-IqZMLrFC-Sr3TZmGu.d.mts} +9 -9
  177. package/dist/{types-IqZMLrFC-B8FPWCcB.d.mts.map → types-IqZMLrFC-Sr3TZmGu.d.mts.map} +1 -1
  178. package/dist/{types-ZzeQKmYD-PJlaIsww.d.mts → types-ZzeQKmYD-D1hXGIgd.d.mts} +2 -2
  179. package/dist/{types-ZzeQKmYD-PJlaIsww.d.mts.map → types-ZzeQKmYD-D1hXGIgd.d.mts.map} +1 -1
  180. package/dist/types-yvAngq6d.d.mts +1 -0
  181. package/dist/{unique-constraint-jQWfH7dg-zLWtFp99.d.mts → unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts} +4 -2
  182. package/dist/unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts.map +1 -0
  183. package/dist/{validators-Bgam9aM2.mjs → validators-Bvxcp487.mjs} +0 -0
  184. package/dist/{validators-Bgam9aM2.mjs.map → validators-Bvxcp487.mjs.map} +1 -1
  185. package/dist/{validators-CMi9UZNw.d.mts → validators-DQHTuehE.d.mts} +5 -5
  186. package/dist/{validators-CMi9UZNw.d.mts.map → validators-DQHTuehE.d.mts.map} +1 -1
  187. package/package.json +18 -18
  188. package/dist/control-adapter-DiJGgwVx.d.mts +0 -1
  189. package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts.map +0 -1
  190. package/dist/middleware-g3HMYfJq.d.mts +0 -1
  191. package/dist/plan-D3FQ6FXy.d.mts +0 -2
  192. package/dist/query-lane-context-Dc9gwgtK.d.mts +0 -1
  193. package/dist/referential-action-sql-Csd6dA8G.d.mts.map +0 -1
  194. package/dist/serialized-index-CEzaHjsj-DM-61QzZ.d.mts.map +0 -1
  195. package/dist/storage-table-BDY-lx9O-t7-IoZ2B.mjs.map +0 -1
  196. package/dist/storage-table-DBbCqpt7-PAuyeZA6.d.mts.map +0 -1
  197. package/dist/types-Bj2O1m67-BLTU_6HK.mjs.map +0 -1
  198. package/dist/types-DEBm1lFa.d.mts +0 -1
  199. package/dist/types-DrgaZ2lG.d.mts +0 -1
  200. package/dist/types-DtDXwS0i-BjB1HLTY.d.mts.map +0 -1
  201. package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schema-verify-C_PEdlAr-CIgsqZ4M.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-C_PEdlAr.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = 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//#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: \"CONTRACT.SCHEMA_VERIFICATION_FAILED\" },\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, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, extractCodecControlHooks as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-C_PEdlAr.mjs.map"],"mappings":";;;;;;AAMA,SAAS,qBAAqB,YAAY;CACzC,IAA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A,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-C_PEdlAr-U3MX28Zu.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-C_PEdlAr.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = 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//#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: \"CONTRACT.SCHEMA_VERIFICATION_FAILED\" },\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, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, extractCodecControlHooks as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-C_PEdlAr.mjs.map"],"mappings":";;;;;;AAMA,SAAS,qBAAqB,YAAY;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;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,6 +1,6 @@
1
- import { n as IndexElements, r as IndexInput } from "./sql-index-DsI8HAeK-DsSFxBGF.mjs";
2
- import { n as CheckConstraintInput } from "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
3
- //#region ../../../2-sql/1-core/contract/dist/serialized-index-CEzaHjsj.d.mts
1
+ import { n as IndexElements, r as IndexInput } from "./sql-index-ByAAE7K8-C1h4IS27.mjs";
2
+ import { n as CheckConstraintInput } from "./storage-table-BLcRrDzz-D4JOM8FC.mjs";
3
+ //#region ../../../2-sql/1-core/contract/dist/serialized-index-D9YgVREe.d.mts
4
4
  //#region src/serialized-check-constraint.d.ts
5
5
  /**
6
6
  * A check constraint as `contract.json` stores it: full `name`, optional
@@ -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-CEzaHjsj-DM-61QzZ.d.mts.map
44
+ //# sourceMappingURL=serialized-index-D9YgVREe-KaLdoijn.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialized-index-D9YgVREe-KaLdoijn.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-D9YgVREe.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,8 +1,8 @@
1
1
  import { p as parseNaming } from "./naming-BWkuWJJK-zuGIIJ49.mjs";
2
- import { o as SqlNode } from "./storage-table-BDY-lx9O-t7-IoZ2B.mjs";
2
+ import { o as SqlNode } from "./storage-table-D8o37IKw-bbcikEu-.mjs";
3
3
  import { freezeNode } from "@prisma/orm-framework/components/ir";
4
4
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
5
- //#region ../../../2-sql/1-core/contract/dist/serialized-index-BhiuLIBO.mjs
5
+ //#region ../../../2-sql/1-core/contract/dist/serialized-index-DMOkKJdP.mjs
6
6
  /**
7
7
  * SQL Contract IR node for a value-set entry in a namespace's `valueSet`
8
8
  * map (`SqlNamespace.entries.valueSet`).
@@ -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-BhiuLIBO-CRf7KRr_.mjs.map
74
+ //# sourceMappingURL=serialized-index-DMOkKJdP-JPETIsd7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialized-index-BhiuLIBO-CRf7KRr_.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-BhiuLIBO.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-BDY-lx9O.mjs\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\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-BhiuLIBO.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-DMOkKJdP-JPETIsd7.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-DMOkKJdP.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-D8o37IKw.mjs\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\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-DMOkKJdP.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,7 +1,7 @@
1
1
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
2
- import { f as composeSqlEntityKinds } from "./entity-kinds-BP9JRPX9-oeJ-t1iG.mjs";
3
- import { a as SqlStorage, s as isMaterializedSqlNamespace } from "./types-DHzMt9jy.mjs";
4
- import { r as createSqlContractSchema, s as validateSqlContractFully } from "./validators-Bgam9aM2.mjs";
2
+ import { f as composeSqlEntityKinds } from "./entity-kinds-CCzdAMq3-x9-uzHu1.mjs";
3
+ import { a as SqlStorage, s as isMaterializedSqlNamespace } from "./types-DYXr7yN6.mjs";
4
+ import { r as createSqlContractSchema, s as validateSqlContractFully } from "./validators-Bvxcp487.mjs";
5
5
  import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
6
6
  import { hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
7
7
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
@@ -168,4 +168,4 @@ var SqlContractSerializer = class extends SqlContractSerializerBase {
168
168
  //#endregion
169
169
  export { SqlContractSerializerBase as n, SqlContractSerializer as t };
170
170
 
171
- //# sourceMappingURL=sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map
171
+ //# sourceMappingURL=sql-contract-serializer-2oBWuxTe-US2zhmuA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-2oBWuxTe.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { createSqlContractSchema, validateSqlContractFully } from \"@internal/sql-contract/validators\";\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* 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 = this.parseSqlContractStructure(json);\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn this.constructTargetContract(hydrated);\n\t}\n\tserializeContract(contract) {\n\t\treturn contract;\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\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 = entry.kind;\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 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-2oBWuxTe.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;C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CAAC;CAChC;CACA,wBAAwB,UAAU;EACjC,OAAO;CACR;;;;;;;;;;;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-2oBWuxTe-US2zhmuA.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-2oBWuxTe.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { createSqlContractSchema, validateSqlContractFully } from \"@internal/sql-contract/validators\";\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* 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 = this.parseSqlContractStructure(json);\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn this.constructTargetContract(hydrated);\n\t}\n\tserializeContract(contract) {\n\t\treturn contract;\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\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 = entry.kind;\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 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-2oBWuxTe.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBD,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,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,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,4 +1,4 @@
1
- import { m as AnyQueryAst } from "./types-ZzeQKmYD-PJlaIsww.mjs";
1
+ import { m as AnyQueryAst } from "./types-ZzeQKmYD-D1hXGIgd.mjs";
2
2
  import { ExecutionPlan } from "@prisma/orm-framework/components/runtime";
3
3
  //#region ../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-qxvHnFcA.d.mts
4
4
  //#region src/sql-execution-plan.d.ts
@@ -29,4 +29,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
29
29
  }
30
30
  //#endregion
31
31
  export { SqlExecutionPlan as t };
32
- //# sourceMappingURL=sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts.map
32
+ //# sourceMappingURL=sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-qxvHnFcA.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;UAuBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
1
+ {"version":3,"file":"sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-qxvHnFcA.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;UAuBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
@@ -1,6 +1,6 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
2
  import { r as SqlObjectNaming } from "./naming-BsvzQPOq-qOWmknyp.mjs";
3
- //#region ../../../2-sql/1-core/contract/dist/sql-index-DsI8HAeK.d.mts
3
+ //#region ../../../2-sql/1-core/contract/dist/sql-index-ByAAE7K8.d.mts
4
4
  //#region src/ir/sql-index.d.ts
5
5
  /**
6
6
  * An index's element structure — exactly one of a column tuple or an opaque
@@ -66,7 +66,8 @@ declare class Index extends SqlNode {
66
66
  readonly type?: string;
67
67
  readonly options?: Record<string, unknown>;
68
68
  constructor(input: IndexInput);
69
+ static from(value: Index | IndexInput): Index;
69
70
  }
70
71
  //#endregion
71
72
  export { IndexElements as n, IndexInput as r, Index as t };
72
- //# sourceMappingURL=sql-index-DsI8HAeK-DsSFxBGF.d.mts.map
73
+ //# sourceMappingURL=sql-index-ByAAE7K8-C1h4IS27.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-index-DsI8HAeK-DsSFxBGF.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-index-DsI8HAeK.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"}
1
+ {"version":3,"file":"sql-index-ByAAE7K8-C1h4IS27.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,10 +1,10 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { a as StorageTable } from "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
2
+ import { a as StorageTable } from "./storage-table-BLcRrDzz-D4JOM8FC.mjs";
3
3
  import { t as StorageValueSet } from "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
4
4
  import { Namespace, NamespaceBase, Storage, StorageType } from "@prisma/orm-framework/components/ir";
5
5
  import { StorageHashBase } from "@prisma/orm-framework/contract/types";
6
6
  import { AuthoringContributions } from "@prisma/orm-framework/components/authoring";
7
- //#region ../../../2-sql/1-core/contract/dist/sql-storage-DCUlYs47.d.mts
7
+ //#region ../../../2-sql/1-core/contract/dist/sql-storage-CySVsLrY.d.mts
8
8
  //#region src/ir/storage-type-instance.d.ts
9
9
  /**
10
10
  * Sentinel kind for the legacy codec-triple shape persisted under
@@ -168,4 +168,4 @@ declare class SqlStorage<THash extends string = string> extends SqlNode implemen
168
168
  }
169
169
  //#endregion
170
170
  export { SqlNamespaceEntries as a, SqlStorage as c, StorageTypeInstance as d, StorageTypeInstanceInput as f, toStorageTypeInstance as g, isStorageTypeInstance as h, SqlNamespaceBase as i, SqlStorageInput as l, isSqlAuthoringContributions as m, SqlAuthoringContributions as n, SqlNamespaceFactory as o, isMaterializedSqlNamespace as p, SqlNamespace as r, SqlNamespaceInput as s, CODEC_INSTANCE_KIND as t, SqlStorageTypeEntry as u };
171
- //# sourceMappingURL=sql-storage-DCUlYs47-Cosit03s.d.mts.map
171
+ //# sourceMappingURL=sql-storage-CySVsLrY-e9C5Gszx.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-storage-DCUlYs47-Cosit03s.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-storage-DCUlYs47.d.mts"],"mappings":";;;;;;;;;;;;;;;cAcc;;;;;;;;;UASJ,4BAA4B;WAC3B,aAAa;WACb;WACA;WACA,YAAY;;;;;;;;;UASb;WACC;WACA;WACA,aAAa;;;;;;;iBAOP,sBAAsB,OAAO,2BAA2B;;;;;;iBAMxD,sBAAsB,iBAAiB,SAAS;;;;;;;;;;KAU5D,sBAAsB,sBAAsB;UACvC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;;;;;;KAMhD,uBAAuB,OAAO,sBAAsB;;;;;;;;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
+ {"version":3,"file":"sql-storage-CySVsLrY-e9C5Gszx.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-storage-CySVsLrY.d.mts"],"mappings":";;;;;;;;;;;;;;;cAcc;;;;;;;;;UASJ,4BAA4B;WAC3B,aAAa;WACb;WACA;WACA,YAAY;;;;;;;;;UASb;WACC;WACA;WACA,aAAa;;;;;;;iBAOP,sBAAsB,OAAO,2BAA2B;;;;;;iBAMxD,sBAAsB,iBAAiB,SAAS;;;;;;;;;;KAU5D,sBAAsB,sBAAsB;UACvC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;;;;;;KAMhD,uBAAuB,OAAO,sBAAsB;;;;;;;;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,10 +1,10 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { n as ForeignKeyInput, t as ForeignKey } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
3
- import { i as UniqueConstraintInput, n as PrimaryKeyInput, r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-jQWfH7dg-zLWtFp99.mjs";
2
+ import { n as ForeignKeyInput, t as ForeignKey } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
3
+ import { i as UniqueConstraintInput, n as PrimaryKeyInput, r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-M5TlQnJQ-BiIHJ85k.mjs";
4
4
  import { r as SqlObjectNaming, t as CheckKind } from "./naming-BsvzQPOq-qOWmknyp.mjs";
5
- import { r as IndexInput, t as Index } from "./sql-index-DsI8HAeK-DsSFxBGF.mjs";
5
+ import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-C1h4IS27.mjs";
6
6
  import { ColumnDefault, ControlPolicy, ValueSetRef } from "@prisma/orm-framework/contract/types";
7
- //#region ../../../2-sql/1-core/contract/dist/storage-table-DBbCqpt7.d.mts
7
+ //#region ../../../2-sql/1-core/contract/dist/storage-table-BLcRrDzz.d.mts
8
8
  //#region src/ir/check-constraint.d.ts
9
9
  /**
10
10
  * Construction input for {@link CheckConstraint}. Internal seam (built by
@@ -94,6 +94,7 @@ declare class StorageColumn extends SqlNode {
94
94
  /** Generated-check kinds the author declined for this column. Presence means opted out; never an empty array. */
95
95
  readonly noCheck?: readonly CheckKind[];
96
96
  constructor(input: StorageColumnInput);
97
+ static from(value: StorageColumn | StorageColumnInput): StorageColumn;
97
98
  }
98
99
  //#endregion
99
100
  //#region src/ir/storage-table.d.ts
@@ -139,4 +140,4 @@ declare class StorageTable extends SqlNode {
139
140
  }
140
141
  //#endregion
141
142
  export { StorageTable as a, StorageColumnInput as i, CheckConstraintInput as n, StorageTableInput as o, StorageColumn as r, CheckConstraint as t };
142
- //# sourceMappingURL=storage-table-DBbCqpt7-PAuyeZA6.d.mts.map
143
+ //# sourceMappingURL=storage-table-BLcRrDzz-D4JOM8FC.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-table-BLcRrDzz-D4JOM8FC.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-BLcRrDzz.d.mts"],"mappings":";;;;;;;;;;;;UAWU;;WAEC,QAAQ;;WAER;;;;;;;;;;;;;;;cAeG,wBAAwB;WAC3B;;WAEA;WACA;EACT,YAAY,OAAO;;;;;;;SAOZ,KAAK,OAAO,kBAAkB,uBAAuB;;;;;;;;;;;;;;UAcpD;WACC;WACA;WACA;WACA;WACA,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;;;;;;;;;;;;;;;cAehB,sBAAsB;WACzB;WACA;WACA;WACA;WACA,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"}
@@ -3,7 +3,7 @@ import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
3
3
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
4
4
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
5
5
  import { asNamespaceId } from "@prisma/orm-framework/contract/types";
6
- //#region ../../../2-sql/1-core/contract/dist/storage-table-BDY-lx9O.mjs
6
+ //#region ../../../2-sql/1-core/contract/dist/storage-table-D8o37IKw.mjs
7
7
  /**
8
8
  * SQL family IR node base. Carries the family-level `kind` discriminator
9
9
  * `'sql'` and inherits the framework's `freezeNode` affordance.
@@ -101,7 +101,7 @@ var CheckConstraint = class CheckConstraint extends SqlNode {
101
101
  * alias one (e.g.
102
102
  * `import { Index as SqlIndexNode } from '@internal/sql-contract/types'`).
103
103
  */
104
- var Index = class extends SqlNode {
104
+ var Index = class Index extends SqlNode {
105
105
  name;
106
106
  unique;
107
107
  constructor(input) {
@@ -119,6 +119,9 @@ var Index = class extends SqlNode {
119
119
  if (input.options !== void 0) this.options = input.options;
120
120
  freezeNode(this);
121
121
  }
122
+ static from(value) {
123
+ return value instanceof Index ? value : new Index(value);
124
+ }
122
125
  };
123
126
  /**
124
127
  * SQL Contract IR node for one side (source or target) of a foreign-key
@@ -136,7 +139,7 @@ var Index = class extends SqlNode {
136
139
  * Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`
137
140
  * as the sentinel `namespaceId` for single-namespace (unbound) references.
138
141
  */
139
- var ForeignKeyReference = class extends SqlNode {
142
+ var ForeignKeyReference = class ForeignKeyReference extends SqlNode {
140
143
  namespaceId;
141
144
  tableName;
142
145
  columns;
@@ -148,6 +151,9 @@ var ForeignKeyReference = class extends SqlNode {
148
151
  if (input.spaceId !== void 0) this.spaceId = input.spaceId;
149
152
  freezeNode(this);
150
153
  }
154
+ static from(value) {
155
+ return value instanceof ForeignKeyReference ? value : new ForeignKeyReference(value);
156
+ }
151
157
  };
152
158
  /**
153
159
  * SQL Contract IR node for a table-level foreign-key declaration — the
@@ -169,23 +175,26 @@ var ForeignKeyReference = class extends SqlNode {
169
175
  * regardless of whether the input was a JSON literal or an already-constructed
170
176
  * class instance.
171
177
  */
172
- var ForeignKey = class extends SqlNode {
178
+ var ForeignKey = class ForeignKey extends SqlNode {
173
179
  source;
174
180
  target;
175
181
  constructor(input) {
176
182
  super();
177
- this.source = input.source instanceof ForeignKeyReference ? input.source : new ForeignKeyReference(input.source);
178
- this.target = input.target instanceof ForeignKeyReference ? input.target : new ForeignKeyReference(input.target);
183
+ this.source = ForeignKeyReference.from(input.source);
184
+ this.target = ForeignKeyReference.from(input.target);
179
185
  if (input.name !== void 0) this.name = input.name;
180
186
  if (input.onDelete !== void 0) this.onDelete = input.onDelete;
181
187
  if (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;
182
188
  freezeNode(this);
183
189
  }
190
+ static from(value) {
191
+ return value instanceof ForeignKey ? value : new ForeignKey(value);
192
+ }
184
193
  };
185
194
  /**
186
195
  * SQL Contract IR node for a table's primary-key constraint.
187
196
  */
188
- var PrimaryKey = class extends SqlNode {
197
+ var PrimaryKey = class PrimaryKey extends SqlNode {
189
198
  columns;
190
199
  constructor(input) {
191
200
  super();
@@ -193,6 +202,9 @@ var PrimaryKey = class extends SqlNode {
193
202
  if (input.name !== void 0) this.name = input.name;
194
203
  freezeNode(this);
195
204
  }
205
+ static from(value) {
206
+ return value instanceof PrimaryKey ? value : new PrimaryKey(value);
207
+ }
196
208
  };
197
209
  /**
198
210
  * SQL Contract IR node for a single column entry in `StorageTable.columns`.
@@ -207,7 +219,7 @@ var PrimaryKey = class extends SqlNode {
207
219
  * in the parent `StorageTable.columns: Record<string, StorageColumn>`
208
220
  * map, so a `name` field would be redundant with the key.
209
221
  */
210
- var StorageColumn = class extends SqlNode {
222
+ var StorageColumn = class StorageColumn extends SqlNode {
211
223
  nativeType;
212
224
  codecId;
213
225
  nullable;
@@ -225,11 +237,14 @@ var StorageColumn = class extends SqlNode {
225
237
  if (input.valueSet !== void 0) this.valueSet = input.valueSet;
226
238
  freezeNode(this);
227
239
  }
240
+ static from(value) {
241
+ return value instanceof StorageColumn ? value : new StorageColumn(value);
242
+ }
228
243
  };
229
244
  /**
230
245
  * SQL Contract IR node for a table-level unique constraint.
231
246
  */
232
- var UniqueConstraint = class extends SqlNode {
247
+ var UniqueConstraint = class UniqueConstraint extends SqlNode {
233
248
  columns;
234
249
  constructor(input) {
235
250
  super();
@@ -237,6 +252,9 @@ var UniqueConstraint = class extends SqlNode {
237
252
  if (input.name !== void 0) this.name = input.name;
238
253
  freezeNode(this);
239
254
  }
255
+ static from(value) {
256
+ return value instanceof UniqueConstraint ? value : new UniqueConstraint(value);
257
+ }
240
258
  };
241
259
  /**
242
260
  * SQL Contract IR node for a single table entry in a namespace's
@@ -257,11 +275,11 @@ var StorageTable = class StorageTable extends SqlNode {
257
275
  foreignKeys;
258
276
  constructor(input) {
259
277
  super();
260
- this.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, col instanceof StorageColumn ? col : new StorageColumn(col)])));
261
- if (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(input.primaryKey);
262
- this.uniques = Object.freeze(input.uniques.map((u) => u instanceof UniqueConstraint ? u : new UniqueConstraint(u)));
263
- this.indexes = Object.freeze(input.indexes.map((i) => i instanceof Index ? i : new Index(i)));
264
- this.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof ForeignKey ? fk : new ForeignKey(fk)));
278
+ this.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, StorageColumn.from(col)])));
279
+ if (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);
280
+ this.uniques = Object.freeze(input.uniques.map(UniqueConstraint.from));
281
+ this.indexes = Object.freeze(input.indexes.map(Index.from));
282
+ this.foreignKeys = Object.freeze(input.foreignKeys.map(ForeignKey.from));
265
283
  if (input.control !== void 0) this.control = input.control;
266
284
  if (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(CheckConstraint.from));
267
285
  freezeNode(this);
@@ -284,4 +302,4 @@ var StorageTable = class StorageTable extends SqlNode {
284
302
  //#endregion
285
303
  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 };
286
304
 
287
- //# sourceMappingURL=storage-table-BDY-lx9O-t7-IoZ2B.mjs.map
305
+ //# sourceMappingURL=storage-table-D8o37IKw-bbcikEu-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-table-D8o37IKw-bbcikEu-.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-D8o37IKw.mjs"],"sourcesContent":["import { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { InternalError } from \"@internal/utils/internal-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[]`.\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\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\tnativeType;\n\tcodecId;\n\tnullable;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.nativeType = input.nativeType;\n\t\tthis.codecId = input.codecId;\n\t\tthis.nullable = input.nullable;\n\t\tif (input.many !== void 0) this.many = input.many;\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-D8o37IKw.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,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;;;;;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AAQ,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"}
@@ -0,0 +1 @@
1
+ import "./types-CLN9Y3BH-B9xrXW2L.mjs";
@@ -1,14 +1,14 @@
1
1
  import "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { a as ReferentialAction } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
3
- import "./unique-constraint-jQWfH7dg-zLWtFp99.mjs";
4
- import "./sql-index-DsI8HAeK-DsSFxBGF.mjs";
5
- import "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
2
+ import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
3
+ import "./unique-constraint-M5TlQnJQ-BiIHJ85k.mjs";
4
+ import "./sql-index-ByAAE7K8-C1h4IS27.mjs";
5
+ import "./storage-table-BLcRrDzz-D4JOM8FC.mjs";
6
6
  import "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
7
- import "./sql-storage-DCUlYs47-Cosit03s.mjs";
8
- import "./serialized-index-CEzaHjsj-DM-61QzZ.mjs";
7
+ import "./sql-storage-CySVsLrY-e9C5Gszx.mjs";
8
+ import "./serialized-index-D9YgVREe-KaLdoijn.mjs";
9
9
  import { CodecTrait } from "@prisma/orm-framework/components/codec";
10
10
  import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
11
- //#region ../../../2-sql/1-core/contract/dist/types-CYq2Cbzw.d.mts
11
+ //#region ../../../2-sql/1-core/contract/dist/types-C89S13jo.d.mts
12
12
  //#region src/types.d.ts
13
13
  interface SqlControlDriverInstance<T extends string = string> extends ControlDriverInstance<'sql', T> {
14
14
  query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
@@ -157,4 +157,4 @@ type ExtractAggregateTypes<T> = AggregateTypesOf<ExtractTypeMapsFromContract<T>>
157
157
  type ResolveCodecTypes<TContract, TTypeMaps> = [TTypeMaps] extends [never] ? ExtractCodecTypes<TContract> : CodecTypesOf<TTypeMaps>;
158
158
  //#endregion
159
159
  export { SqlModelStorage as A, QueryOperationSelfSpec as C, ResolveCodecTypes as D, QueryOperationTypesOf as E, TypeMapsPhantomKey as F, applyFkDefaults as I, StorageColumnInputTypesOf as M, StorageColumnTypesOf as N, SqlControlDriverInstance as O, TypeMaps as P, QueryOperationReturn as S, QueryOperationTypesBase as T, FieldInputTypesOf as _, CodecTypesOf as a, NamespacedFieldTypeMap as b, DEFAULT_FK_INDEX as c, ExtractFieldInputTypes as d, ExtractFieldOutputTypes as f, ExtractTypeMapsFromContract as g, ExtractStorageColumnTypes as h, AggregateTypesOf as i, SqlQueryOperationTypes as j, SqlModelFieldStorage as k, ExtractAggregateTypes as l, ExtractStorageColumnInputTypes as m, AggregateResultType as n, ContractWithTypeMaps as o, ExtractQueryOperationTypes as p, AggregateTypesBase as r, DEFAULT_FK_CONSTRAINT as s, AggregateOperationTypes as t, ExtractCodecTypes as u, FieldOutputTypesOf as v, QueryOperationTypeEntry as w, NamespacedStorageColumnTypeMap as x, ForeignKeyOptions as y };
160
- //# sourceMappingURL=types-CYq2Cbzw-xEntZSCk.d.mts.map
160
+ //# sourceMappingURL=types-C89S13jo-CGy-V60b.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CYq2Cbzw-xEntZSCk.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/types-CYq2Cbzw.d.mts"],"mappings":";;;;;;;;;;;;UAWU,yBAAyB,mCAAmC,6BAA6B;EACjG,MAAM,MAAM,yBAAyB,aAAa,8BAA8B;aACrE,MAAM;;;KAGd;WACM;WACA,WAAW;WACX,WAAW;;KAEjB;WACM;WACA;WACA;;KAEN;WACM;WACA;WACA,QAAQ,eAAe;;cAEpB;cACA;iBACG,gBAAgB;EAC/B;EACA;GACC;EACD;EACA;;EAEA;EACA;;KAEG,yBAAyB,eAAe,eAAe;KACvD,iCAAiC,eAAe,eAAe;;;;KAI/D;WACM;WACA;;;;;;;;;KASN;WACM,SAAS,eAAe;WACxB,eAAe;WACf,WAAW;;;KAGjB,qBAAqB,eAAe;KACpC,SAAS,oBAAoB;EAChC;KACG,uBAAuB,6BAA6B,0BAA0B,uBAAuB,0BAA0B,yBAAyB,uBAAuB,yBAAyB,yBAAyB,uBAAuB,4BAA4B,iCAAiC,uBAAuB,iCAAiC,iCAAiC,uBAAuB,wBAAwB,qBAAqB;WAC5c,YAAY;WACZ,qBAAqB;WACrB,kBAAkB;WAClB,iBAAiB;WACjB,oBAAoB;WACpB,yBAAyB;WACzB,gBAAgB;;KAEtB,iBAAiB,MAAM,qBAAqB,wBAAwB;WAC9D,sBAAsB;IAC7B,UAAU,qBAAqB,IAAI,wBAAwB;KAC1D,aAAa,MAAM,qBAAqB,wBAAwB;WAC1D,kBAAkB;IACzB,UAAU;EACZ;KACG,IAAI,wBAAwB;;;;;;;;;KAS5B;WACM;WACA;WACA;;WAEA,iBAAiB;WACjB;WACA;;WAEA;WACA,yBAAyB;WACzB;WACA;;;;;;;;;;KAUN;WACM;aACE;aACA;;;KAGR;WACM,OAAO;WACP,UAAU,kBAAkB;;KAElC,uBAAuB,YAAY;WAC7B;WACA;IACP,UAAU,eAAe,4BAA4B;KACpD,0BAA0B,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B;KAC9D,qBAAqB,MAAM,qBAAqB,wBAAwB;WAClE,0BAA0B;IACjC,UAAU,iCAAiC,IAAI,wBAAwB;KACtE,0BAA0B,MAAM,qBAAqB,wBAAwB;WACvE,+BAA+B;IACtC,UAAU,iCAAiC,IAAI,wBAAwB;KACtE,kBAAkB,KAAK,aAAa,4BAA4B;KAChE,2BAA2B,KAAK,sBAAsB,4BAA4B;KAClF,wBAAwB,KAAK,mBAAmB,4BAA4B;KAC5E,uBAAuB,KAAK,kBAAkB,4BAA4B;KAC1E,0BAA0B,KAAK,qBAAqB,4BAA4B;KAChF,+BAA+B,KAAK,0BAA0B,4BAA4B;KAC1F,sBAAsB,KAAK,iBAAiB,4BAA4B;KACxE,kBAAkB,WAAW,cAAc,6BAA6B,kBAAkB,aAAa,aAAa"}
@@ -1,12 +1,12 @@
1
- import { r as StorageColumn } from "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
2
- import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
3
- import { f as ExtractFieldOutputTypes } from "./types-CYq2Cbzw-xEntZSCk.mjs";
4
- import "./types-DuriYH5B.mjs";
5
- import { t as SqlLoweringSpec } from "./index-CwtBEMZr.mjs";
6
- import { D as ColumnRef, _t as ParamRef } from "./types-ZzeQKmYD-PJlaIsww.mjs";
7
- import { t as SqlExecutionPlan } from "./sql-execution-plan-qxvHnFcA-eC6n5Ek9.mjs";
8
- import { t as SqlQueryPlan } from "./plan-DfLDIdep-qOGizVoO.mjs";
9
- import { r as ExecutionContext } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
1
+ import { r as StorageColumn } from "./storage-table-BLcRrDzz-D4JOM8FC.mjs";
2
+ import { c as SqlStorage } from "./sql-storage-CySVsLrY-e9C5Gszx.mjs";
3
+ import { f as ExtractFieldOutputTypes } from "./types-C89S13jo-CGy-V60b.mjs";
4
+ import "./types-D6ST3Gkf.mjs";
5
+ import { t as SqlLoweringSpec } from "./index-DbDTloZS.mjs";
6
+ import { D as ColumnRef, _t as ParamRef } from "./types-ZzeQKmYD-D1hXGIgd.mjs";
7
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-qxvHnFcA-DdIwfSmv.mjs";
8
+ import { t as SqlQueryPlan } from "./plan-DfLDIdep-CoshEetE.mjs";
9
+ import { r as ExecutionContext } from "./query-lane-context-DyDSQVS--ByM80KpV.mjs";
10
10
  import { Contract } from "@prisma/orm-framework/contract/types";
11
11
  import { ParamSpec } from "@prisma/orm-framework/operations";
12
12
  import { RuntimeExecutor } from "@prisma/orm-framework/components/runtime";
@@ -244,4 +244,4 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
244
244
  }
245
245
  //#endregion
246
246
  export { TableDef as C, TablesOf as E, SqlPlan as S, TableMetadata as T, RawTemplateFactory as _, ColumnsOf as a, SqlBuilderOptions as b, META as c, ModelMetadata as d, OperationTypeSignature as f, RawFunctionOptions as g, RawFactory 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, RawTemplateOptions as v, TableKey as w, SqlOrmPlan as x, RuntimeScope as y };
247
- //# sourceMappingURL=types-CLN9Y3BH-DiekC2oe.d.mts.map
247
+ //# sourceMappingURL=types-CLN9Y3BH-B9xrXW2L.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CLN9Y3BH-DiekC2oe.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/types-CLN9Y3BH.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;KAeK,aAAa,mBAAmB;;;;;;;;;KAShC,eAAe,KAAK,gBAAgB;;;KAGpC,OAAO,YAAY;;;;;;;;;;KAUnB;WACM;aACE,YAAY,SAAS;eACnB,QAAQ,SAAS;;;WAGrB;aACE,YAAY,SAAS;eACnB,SAAS,SAAS,eAAe,SAAS;;;;KAIpD,gBAAgB,kBAAkB,0BAA0B,u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