@prisma/orm-family-sql 8.0.0-rc.1-dev.9 → 8.0.0-rc.1-dev.10

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 (211) hide show
  1. package/dist/{ast-UfF480P2.d.mts → ast-DW-oFG2N.d.mts} +3 -3
  2. package/dist/{ast-UfF480P2.d.mts.map → ast-DW-oFG2N.d.mts.map} +1 -1
  3. package/dist/{authoring-type-constructors-Blqoa2Ua-DymjrX_a.mjs → authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs} +2 -2
  4. package/dist/{authoring-type-constructors-Blqoa2Ua-DymjrX_a.mjs.map → authoring-type-constructors-Blqoa2Ua-BR5-FhUN.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-BK_ZTP-3.mjs → codec-descriptor-registry-BQPj9q8O.mjs} +2 -2
  10. package/dist/{codec-descriptor-registry-BK_ZTP-3.mjs.map → codec-descriptor-registry-BQPj9q8O.mjs.map} +1 -1
  11. package/dist/{config-types-DuhCZxnc.d.mts → config-types-JLo8FI3b.d.mts} +4 -4
  12. package/dist/{config-types-DuhCZxnc.d.mts.map → config-types-JLo8FI3b.d.mts.map} +1 -1
  13. package/dist/{config-types-1lEI_abO.mjs → config-types-THGAJYUu.mjs} +2 -2
  14. package/dist/{config-types-1lEI_abO.mjs.map → config-types-THGAJYUu.mjs.map} +1 -1
  15. package/dist/{contract-builder-B5ztYYVI.d.mts → contract-builder-94EfE12M.d.mts} +25 -7
  16. package/dist/{contract-builder-B5ztYYVI.d.mts.map → contract-builder-94EfE12M.d.mts.map} +1 -1
  17. package/dist/{contract-builder-DQ02XiKy.mjs → contract-builder-bNftqD4M.mjs} +18 -3
  18. package/dist/contract-builder-bNftqD4M.mjs.map +1 -0
  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-psl__provider.mjs.map +1 -1
  24. package/dist/contract-ts.d.mts +5 -4
  25. package/dist/contract-ts.mjs +3 -3
  26. package/dist/contract-ts__config-types.d.mts +1 -1
  27. package/dist/contract-ts__config-types.mjs +1 -1
  28. package/dist/contract-ts__contract-builder.d.mts +4 -3
  29. package/dist/contract-ts__contract-builder.mjs +2 -2
  30. package/dist/{contract-view-DB7yHLAp.d.mts → contract-view-CX3RJUrm.d.mts} +2 -2
  31. package/dist/{contract-view-DB7yHLAp.d.mts.map → contract-view-CX3RJUrm.d.mts.map} +1 -1
  32. package/dist/contract.d.mts +14 -14
  33. package/dist/contract.mjs +8 -8
  34. package/dist/contract__contract-view.d.mts +1 -1
  35. package/dist/contract__entity-kinds.d.mts +1 -1
  36. package/dist/contract__entity-kinds.mjs +1 -1
  37. package/dist/contract__factories.d.mts +1 -1
  38. package/dist/contract__factories.mjs +1 -1
  39. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  40. package/dist/contract__foreign-key-materialization.mjs +1 -1
  41. package/dist/contract__index-naming.d.mts +1 -1
  42. package/dist/contract__index-naming.mjs +1 -1
  43. package/dist/contract__index-type-validation.d.mts +1 -1
  44. package/dist/contract__resolve-storage-table.d.mts +1 -1
  45. package/dist/contract__types.d.mts +6 -6
  46. package/dist/contract__types.mjs +3 -3
  47. package/dist/contract__validators.d.mts +1 -1
  48. package/dist/contract__validators.mjs +2 -2
  49. package/dist/{control-JKCfuZLF.d.mts → control-CiDHc3iC.d.mts} +14 -14
  50. package/dist/{control-JKCfuZLF.d.mts.map → control-CiDHc3iC.d.mts.map} +1 -1
  51. package/dist/{control-adapter-C99J7aEF-BvoknoRl.d.mts → control-adapter-C99J7aEF-DWH4HR8s.d.mts} +8 -8
  52. package/dist/{control-adapter-C99J7aEF-BvoknoRl.d.mts.map → control-adapter-C99J7aEF-DWH4HR8s.d.mts.map} +1 -1
  53. package/dist/control-adapter-DpCa7zm_.d.mts +1 -0
  54. package/dist/{control-Bj2zT_YF.mjs → control-jeE2ibQ5.mjs} +8 -8
  55. package/dist/{control-Bj2zT_YF.mjs.map → control-jeE2ibQ5.mjs.map} +1 -1
  56. package/dist/{db-B5PMfDDd-ZnA9Kuky.d.mts → db-B5PMfDDd-DcJie6Go.d.mts} +9 -9
  57. package/dist/{db-B5PMfDDd-ZnA9Kuky.d.mts.map → db-B5PMfDDd-DcJie6Go.d.mts.map} +1 -1
  58. package/dist/{ddl-types-h_3_pXmq-DzkUGplM.d.mts → ddl-types-h_3_pXmq-1i7p99aC.d.mts} +3 -3
  59. package/dist/{ddl-types-h_3_pXmq-DzkUGplM.d.mts.map → ddl-types-h_3_pXmq-1i7p99aC.d.mts.map} +1 -1
  60. package/dist/{derived-checks-BDG-r9XD-CrpFUaO7.mjs → derived-checks-CmJgg-N0-Dt3bpEKZ.mjs} +93 -43
  61. package/dist/derived-checks-CmJgg-N0-Dt3bpEKZ.mjs.map +1 -0
  62. package/dist/{derived-checks-DPdD01O0-CXFJD5al.d.mts → derived-checks-DPdD01O0-BusNrgPr.d.mts} +3 -3
  63. package/dist/{derived-checks-DPdD01O0-CXFJD5al.d.mts.map → derived-checks-DPdD01O0-BusNrgPr.d.mts.map} +1 -1
  64. package/dist/{diff-DDfez6HZ.d.mts → diff-CS3BDvZD.d.mts} +8 -8
  65. package/dist/{diff-DDfez6HZ.d.mts.map → diff-CS3BDvZD.d.mts.map} +1 -1
  66. package/dist/{entity-kinds-3IFQq7Ho-DB6IN-V6.mjs → entity-kinds-BP9JRPX9-oeJ-t1iG.mjs} +14 -5
  67. package/dist/entity-kinds-BP9JRPX9-oeJ-t1iG.mjs.map +1 -0
  68. package/dist/{entity-kinds-FB5fUkUH.d.mts → entity-kinds-CcRX_9l5.d.mts} +4 -4
  69. package/dist/{entity-kinds-FB5fUkUH.d.mts.map → entity-kinds-CcRX_9l5.d.mts.map} +1 -1
  70. package/dist/{expression-CBHseNtv.d.mts → expression-BUmcEWHx.d.mts} +5 -5
  71. package/dist/{expression-CBHseNtv.d.mts.map → expression-BUmcEWHx.d.mts.map} +1 -1
  72. package/dist/{factories-BPmhxoFd.d.mts → factories-DBqPbIcf.d.mts} +4 -4
  73. package/dist/{factories-BPmhxoFd.d.mts.map → factories-DBqPbIcf.d.mts.map} +1 -1
  74. package/dist/{factories-BtnISekg.mjs → factories-MZugewOe.mjs} +3 -3
  75. package/dist/{factories-BtnISekg.mjs.map → factories-MZugewOe.mjs.map} +1 -1
  76. package/dist/family.d.mts +11 -11
  77. package/dist/family.mjs +4 -4
  78. package/dist/family__control-adapter.d.mts +2 -2
  79. package/dist/family__control.d.mts +3 -3
  80. package/dist/family__control.mjs +2 -2
  81. package/dist/family__diff.d.mts +2 -2
  82. package/dist/family__diff.mjs +1 -1
  83. package/dist/family__ir.d.mts +1 -1
  84. package/dist/family__ir.mjs +1 -1
  85. package/dist/family__migration.d.mts +1 -1
  86. package/dist/family__pack.mjs +1 -1
  87. package/dist/family__psl-infer.d.mts +1 -1
  88. package/dist/family__psl-infer.mjs +1 -1
  89. package/dist/family__runtime.d.mts +2 -2
  90. package/dist/{foreign-key-materialization-CetaZvuu.d.mts → foreign-key-materialization-CS5yxHpq.d.mts} +2 -2
  91. package/dist/{foreign-key-materialization-CetaZvuu.d.mts.map → foreign-key-materialization-CS5yxHpq.d.mts.map} +1 -1
  92. package/dist/{foreign-key-materialization-fH6cObko.mjs → foreign-key-materialization-ziwobURR.mjs} +2 -2
  93. package/dist/{foreign-key-materialization-fH6cObko.mjs.map → foreign-key-materialization-ziwobURR.mjs.map} +1 -1
  94. package/dist/{index-COS9qF9d.d.mts → index-CYC083AG.d.mts} +16 -16
  95. package/dist/{index-COS9qF9d.d.mts.map → index-CYC083AG.d.mts.map} +1 -1
  96. package/dist/{index-avHHFCFT.d.mts → index-CwtBEMZr.d.mts} +3 -3
  97. package/dist/{index-avHHFCFT.d.mts.map → index-CwtBEMZr.d.mts.map} +1 -1
  98. package/dist/{index-naming-BfRyBZR4.d.mts → index-naming-BD2dqoTC.d.mts} +2 -2
  99. package/dist/{index-naming-BfRyBZR4.d.mts.map → index-naming-BD2dqoTC.d.mts.map} +1 -1
  100. package/dist/{index-naming-BoGBcMmI-DE0Eu71F.mjs → index-naming-BoGBcMmI-CoehgjMK.mjs} +2 -2
  101. package/dist/{index-naming-BoGBcMmI-DE0Eu71F.mjs.map → index-naming-BoGBcMmI-CoehgjMK.mjs.map} +1 -1
  102. package/dist/{index-type-validation-0NdkDB_n.d.mts → index-type-validation-ko-AixNA.d.mts} +3 -3
  103. package/dist/{index-type-validation-0NdkDB_n.d.mts.map → index-type-validation-ko-AixNA.d.mts.map} +1 -1
  104. package/dist/{interpreter-5WgpL-ax-BIbrd_Xv.mjs → interpreter-BDZ_Y5U--CWQ831IX.mjs} +88 -4
  105. package/dist/interpreter-BDZ_Y5U--CWQ831IX.mjs.map +1 -0
  106. package/dist/{ir-VWQX6aGP.d.mts → ir-DS7g_cyQ.d.mts} +3 -3
  107. package/dist/{ir-VWQX6aGP.d.mts.map → ir-DS7g_cyQ.d.mts.map} +1 -1
  108. package/dist/lane-query-builder.d.mts +4 -4
  109. package/dist/middleware-BDVd5Hbn.d.mts +1 -0
  110. package/dist/{middleware-eb7YwdD4-CiyaANOv.d.mts → middleware-eb7YwdD4-DPIUcY9j.d.mts} +2 -2
  111. package/dist/{middleware-eb7YwdD4-CiyaANOv.d.mts.map → middleware-eb7YwdD4-DPIUcY9j.d.mts.map} +1 -1
  112. package/dist/{migration-DvCs5-4I.d.mts → migration-hktwXU_H.d.mts} +4 -4
  113. package/dist/{migration-DvCs5-4I.d.mts.map → migration-hktwXU_H.d.mts.map} +1 -1
  114. package/dist/{naming-CEGRBbyW-BOa9Eun0.mjs → naming-BWkuWJJK-zuGIIJ49.mjs} +18 -3
  115. package/dist/naming-BWkuWJJK-zuGIIJ49.mjs.map +1 -0
  116. package/dist/{naming-DvlNocom-ClcApdiR.d.mts → naming-BsvzQPOq-qOWmknyp.d.mts} +17 -3
  117. package/dist/naming-BsvzQPOq-qOWmknyp.d.mts.map +1 -0
  118. package/dist/operations.d.mts +1 -1
  119. package/dist/orm-client.d.mts +11 -11
  120. package/dist/orm-client.mjs +1 -1
  121. package/dist/plan-Ba8TRfem.d.mts +2 -0
  122. package/dist/{plan-Bmp5R9sq-mVFXvLM7.d.mts → plan-Bmp5R9sq-BYkfwppR.d.mts} +4 -4
  123. package/dist/{plan-Bmp5R9sq-mVFXvLM7.d.mts.map → plan-Bmp5R9sq-BYkfwppR.d.mts.map} +1 -1
  124. package/dist/{psl-infer-f5BgyRKm.mjs → psl-infer-Z4wA2xpx.mjs} +2 -2
  125. package/dist/{psl-infer-f5BgyRKm.mjs.map → psl-infer-Z4wA2xpx.mjs.map} +1 -1
  126. package/dist/{psl-infer-Dp_hwubv.d.mts → psl-infer-zSNyTUPT.d.mts} +3 -3
  127. package/dist/{psl-infer-Dp_hwubv.d.mts.map → psl-infer-zSNyTUPT.d.mts.map} +1 -1
  128. package/dist/query-lane-context-CZEGLV1r.d.mts +1 -0
  129. package/dist/{query-lane-context-DjyAyYht-DdovdGjc.d.mts → query-lane-context-DjyAyYht-BWgx-nsP.d.mts} +5 -5
  130. package/dist/{query-lane-context-DjyAyYht-DdovdGjc.d.mts.map → query-lane-context-DjyAyYht-BWgx-nsP.d.mts.map} +1 -1
  131. package/dist/relational-core.d.mts +11 -11
  132. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  133. package/dist/relational-core__ast.d.mts +3 -3
  134. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  135. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  136. package/dist/relational-core__contract-free.d.mts +3 -3
  137. package/dist/relational-core__expression.d.mts +1 -1
  138. package/dist/relational-core__middleware.d.mts +2 -2
  139. package/dist/relational-core__plan.d.mts +3 -3
  140. package/dist/relational-core__query-lane-context.d.mts +2 -2
  141. package/dist/relational-core__types.d.mts +2 -2
  142. package/dist/{resolve-storage-table-BJYVl94P.d.mts → resolve-storage-table-CQsGt37y.d.mts} +3 -3
  143. package/dist/{resolve-storage-table-BJYVl94P.d.mts.map → resolve-storage-table-CQsGt37y.d.mts.map} +1 -1
  144. package/dist/{runtime-CiGC1spO.d.mts → runtime-Cl4WEBC7.d.mts} +3 -3
  145. package/dist/{runtime-CiGC1spO.d.mts.map → runtime-Cl4WEBC7.d.mts.map} +1 -1
  146. package/dist/runtime.d.mts +3 -3
  147. package/dist/runtime.mjs +1 -1
  148. package/dist/{schema-differ-DpG_gnur-BgbN2De2.d.mts → schema-differ-DpG_gnur-BYIE9qrd.d.mts} +5 -5
  149. package/dist/{schema-differ-DpG_gnur-BgbN2De2.d.mts.map → schema-differ-DpG_gnur-BYIE9qrd.d.mts.map} +1 -1
  150. package/dist/schema-ir.d.mts +1 -1
  151. package/dist/schema-ir.mjs +1 -1
  152. package/dist/schema-ir__naming.d.mts +2 -2
  153. package/dist/schema-ir__naming.mjs +2 -2
  154. package/dist/schema-ir__types.d.mts +2 -2
  155. package/dist/schema-ir__types.mjs +1 -1
  156. package/dist/{schema-verify-C_PEdlAr-JK3UgFWU.mjs → schema-verify-C_PEdlAr-CIgsqZ4M.mjs} +2 -2
  157. package/dist/{schema-verify-C_PEdlAr-JK3UgFWU.mjs.map → schema-verify-C_PEdlAr-CIgsqZ4M.mjs.map} +1 -1
  158. package/dist/{serialized-index-B6udRZV1-Ciet0tVA.mjs → serialized-index-BhiuLIBO-CRf7KRr_.mjs} +4 -4
  159. package/dist/{serialized-index-B6udRZV1-Ciet0tVA.mjs.map → serialized-index-BhiuLIBO-CRf7KRr_.mjs.map} +1 -1
  160. package/dist/{serialized-index-CvprUx-6-CX0DYGLe.d.mts → serialized-index-CEzaHjsj-DM-61QzZ.d.mts} +4 -4
  161. package/dist/serialized-index-CEzaHjsj-DM-61QzZ.d.mts.map +1 -0
  162. package/dist/{sql-contract-serializer-2oBWuxTe-Bp9QfUjI.mjs → sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs} +4 -4
  163. package/dist/{sql-contract-serializer-2oBWuxTe-Bp9QfUjI.mjs.map → sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map} +1 -1
  164. package/dist/{sql-execution-plan-Da_d82pz-g3khvnbo.d.mts → sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts} +2 -2
  165. package/dist/{sql-execution-plan-Da_d82pz-g3khvnbo.d.mts.map → sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts.map} +1 -1
  166. package/dist/{sql-index-DsI8HAeK-SazZYeA2.d.mts → sql-index-DsI8HAeK-DsSFxBGF.d.mts} +2 -2
  167. package/dist/{sql-index-DsI8HAeK-SazZYeA2.d.mts.map → sql-index-DsI8HAeK-DsSFxBGF.d.mts.map} +1 -1
  168. package/dist/{sql-storage-aEsH6Fnv-_bWH3uY3.d.mts → sql-storage-DCUlYs47-Cosit03s.d.mts} +3 -3
  169. package/dist/{sql-storage-aEsH6Fnv-_bWH3uY3.d.mts.map → sql-storage-DCUlYs47-Cosit03s.d.mts.map} +1 -1
  170. package/dist/{storage-table-BcDudZC5-DZNZhjf2.mjs → storage-table-BDY-lx9O-t7-IoZ2B.mjs} +4 -3
  171. package/dist/{storage-table-BcDudZC5-DZNZhjf2.mjs.map → storage-table-BDY-lx9O-t7-IoZ2B.mjs.map} +1 -1
  172. package/dist/{storage-table-BTVeIKBx-Ba6wCjG5.d.mts → storage-table-DBbCqpt7-PAuyeZA6.d.mts} +8 -4
  173. package/dist/storage-table-DBbCqpt7-PAuyeZA6.d.mts.map +1 -0
  174. package/dist/{types-UhDfY1iX-C5wOQ0D5.mjs → types-Bj2O1m67-BLTU_6HK.mjs} +3 -3
  175. package/dist/{types-UhDfY1iX-C5wOQ0D5.mjs.map → types-Bj2O1m67-BLTU_6HK.mjs.map} +1 -1
  176. package/dist/{types-BwePDa3m-CrVQ_8YI.d.mts → types-BwePDa3m-CMy7CB9N.d.mts} +2 -2
  177. package/dist/{types-BwePDa3m-CrVQ_8YI.d.mts.map → types-BwePDa3m-CMy7CB9N.d.mts.map} +1 -1
  178. package/dist/{types-BpPwiK2b-DCMVWQ_F.d.mts → types-CYq2Cbzw-xEntZSCk.d.mts} +6 -6
  179. package/dist/{types-BpPwiK2b-DCMVWQ_F.d.mts.map → types-CYq2Cbzw-xEntZSCk.d.mts.map} +1 -1
  180. package/dist/types-DEBm1lFa.d.mts +1 -0
  181. package/dist/{types-CuvwcWTE.mjs → types-DHzMt9jy.mjs} +2 -2
  182. package/dist/{types-CuvwcWTE.mjs.map → types-DHzMt9jy.mjs.map} +1 -1
  183. package/dist/{types-C1F8xk0m-7rMwgIR6.d.mts → types-DtDXwS0i-BjB1HLTY.d.mts} +3 -3
  184. package/dist/{types-C1F8xk0m-7rMwgIR6.d.mts.map → types-DtDXwS0i-BjB1HLTY.d.mts.map} +1 -1
  185. package/dist/{types-BL_h3id0.d.mts → types-DuriYH5B.d.mts} +6 -6
  186. package/dist/{types-BL_h3id0.d.mts.map → types-DuriYH5B.d.mts.map} +1 -1
  187. package/dist/{types-IqZMLrFC-CcORLTOK.d.mts → types-IqZMLrFC-BXR6F1nU.d.mts} +9 -9
  188. package/dist/{types-IqZMLrFC-CcORLTOK.d.mts.map → types-IqZMLrFC-BXR6F1nU.d.mts.map} +1 -1
  189. package/dist/types-KK31t3v0.d.mts +1 -0
  190. package/dist/{types-dD8JJfeD-CS9uMlzW.d.mts → types-dD8JJfeD-D8LDAPQW.d.mts} +10 -10
  191. package/dist/{types-dD8JJfeD-CS9uMlzW.d.mts.map → types-dD8JJfeD-D8LDAPQW.d.mts.map} +1 -1
  192. package/dist/{validators-w7IJlTcR.mjs → validators-Bgam9aM2.mjs} +0 -0
  193. package/dist/{validators-w7IJlTcR.mjs.map → validators-Bgam9aM2.mjs.map} +1 -1
  194. package/dist/{validators-Bl1TVj5n.d.mts → validators-CMi9UZNw.d.mts} +4 -3
  195. package/dist/validators-CMi9UZNw.d.mts.map +1 -0
  196. package/package.json +18 -18
  197. package/dist/contract-builder-DQ02XiKy.mjs.map +0 -1
  198. package/dist/control-adapter-BjSrEp2V.d.mts +0 -1
  199. package/dist/derived-checks-BDG-r9XD-CrpFUaO7.mjs.map +0 -1
  200. package/dist/entity-kinds-3IFQq7Ho-DB6IN-V6.mjs.map +0 -1
  201. package/dist/interpreter-5WgpL-ax-BIbrd_Xv.mjs.map +0 -1
  202. package/dist/middleware-B8QoWWIx.d.mts +0 -1
  203. package/dist/naming-CEGRBbyW-BOa9Eun0.mjs.map +0 -1
  204. package/dist/naming-DvlNocom-ClcApdiR.d.mts.map +0 -1
  205. package/dist/plan-Cl6aCuij.d.mts +0 -2
  206. package/dist/query-lane-context-BhDJZFMh.d.mts +0 -1
  207. package/dist/serialized-index-CvprUx-6-CX0DYGLe.d.mts.map +0 -1
  208. package/dist/storage-table-BTVeIKBx-Ba6wCjG5.d.mts.map +0 -1
  209. package/dist/types--gTlnnvl.d.mts +0 -1
  210. package/dist/types-C-KBovJY.d.mts +0 -1
  211. package/dist/validators-Bl1TVj5n.d.mts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { a as StorageTable } from "./storage-table-BTVeIKBx-Ba6wCjG5.mjs";
2
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
1
+ import { a as StorageTable } from "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
2
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
3
3
  //#region ../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts
4
4
  //#region src/resolve-storage-table.d.ts
5
5
  interface ResolvedStorageTable {
@@ -18,4 +18,4 @@ interface ResolvedStorageTable {
18
18
  declare function resolveStorageTable(storage: SqlStorage, tableName: string, namespaceId?: string): ResolvedStorageTable | undefined;
19
19
  //#endregion
20
20
  export { resolveStorageTable as n, ResolvedStorageTable as t };
21
- //# sourceMappingURL=resolve-storage-table-BJYVl94P.d.mts.map
21
+ //# sourceMappingURL=resolve-storage-table-CQsGt37y.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-storage-table-BJYVl94P.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts"],"mappings":";;;;UAGU;WACC;WACA,OAAO;;;;;;;;;;;iBAWD,oBAAoB,SAAS,YAAY,mBAAmB,uBAAuB"}
1
+ {"version":3,"file":"resolve-storage-table-CQsGt37y.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts"],"mappings":";;;;UAGU;WACC;WACA,OAAO;;;;;;;;;;;iBAWD,oBAAoB,SAAS,YAAY,mBAAmB,uBAAuB"}
@@ -1,5 +1,5 @@
1
- import "./resolve-storage-table-BJYVl94P.mjs";
2
- import { O as RuntimeMutationDefaultGenerator } from "./index-COS9qF9d.mjs";
1
+ import "./resolve-storage-table-CQsGt37y.mjs";
2
+ import { O as RuntimeMutationDefaultGenerator } from "./index-CYC083AG.mjs";
3
3
  import { ResolvedDomainModel, UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma/orm-framework/contract/types";
4
4
  import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma/orm-framework/components/execution";
5
5
  //#region ../../../2-sql/9-family/dist/runtime.d.mts
@@ -43,4 +43,4 @@ declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRunt
43
43
  declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
44
44
  //#endregion
45
45
  export { timestampNowRuntimeGenerator as a, sqlRuntimeFamilyDescriptor as i, UNBOUND_DOMAIN_NAMESPACE_ID as n, resolveDomainModel as r, ResolvedDomainModel as t };
46
- //# sourceMappingURL=runtime-CiGC1spO.d.mts.map
46
+ //# sourceMappingURL=runtime-Cl4WEBC7.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-CiGC1spO.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
1
+ {"version":3,"file":"runtime-Cl4WEBC7.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
@@ -1,4 +1,4 @@
1
- import { o as MarkerReadResult } from "./ast-UfF480P2.mjs";
2
- import { d as TypeHelperRegistry, r as ExecutionContext } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
3
- import { A as RuntimeQueryable, B as SqlRuntimeDriverInstance, C as PreparedStatementImpl, D as RuntimeFamilyAdapter, E as RuntimeConnection, F as SqlMiddleware, G as TelemetryOutcome, H as SqlRuntimeExtensionInstance, I as SqlMiddlewareContext, J as createExecutionContext, K as TransactionContext, L as SqlRuntimeAdapterDescriptor, M as RuntimeTransaction, N as SqlExecutionStack, O as RuntimeMutationDefaultGenerator, P as SqlExecutionStackWithDriver, Q as withTransaction, R as SqlRuntimeAdapterInstance, S as PreparedStatement, T as Runtime, U as SqlRuntimeTargetDescriptor, V as SqlRuntimeExtensionDescriptor, W as SqlStaticContributions, X as deriveParamMetadata, Y as createSqlExecutionStack, Z as encodeParamsWithMetadata, _ as GeneratorStability, a as budgets, b as ParamsFromDeclaration, c as lints, d as validateContractCodecMappings, f as BindSiteParams, g as DeclaredNullable, h as DeclaredCodecId, i as Log, j as RuntimeTelemetryEvent, k as RuntimeParameterizedCodecDescriptor, l as lowerSqlPlan, m as Declaration, n as BudgetsOptions, o as createAstCodecRegistry, p as ConnectionProvider, q as VerifyMarkerOption, r as LintsOptions, s as extractCodecIds, t as AfterExecuteResult, u as validateCodecRegistryCompleteness, v as MarkerReader, w as PreparedStatementInternals, x as PrepareCallback, y as ParamSpec, z as SqlRuntimeBase } from "./index-COS9qF9d.mjs";
1
+ import { o as MarkerReadResult } from "./ast-DW-oFG2N.mjs";
2
+ import { d as TypeHelperRegistry, r as ExecutionContext } from "./query-lane-context-DjyAyYht-BWgx-nsP.mjs";
3
+ import { A as RuntimeQueryable, B as SqlRuntimeDriverInstance, C as PreparedStatementImpl, D as RuntimeFamilyAdapter, E as RuntimeConnection, F as SqlMiddleware, G as TelemetryOutcome, H as SqlRuntimeExtensionInstance, I as SqlMiddlewareContext, J as createExecutionContext, K as TransactionContext, L as SqlRuntimeAdapterDescriptor, M as RuntimeTransaction, N as SqlExecutionStack, O as RuntimeMutationDefaultGenerator, P as SqlExecutionStackWithDriver, Q as withTransaction, R as SqlRuntimeAdapterInstance, S as PreparedStatement, T as Runtime, U as SqlRuntimeTargetDescriptor, V as SqlRuntimeExtensionDescriptor, W as SqlStaticContributions, X as deriveParamMetadata, Y as createSqlExecutionStack, Z as encodeParamsWithMetadata, _ as GeneratorStability, a as budgets, b as ParamsFromDeclaration, c as lints, d as validateContractCodecMappings, f as BindSiteParams, g as DeclaredNullable, h as DeclaredCodecId, i as Log, j as RuntimeTelemetryEvent, k as RuntimeParameterizedCodecDescriptor, l as lowerSqlPlan, m as Declaration, n as BudgetsOptions, o as createAstCodecRegistry, p as ConnectionProvider, q as VerifyMarkerOption, r as LintsOptions, s as extractCodecIds, t as AfterExecuteResult, u as validateCodecRegistryCompleteness, v as MarkerReader, w as PreparedStatementInternals, x as PrepareCallback, y as ParamSpec, z as SqlRuntimeBase } from "./index-CYC083AG.mjs";
4
4
  export { type AfterExecuteResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecutionContext, type GeneratorStability, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeMutationDefaultGenerator, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction };
package/dist/runtime.mjs CHANGED
@@ -3,7 +3,7 @@ import { A as PreparedParamRef, z as isQueryAst } from "./types-D-_2ZCos-9q6j1gK
3
3
  import { t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
4
4
  import { t as createSqlParamRefMutator } from "./middleware-CMr4CHNz-DHIUdxlm.mjs";
5
5
  import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-DPV4z8MS.mjs";
6
- import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-BK_ZTP-3.mjs";
6
+ import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-BQPj9q8O.mjs";
7
7
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
8
8
  import { createHash } from "node:crypto";
9
9
  import { assertNever } from "@prisma/orm-framework/utils/internal-error";
@@ -1,7 +1,7 @@
1
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { v as SqlSchemaIRNode } from "./types-C1F8xk0m-7rMwgIR6.mjs";
4
- import "./types-C-KBovJY.mjs";
1
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { v as SqlSchemaIRNode } from "./types-DtDXwS0i-BjB1HLTY.mjs";
4
+ import "./types-DEBm1lFa.mjs";
5
5
  import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
6
6
  import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
7
7
  import { SchemaDiffIssue } from "@prisma/orm-framework/components/control";
@@ -44,4 +44,4 @@ interface SqlSchemaDiffInput {
44
44
  type SqlSchemaDiffFn = (input: SqlSchemaDiffInput) => SqlSchemaDiffResult;
45
45
  //#endregion
46
46
  export { SqlSchemaDiffInput as n, SqlSchemaDiffResult as r, SqlSchemaDiffFn as t };
47
- //# sourceMappingURL=schema-differ-DpG_gnur-BgbN2De2.d.mts.map
47
+ //# sourceMappingURL=schema-differ-DpG_gnur-BYIE9qrd.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-differ-DpG_gnur-BgbN2De2.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/schema-differ-DpG_gnur.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAcU;;WAEC,iBAAiB;;;;;;;;;WASjB,uBAAuB,OAAO,oBAAoB;;;;;;WAMlD,gBAAgB;aACd,QAAQ;;;UAGX;WACC,UAAU,SAAS;WACnB,QAAQ;WACR,qBAAqB,cAAc;;KAEzC,mBAAmB,OAAO,uBAAuB"}
1
+ {"version":3,"file":"schema-differ-DpG_gnur-BYIE9qrd.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/schema-differ-DpG_gnur.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAcU;;WAEC,iBAAiB;;;;;;;;;WASjB,uBAAuB,OAAO,oBAAoB;;;;;;WAMlD,gBAAgB;aACd,QAAQ;;;UAGX;WACC,UAAU,SAAS;WACnB,QAAQ;WACR,qBAAqB,cAAc;;KAEzC,mBAAmB,OAAO,uBAAuB"}
@@ -1,2 +1,2 @@
1
- import { C as SqlUniqueIR, D as relationalNodeEntityKind, E as defineNonEnumerable, O as relationalNodeGranularity, S as SqlTypeMetadataRegistry, T as assertNode, _ as SqlSchemaIRInput, a as SqlCheckConstraintIR, b as SqlTableIRInput, c as SqlColumnDefaultIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlSchemaIR, h as SqlReferentialAction, i as SqlAnnotations, l as SqlColumnIR, m as SqlIndexIRInput, n as PrimaryKeyInput, o as SqlCheckConstraintIRInput, p as SqlIndexIR, r as RelationalSchemaNodeKind, s as SqlColumnDefaultIR, t as PrimaryKey, u as SqlColumnIRInput, v as SqlSchemaIRNode, w as SqlUniqueIRInput, x as SqlTypeMetadata, y as SqlTableIR } from "./types-C1F8xk0m-7rMwgIR6.mjs";
1
+ import { C as SqlUniqueIR, D as relationalNodeEntityKind, E as defineNonEnumerable, O as relationalNodeGranularity, S as SqlTypeMetadataRegistry, T as assertNode, _ as SqlSchemaIRInput, a as SqlCheckConstraintIR, b as SqlTableIRInput, c as SqlColumnDefaultIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlSchemaIR, h as SqlReferentialAction, i as SqlAnnotations, l as SqlColumnIR, m as SqlIndexIRInput, n as PrimaryKeyInput, o as SqlCheckConstraintIRInput, p as SqlIndexIR, r as RelationalSchemaNodeKind, s as SqlColumnDefaultIR, t as PrimaryKey, u as SqlColumnIRInput, v as SqlSchemaIRNode, w as SqlUniqueIRInput, x as SqlTypeMetadata, y as SqlTableIR } from "./types-DtDXwS0i-BjB1HLTY.mjs";
2
2
  export { PrimaryKey, type PrimaryKeyInput, RelationalSchemaNodeKind, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnDefaultIR, type SqlColumnDefaultIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -1,2 +1,2 @@
1
- import { a as SqlColumnIR, c as SqlSchemaIR, d as SqlUniqueIR, f as assertNode, h as relationalNodeGranularity, i as SqlColumnDefaultIR, l as SqlSchemaIRNode, m as relationalNodeEntityKind, n as RelationalSchemaNodeKind, o as SqlForeignKeyIR, p as defineNonEnumerable, r as SqlCheckConstraintIR, s as SqlIndexIR, t as PrimaryKey, u as SqlTableIR } from "./types-UhDfY1iX-C5wOQ0D5.mjs";
1
+ import { a as SqlColumnIR, c as SqlSchemaIR, d as SqlUniqueIR, f as assertNode, h as relationalNodeGranularity, i as SqlColumnDefaultIR, l as SqlSchemaIRNode, m as relationalNodeEntityKind, n as RelationalSchemaNodeKind, o as SqlForeignKeyIR, p as defineNonEnumerable, r as SqlCheckConstraintIR, s as SqlIndexIR, t as PrimaryKey, u as SqlTableIR } from "./types-Bj2O1m67-BLTU_6HK.mjs";
2
2
  export { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnDefaultIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -1,2 +1,2 @@
1
- import { _ as truncateToWireNamePrefixBytes, a as assertWireNamePrefixLength, c as defaultIndexName, d as namingOf, f as namingOfLiveName, g as parseWireName, h as parseNaming, i as WireName, l as formatWireName, m as normalizeSqlBody, n as SqlObjectNaming, o as computeCheckContentHash, p as normalizeIndexOptionValue, r as WIRE_NAME_PREFIX_MAX_BYTES, s as computeIndexContentHash, t as IndexContentHashParts, u as nameOf } from "./naming-DvlNocom-ClcApdiR.mjs";
2
- export { type IndexContentHashParts, type SqlObjectNaming, WIRE_NAME_PREFIX_MAX_BYTES, type WireName, assertWireNamePrefixLength, computeCheckContentHash, computeIndexContentHash, defaultIndexName, formatWireName, nameOf, namingOf, namingOfLiveName, normalizeIndexOptionValue, normalizeSqlBody, parseNaming, parseWireName, truncateToWireNamePrefixBytes };
1
+ import { _ as parseNaming, a as WireName, c as computeCheckContentHash, d as formatWireName, f as nameOf, g as normalizeSqlBody, h as normalizeIndexOptionValue, i as WIRE_NAME_PREFIX_MAX_BYTES, l as computeIndexContentHash, m as namingOfLiveName, n as IndexContentHashParts, o as assertWireNamePrefixLength, p as namingOf, r as SqlObjectNaming, s as composeCheckWirePrefix, t as CheckKind, u as defaultIndexName, v as parseWireName, y as truncateToWireNamePrefixBytes } from "./naming-BsvzQPOq-qOWmknyp.mjs";
2
+ export { type CheckKind, type IndexContentHashParts, type SqlObjectNaming, WIRE_NAME_PREFIX_MAX_BYTES, type WireName, assertWireNamePrefixLength, composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, defaultIndexName, formatWireName, nameOf, namingOf, namingOfLiveName, normalizeIndexOptionValue, normalizeSqlBody, parseNaming, parseWireName, truncateToWireNamePrefixBytes };
@@ -1,2 +1,2 @@
1
- import { a as defaultIndexName, c as namingOf, d as normalizeSqlBody, f as parseNaming, i as computeIndexContentHash, l as namingOfLiveName, m as truncateToWireNamePrefixBytes, n as assertWireNamePrefixLength, o as formatWireName, p as parseWireName, r as computeCheckContentHash, s as nameOf, t as WIRE_NAME_PREFIX_MAX_BYTES, u as normalizeIndexOptionValue } from "./naming-CEGRBbyW-BOa9Eun0.mjs";
2
- export { WIRE_NAME_PREFIX_MAX_BYTES, assertWireNamePrefixLength, computeCheckContentHash, computeIndexContentHash, defaultIndexName, formatWireName, nameOf, namingOf, namingOfLiveName, normalizeIndexOptionValue, normalizeSqlBody, parseNaming, parseWireName, truncateToWireNamePrefixBytes };
1
+ import { a as computeIndexContentHash, c as nameOf, d as normalizeIndexOptionValue, f as normalizeSqlBody, h as truncateToWireNamePrefixBytes, i as computeCheckContentHash, l as namingOf, m as parseWireName, n as assertWireNamePrefixLength, o as defaultIndexName, p as parseNaming, r as composeCheckWirePrefix, s as formatWireName, t as WIRE_NAME_PREFIX_MAX_BYTES, u as namingOfLiveName } from "./naming-BWkuWJJK-zuGIIJ49.mjs";
2
+ export { WIRE_NAME_PREFIX_MAX_BYTES, assertWireNamePrefixLength, composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, defaultIndexName, formatWireName, nameOf, namingOf, namingOfLiveName, normalizeIndexOptionValue, normalizeSqlBody, parseNaming, parseWireName, truncateToWireNamePrefixBytes };
@@ -1,3 +1,3 @@
1
- import { C as SqlUniqueIR, D as relationalNodeEntityKind, E as defineNonEnumerable, O as relationalNodeGranularity, S as SqlTypeMetadataRegistry, T as assertNode, _ as SqlSchemaIRInput, a as SqlCheckConstraintIR, b as SqlTableIRInput, c as SqlColumnDefaultIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlSchemaIR, h as SqlReferentialAction, i as SqlAnnotations, l as SqlColumnIR, m as SqlIndexIRInput, n as PrimaryKeyInput, o as SqlCheckConstraintIRInput, p as SqlIndexIR, r as RelationalSchemaNodeKind, s as SqlColumnDefaultIR, t as PrimaryKey, u as SqlColumnIRInput, v as SqlSchemaIRNode, w as SqlUniqueIRInput, x as SqlTypeMetadata, y as SqlTableIR } from "./types-C1F8xk0m-7rMwgIR6.mjs";
2
- import "./types-C-KBovJY.mjs";
1
+ import { C as SqlUniqueIR, D as relationalNodeEntityKind, E as defineNonEnumerable, O as relationalNodeGranularity, S as SqlTypeMetadataRegistry, T as assertNode, _ as SqlSchemaIRInput, a as SqlCheckConstraintIR, b as SqlTableIRInput, c as SqlColumnDefaultIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlSchemaIR, h as SqlReferentialAction, i as SqlAnnotations, l as SqlColumnIR, m as SqlIndexIRInput, n as PrimaryKeyInput, o as SqlCheckConstraintIRInput, p as SqlIndexIR, r as RelationalSchemaNodeKind, s as SqlColumnDefaultIR, t as PrimaryKey, u as SqlColumnIRInput, v as SqlSchemaIRNode, w as SqlUniqueIRInput, x as SqlTypeMetadata, y as SqlTableIR } from "./types-DtDXwS0i-BjB1HLTY.mjs";
2
+ import "./types-DEBm1lFa.mjs";
3
3
  export { PrimaryKey, type PrimaryKeyInput, RelationalSchemaNodeKind, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnDefaultIR, type SqlColumnDefaultIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -1,2 +1,2 @@
1
- import { a as SqlColumnIR, c as SqlSchemaIR, d as SqlUniqueIR, f as assertNode, h as relationalNodeGranularity, i as SqlColumnDefaultIR, l as SqlSchemaIRNode, m as relationalNodeEntityKind, n as RelationalSchemaNodeKind, o as SqlForeignKeyIR, p as defineNonEnumerable, r as SqlCheckConstraintIR, s as SqlIndexIR, t as PrimaryKey, u as SqlTableIR } from "./types-UhDfY1iX-C5wOQ0D5.mjs";
1
+ import { a as SqlColumnIR, c as SqlSchemaIR, d as SqlUniqueIR, f as assertNode, h as relationalNodeGranularity, i as SqlColumnDefaultIR, l as SqlSchemaIRNode, m as relationalNodeEntityKind, n as RelationalSchemaNodeKind, o as SqlForeignKeyIR, p as defineNonEnumerable, r as SqlCheckConstraintIR, s as SqlIndexIR, t as PrimaryKey, u as SqlTableIR } from "./types-Bj2O1m67-BLTU_6HK.mjs";
2
2
  export { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnDefaultIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -1,4 +1,4 @@
1
- import { l as isStorageTypeInstance } from "./types-CuvwcWTE.mjs";
1
+ import { l as isStorageTypeInstance } from "./types-DHzMt9jy.mjs";
2
2
  import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { blindCast } from "@prisma/orm-framework/utils/casts";
@@ -217,4 +217,4 @@ function verifySqlSchemaByDiff(input) {
217
217
  //#endregion
218
218
  export { computeStorageTypeVerdict as a, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, extractCodecControlHooks as o, classifySqlDiffIssue as r, verifySqlSchemaByDiff as s, classifyDiffEntityKind as t };
219
219
 
220
- //# sourceMappingURL=schema-verify-C_PEdlAr-JK3UgFWU.mjs.map
220
+ //# sourceMappingURL=schema-verify-C_PEdlAr-CIgsqZ4M.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-verify-C_PEdlAr-JK3UgFWU.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,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,WAAW,OAAO,YAAY;CAC5C,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM;EAC3D,IAAI,CAAC,qBAAqB,UAAU,GAAG;EACvC,MAAM,oBAAoB,WAAW,MAAM,WAAW;EACtD,KAAK,MAAM,CAAC,SAAS,SAAS,OAAO,QAAQ,iBAAiB,GAAG;GAChE,uBAAuB;IACtB;IACA;IACA,cAAc,WAAW;IACzB,aAAa;IACb,sBAAsB;GACvB,CAAC;GACD,MAAM,IAAI,SAAS,IAAI;GACvB,OAAO,IAAI,SAAS,WAAW,EAAE;EAClC;CACD;CACA,OAAO;AACR;;;;;;;AASA,SAAS,6BAA6B,OAAO;CAC5C,IAAI,aAAa,KAAK,MAAM,aAAa,OAAO;CAChD,IAAI,aAAa,KAAK,MAAM,gBAAgB,OAAO;CACnD,OAAO;AACR;AACA,SAAS,oBAAoB,eAAe,OAAO;CAClD,OAAO,uBAAuB,eAAe,6BAA6B,KAAK,CAAC;AACjF;AAGA,SAAS,UAAU,OAAO;CACzB,MAAM,OAAO,MAAM,YAAY,MAAM;CACrC,IAAI,SAAS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;CACzB,MAAM,cAAc,iBAAiB,MAAM,YAAY,OAAO,MAAM,SAAS,gBAAgB,WAAW,MAAM,SAAS,cAAc,KAAK;CAC1I,OAAO;EACN;EACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,sCAAsC;EAC3D,SAAS,KAAK,uCAAuC,8CAA8C,UAAU,UAAU,cAAc,IAAI,KAAK,IAAI;EAClJ,UAAU;GACT,aAAa,MAAM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
1
+ {"version":3,"file":"schema-verify-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,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,WAAW,OAAO,YAAY;CAC5C,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM;EAC3D,IAAI,CAAC,qBAAqB,UAAU,GAAG;EACvC,MAAM,oBAAoB,WAAW,MAAM,WAAW;EACtD,KAAK,MAAM,CAAC,SAAS,SAAS,OAAO,QAAQ,iBAAiB,GAAG;GAChE,uBAAuB;IACtB;IACA;IACA,cAAc,WAAW;IACzB,aAAa;IACb,sBAAsB;GACvB,CAAC;GACD,MAAM,IAAI,SAAS,IAAI;GACvB,OAAO,IAAI,SAAS,WAAW,EAAE;EAClC;CACD;CACA,OAAO;AACR;;;;;;;AASA,SAAS,6BAA6B,OAAO;CAC5C,IAAI,aAAa,KAAK,MAAM,aAAa,OAAO;CAChD,IAAI,aAAa,KAAK,MAAM,gBAAgB,OAAO;CACnD,OAAO;AACR;AACA,SAAS,oBAAoB,eAAe,OAAO;CAClD,OAAO,uBAAuB,eAAe,6BAA6B,KAAK,CAAC;AACjF;AAGA,SAAS,UAAU,OAAO;CACzB,MAAM,OAAO,MAAM,YAAY,MAAM;CACrC,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KAAK,cAAc;CACzB,MAAM,cAAc,iBAAiB,MAAM,YAAY,OAAO,MAAM,SAAS,gBAAgB,WAAW,MAAM,SAAS,cAAc,KAAK;CAC1I,OAAO;EACN;EACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,sCAAsC;EAC3D,SAAS,KAAK,uCAAuC,8CAA8C,UAAU,UAAU,cAAc,IAAI,KAAK,IAAI;EAClJ,UAAU;GACT,aAAa,MAAM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
@@ -1,8 +1,8 @@
1
- import { f as parseNaming } from "./naming-CEGRBbyW-BOa9Eun0.mjs";
2
- import { o as SqlNode } from "./storage-table-BcDudZC5-DZNZhjf2.mjs";
1
+ import { p as parseNaming } from "./naming-BWkuWJJK-zuGIIJ49.mjs";
2
+ import { o as SqlNode } from "./storage-table-BDY-lx9O-t7-IoZ2B.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-B6udRZV1.mjs
5
+ //#region ../../../2-sql/1-core/contract/dist/serialized-index-BhiuLIBO.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-B6udRZV1-Ciet0tVA.mjs.map
74
+ //# sourceMappingURL=serialized-index-BhiuLIBO-CRf7KRr_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialized-index-B6udRZV1-Ciet0tVA.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-B6udRZV1.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-BcDudZC5.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-B6udRZV1.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-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,6 +1,6 @@
1
- import { n as IndexElements, r as IndexInput } from "./sql-index-DsI8HAeK-SazZYeA2.mjs";
2
- import { n as CheckConstraintInput } from "./storage-table-BTVeIKBx-Ba6wCjG5.mjs";
3
- //#region ../../../2-sql/1-core/contract/dist/serialized-index-CvprUx-6.d.mts
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
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-CvprUx-6-CX0DYGLe.d.mts.map
44
+ //# sourceMappingURL=serialized-index-CEzaHjsj-DM-61QzZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialized-index-CEzaHjsj-DM-61QzZ.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-CEzaHjsj.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,7 +1,7 @@
1
1
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
2
- import { f as composeSqlEntityKinds } from "./entity-kinds-3IFQq7Ho-DB6IN-V6.mjs";
3
- import { a as SqlStorage, s as isMaterializedSqlNamespace } from "./types-CuvwcWTE.mjs";
4
- import { r as createSqlContractSchema, s as validateSqlContractFully } from "./validators-w7IJlTcR.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";
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-Bp9QfUjI.mjs.map
171
+ //# sourceMappingURL=sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-contract-serializer-2oBWuxTe-Bp9QfUjI.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,UAAU,IAAI,KAAK;CACpG;CACA,oBAAoB,MAAM;EACzB,MAAM,YAAY,KAAK,0BAA0B,IAAI;EACrD,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,KAAK,wBAAwB,QAAQ;CAC7C;CACA,kBAAkB,UAAU;EAC3B,OAAO;CACR;CACA,sBAAsB,iCAAiC;CACvD,cAAc,iCAAiC;CAC/C,0BAA0B,MAAM;EAC/B,OAAO,yBAAyB,MAAM,KAAK,mBAAmB,KAAK,IAAI,EAAE,gBAAgB,KAAK,eAAe,IAAI,KAAK,CAAC;CACxH;CACA,kBAAkB,WAAW;EAC5B,MAAM,QAAQ,UAAU,QAAQ;EAChC,MAAM,gBAAgB,UAAU,KAAK,IAAI,OAAO,YAAY,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,MAAM,KAAK,wBAAwB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../../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-2oBW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,IAAI;EACrD,IAAI,YAAY,KAAK,GAAG,OAAO;EAC/B,OAAO,UAAU,QAAQ,KAAK,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,4 +1,4 @@
1
- import { m as AnyQueryAst } from "./types-BwePDa3m-CrVQ_8YI.mjs";
1
+ import { m as AnyQueryAst } from "./types-BwePDa3m-CMy7CB9N.mjs";
2
2
  import { ExecutionPlan } from "@prisma/orm-framework/components/runtime";
3
3
  //#region ../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-Da_d82pz.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-Da_d82pz-g3khvnbo.d.mts.map
32
+ //# sourceMappingURL=sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-execution-plan-Da_d82pz-g3khvnbo.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-Da_d82pz.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;UAuBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
1
+ {"version":3,"file":"sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-Da_d82pz.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;UAuBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
@@ -1,5 +1,5 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { n as SqlObjectNaming } from "./naming-DvlNocom-ClcApdiR.mjs";
2
+ import { r as SqlObjectNaming } from "./naming-BsvzQPOq-qOWmknyp.mjs";
3
3
  //#region ../../../2-sql/1-core/contract/dist/sql-index-DsI8HAeK.d.mts
4
4
  //#region src/ir/sql-index.d.ts
5
5
  /**
@@ -69,4 +69,4 @@ declare class Index extends SqlNode {
69
69
  }
70
70
  //#endregion
71
71
  export { IndexElements as n, IndexInput as r, Index as t };
72
- //# sourceMappingURL=sql-index-DsI8HAeK-SazZYeA2.d.mts.map
72
+ //# sourceMappingURL=sql-index-DsI8HAeK-DsSFxBGF.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-index-DsI8HAeK-SazZYeA2.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-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,10 +1,10 @@
1
1
  import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
2
- import { a as StorageTable } from "./storage-table-BTVeIKBx-Ba6wCjG5.mjs";
2
+ import { a as StorageTable } from "./storage-table-DBbCqpt7-PAuyeZA6.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-aEsH6Fnv.d.mts
7
+ //#region ../../../2-sql/1-core/contract/dist/sql-storage-DCUlYs47.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-aEsH6Fnv-_bWH3uY3.d.mts.map
171
+ //# sourceMappingURL=sql-storage-DCUlYs47-Cosit03s.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-storage-aEsH6Fnv-_bWH3uY3.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-storage-aEsH6Fnv.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-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,9 +1,9 @@
1
- import { s as nameOf } from "./naming-CEGRBbyW-BOa9Eun0.mjs";
1
+ import { c as nameOf } from "./naming-BWkuWJJK-zuGIIJ49.mjs";
2
2
  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-BcDudZC5.mjs
6
+ //#region ../../../2-sql/1-core/contract/dist/storage-table-BDY-lx9O.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.
@@ -217,6 +217,7 @@ var StorageColumn = class extends SqlNode {
217
217
  this.codecId = input.codecId;
218
218
  this.nullable = input.nullable;
219
219
  if (input.many !== void 0) this.many = input.many;
220
+ if (input.noCheck !== void 0) this.noCheck = input.noCheck;
220
221
  if (input.typeParams !== void 0) this.typeParams = input.typeParams;
221
222
  if (input.typeRef !== void 0) this.typeRef = input.typeRef;
222
223
  if (input.default !== void 0) this.default = input.default;
@@ -283,4 +284,4 @@ var StorageTable = class StorageTable extends SqlNode {
283
284
  //#endregion
284
285
  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 };
285
286
 
286
- //# sourceMappingURL=storage-table-BcDudZC5-DZNZhjf2.mjs.map
287
+ //# sourceMappingURL=storage-table-BDY-lx9O-t7-IoZ2B.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-table-BcDudZC5-DZNZhjf2.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-BcDudZC5.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 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};\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 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};\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 extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = input.source instanceof ForeignKeyReference ? input.source : new ForeignKeyReference(input.source);\n\t\tthis.target = input.target instanceof ForeignKeyReference ? input.target : new ForeignKeyReference(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};\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 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};\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 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.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};\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 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};\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, col instanceof StorageColumn ? col : new StorageColumn(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof UniqueConstraint ? u : new UniqueConstraint(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map((i) => i instanceof Index ? i : new Index(i)));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof ForeignKey ? fk : new ForeignKey(fk)));\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-BcDudZC5.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;;;;;;;;;;;;;;AAgBA,IAAI,kBAAkB,MAAM,wBAAwB,QAAQ;CAC3D;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,yEAAyE,SAAS;EAC3I,KAAK,OAAO;EACZ,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,aAAa,MAAM;EACxB,WAAW,IAAI;CAChB;;;;;;;CAOA,OAAO,KAAK,OAAO;EAClB,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI,gBAAgB,KAAK;CAC5E;AACD;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,QAAQ,cAAc,QAAQ;CACjC;CACA;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BAAgB,MAAM,IAAI,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC;EACxK,IAAI,MAAM,eAAe,KAAK,GAAG,KAAK,aAAa,MAAM,sBAAsB,aAAa,MAAM,aAAa,IAAI,WAAW,MAAM,UAAU;EAC9I,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,KAAK,MAAM,aAAa,mBAAmB,IAAI,IAAI,iBAAiB,CAAC,CAAC,CAAC;EAClH,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,KAAK,MAAM,aAAa,QAAQ,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;EAC5F,KAAK,cAAc,OAAO,OAAO,MAAM,YAAY,KAAK,OAAO,cAAc,aAAa,KAAK,IAAI,WAAW,EAAE,CAAC,CAAC;EAClH,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,WAAW,KAAK,KAAK,MAAM,OAAO,SAAS,GAAG,KAAK,SAAS,OAAO,OAAO,MAAM,OAAO,IAAI,gBAAgB,IAAI,CAAC;EAC1H,WAAW,IAAI;CAChB;;;;;;;;CAQA,OAAO,GAAG,OAAO;EAChB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,OAAO,aAAa,SAAS,aAAa,SAAS,aAAa,SAAS,iBAAiB;CAC3F;CACA,OAAO,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
1
+ {"version":3,"file":"storage-table-BDY-lx9O-t7-IoZ2B.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-BDY-lx9O.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 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};\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 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};\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 extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = input.source instanceof ForeignKeyReference ? input.source : new ForeignKeyReference(input.source);\n\t\tthis.target = input.target instanceof ForeignKeyReference ? input.target : new ForeignKeyReference(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};\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 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};\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 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};\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 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};\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, col instanceof StorageColumn ? col : new StorageColumn(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof UniqueConstraint ? u : new UniqueConstraint(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map((i) => i instanceof Index ? i : new Index(i)));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof ForeignKey ? fk : new ForeignKey(fk)));\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-BDY-lx9O.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;;;;;;;;;;;;;;AAgBA,IAAI,kBAAkB,MAAM,wBAAwB,QAAQ;CAC3D;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,yEAAyE,SAAS;EAC3I,KAAK,OAAO;EACZ,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,aAAa,MAAM;EACxB,WAAW,IAA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