@prisma/orm-family-sql 8.0.0-rc.18-dev.7 → 8.0.0-rc.18-dev.9

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 (243) hide show
  1. package/dist/{ast-De8XGuVW.mjs → ast-BDwGvnKK.mjs} +4 -30
  2. package/dist/ast-BDwGvnKK.mjs.map +1 -0
  3. package/dist/{ast-Dp6lQXUX.d.mts → ast-DbmdIKFd.d.mts} +6 -14
  4. package/dist/ast-DbmdIKFd.d.mts.map +1 -0
  5. package/dist/{attribute-specs-BgdwJoq3.d.mts → attribute-specs-CKg3a2P_.d.mts} +3 -3
  6. package/dist/{attribute-specs-BgdwJoq3.d.mts.map → attribute-specs-CKg3a2P_.d.mts.map} +1 -1
  7. package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts} +2 -2
  8. package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts.map → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts.map} +1 -1
  9. package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs} +2 -2
  10. package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs.map → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs.map} +1 -1
  11. package/dist/builder.d.mts +3 -3
  12. package/dist/builder__runtime.d.mts +9 -9
  13. package/dist/builder__runtime.mjs +1 -1
  14. package/dist/builder__types.d.mts +5 -5
  15. package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts} +3 -3
  16. package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts.map → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts.map} +1 -1
  17. package/dist/collection-methods-iWGpEfkq.d.mts +1 -0
  18. package/dist/{config-types-Ci51fcnp.d.mts → config-types-C2mASmPh.d.mts} +3 -3
  19. package/dist/{config-types-Ci51fcnp.d.mts.map → config-types-C2mASmPh.d.mts.map} +1 -1
  20. package/dist/{config-types-DyZXyiNb.mjs → config-types-CrREu8Fa.mjs} +2 -2
  21. package/dist/{config-types-DyZXyiNb.mjs.map → config-types-CrREu8Fa.mjs.map} +1 -1
  22. package/dist/{contract-builder-C4fgERNT.d.mts → contract-builder-ClsLO9DI.d.mts} +464 -101
  23. package/dist/contract-builder-ClsLO9DI.d.mts.map +1 -0
  24. package/dist/{contract-builder-B_oFvMWk.mjs → contract-builder-Du_YOA1B.mjs} +10 -9
  25. package/dist/contract-builder-Du_YOA1B.mjs.map +1 -0
  26. package/dist/contract-emitter.d.mts +1 -0
  27. package/dist/contract-emitter.d.mts.map +1 -1
  28. package/dist/contract-emitter.mjs +1 -1
  29. package/dist/contract-prisma7__provider.d.mts +1 -1
  30. package/dist/contract-prisma7__provider.mjs +6 -6
  31. package/dist/contract-psl.d.mts +3 -3
  32. package/dist/contract-psl.d.mts.map +1 -1
  33. package/dist/contract-psl.mjs +1 -1
  34. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  35. package/dist/contract-psl__attribute-specs.mjs +1 -1
  36. package/dist/contract-psl__diagnostics.d.mts +12 -0
  37. package/dist/contract-psl__diagnostics.d.mts.map +1 -0
  38. package/dist/contract-psl__diagnostics.mjs +2 -0
  39. package/dist/contract-psl__provider.d.mts +1 -1
  40. package/dist/contract-psl__provider.mjs +2 -2
  41. package/dist/contract-psl__provider.mjs.map +1 -1
  42. package/dist/contract-ts.d.mts +4 -4
  43. package/dist/contract-ts.mjs +3 -3
  44. package/dist/contract-ts__config-types.d.mts +1 -1
  45. package/dist/contract-ts__config-types.mjs +1 -1
  46. package/dist/contract-ts__contract-builder.d.mts +3 -3
  47. package/dist/contract-ts__contract-builder.mjs +2 -2
  48. package/dist/contract.d.mts +8 -8
  49. package/dist/contract.mjs +4 -4
  50. package/dist/contract__data-type.d.mts +2 -2
  51. package/dist/contract__data-type.mjs +1 -1
  52. package/dist/contract__factories.d.mts +1 -1
  53. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  54. package/dist/contract__foreign-key-materialization.mjs +2 -2
  55. package/dist/contract__index-type-validation.d.mts +1 -1
  56. package/dist/contract__types.d.mts +3 -3
  57. package/dist/contract__validators.d.mts +1 -1
  58. package/dist/contract__validators.mjs +1 -1
  59. package/dist/{control-CyY2Ijms.d.mts → control-Ced1D4yz.d.mts} +17 -16
  60. package/dist/control-Ced1D4yz.d.mts.map +1 -0
  61. package/dist/{control-_KWRuSBH.mjs → control-DiLXYDZc.mjs} +15 -10
  62. package/dist/control-DiLXYDZc.mjs.map +1 -0
  63. package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts → control-adapter-CkFfBVei-4WUzQP7G.d.mts} +8 -8
  64. package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts.map → control-adapter-CkFfBVei-4WUzQP7G.d.mts.map} +1 -1
  65. package/dist/control-adapter-pn8u9o3J.d.mts +1 -0
  66. package/dist/{data-type-gKl5DBHw.d.mts → data-type-CYsho6Yd.d.mts} +4 -12
  67. package/dist/data-type-CYsho6Yd.d.mts.map +1 -0
  68. package/dist/{data-type-BgP6Wv48.mjs → data-type-DU0mtme5.mjs} +18 -9
  69. package/dist/data-type-DU0mtme5.mjs.map +1 -0
  70. package/dist/{db-BmrN9nRS-CDq1n2be.d.mts → db-BmrN9nRS-CkMIL55t.d.mts} +12 -12
  71. package/dist/{db-BmrN9nRS-CDq1n2be.d.mts.map → db-BmrN9nRS-CkMIL55t.d.mts.map} +1 -1
  72. package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts → ddl-types-DtKZjNtN-BCpmdMQF.d.mts} +3 -3
  73. package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map → ddl-types-DtKZjNtN-BCpmdMQF.d.mts.map} +1 -1
  74. package/dist/{type-map-BMCZ_fb9-BTmWHQ-J.d.mts → default-mapping-B8_APB1M-CWcTmSQW.d.mts} +3 -22
  75. package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +1 -0
  76. package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs → derived-checks-BVSHiu2A-CzEmkTMg.mjs} +18 -6
  77. package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs.map → derived-checks-BVSHiu2A-CzEmkTMg.mjs.map} +1 -1
  78. package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts} +2 -2
  79. package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts.map → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts.map} +1 -1
  80. package/dist/diagnostics-C8YevjSU.mjs +21 -0
  81. package/dist/diagnostics-C8YevjSU.mjs.map +1 -0
  82. package/dist/{diff-C-18M6Ii.d.mts → diff-Cx7qTc2x.d.mts} +7 -7
  83. package/dist/{diff-C-18M6Ii.d.mts.map → diff-Cx7qTc2x.d.mts.map} +1 -1
  84. package/dist/{dist-Dswy-oRP.mjs → dist-D4FKWSKx.mjs} +30 -41
  85. package/dist/dist-D4FKWSKx.mjs.map +1 -0
  86. package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts → expression-CNBCbbzU-DnvLZYf4.d.mts} +3 -3
  87. package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts.map → expression-CNBCbbzU-DnvLZYf4.d.mts.map} +1 -1
  88. package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts → expression-Ck1wys3N-CBfr-HMG.d.mts} +6 -6
  89. package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts.map → expression-Ck1wys3N-CBfr-HMG.d.mts.map} +1 -1
  90. package/dist/expression-eDSWdiqh.d.mts +2 -0
  91. package/dist/{factories-BVIVyHQU.d.mts → factories-2LNVsQ2j.d.mts} +2 -2
  92. package/dist/{factories-BVIVyHQU.d.mts.map → factories-2LNVsQ2j.d.mts.map} +1 -1
  93. package/dist/family.d.mts +14 -14
  94. package/dist/family.mjs +7 -7
  95. package/dist/family__control-adapter.d.mts +2 -2
  96. package/dist/family__control.d.mts +4 -4
  97. package/dist/family__control.mjs +3 -3
  98. package/dist/family__diff.d.mts +2 -2
  99. package/dist/family__diff.mjs +1 -1
  100. package/dist/family__ir.d.mts +1 -1
  101. package/dist/family__ir.mjs +1 -1
  102. package/dist/family__migration.d.mts +1 -1
  103. package/dist/family__pack.d.mts +1 -1
  104. package/dist/family__pack.mjs +2 -2
  105. package/dist/family__psl-build.d.mts +3 -3
  106. package/dist/family__psl-build.mjs +2 -2
  107. package/dist/family__psl-infer.d.mts +1 -1
  108. package/dist/family__psl-infer.mjs +1 -1
  109. package/dist/{foreign-key-materialization-DBYDet74.d.mts → foreign-key-materialization-DJ6uhBba.d.mts} +3 -3
  110. package/dist/{foreign-key-materialization-DBYDet74.d.mts.map → foreign-key-materialization-DJ6uhBba.d.mts.map} +1 -1
  111. package/dist/{foreign-key-materialization-DyoakLGY.mjs → foreign-key-materialization-DibQ9Hjg.mjs} +2 -2
  112. package/dist/{foreign-key-materialization-DyoakLGY.mjs.map → foreign-key-materialization-DibQ9Hjg.mjs.map} +1 -1
  113. package/dist/{functions-CJ8Yf8uL.d.mts → functions-DucgffNf.d.mts} +6 -6
  114. package/dist/{functions-CJ8Yf8uL.d.mts.map → functions-DucgffNf.d.mts.map} +1 -1
  115. package/dist/{index-We-mbWnZ.d.mts → index-CJlr0Eja.d.mts} +3 -3
  116. package/dist/{index-We-mbWnZ.d.mts.map → index-CJlr0Eja.d.mts.map} +1 -1
  117. package/dist/{index-UHjF-U84.d.mts → index-DuD4M3b8.d.mts} +19 -19
  118. package/dist/{index-UHjF-U84.d.mts.map → index-DuD4M3b8.d.mts.map} +1 -1
  119. package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs → index-equivalence-DswCiq5l-DlC2yTK1.mjs} +2 -2
  120. package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs.map → index-equivalence-DswCiq5l-DlC2yTK1.mjs.map} +1 -1
  121. package/dist/index-reference-CrohwmmB.d.mts +1 -0
  122. package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts → index-reference-DJX-CNsb-C1fCMhrJ.d.mts} +3 -3
  123. package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts.map → index-reference-DJX-CNsb-C1fCMhrJ.d.mts.map} +1 -1
  124. package/dist/{index-type-validation-D7-fPxIJ.d.mts → index-type-validation-P4WLRyZA.d.mts} +2 -2
  125. package/dist/{index-type-validation-D7-fPxIJ.d.mts.map → index-type-validation-P4WLRyZA.d.mts.map} +1 -1
  126. package/dist/{interpreter-C3Ltz47m-BM7A_CmQ.mjs → interpreter-y1GRudgs-DnP0uDGL.mjs} +7 -5
  127. package/dist/interpreter-y1GRudgs-DnP0uDGL.mjs.map +1 -0
  128. package/dist/{ir-OBn7ct21.d.mts → ir-BEQwEnRB.d.mts} +2 -2
  129. package/dist/{ir-OBn7ct21.d.mts.map → ir-BEQwEnRB.d.mts.map} +1 -1
  130. package/dist/middleware-DTu2jl68.d.mts +1 -0
  131. package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts → middleware-YsFLC19Y-Dot9R8QY.d.mts} +2 -2
  132. package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts.map → middleware-YsFLC19Y-Dot9R8QY.d.mts.map} +1 -1
  133. package/dist/{migration-Bdt_UrTg.d.mts → migration-Cc102YUu.d.mts} +3 -3
  134. package/dist/{migration-Bdt_UrTg.d.mts.map → migration-Cc102YUu.d.mts.map} +1 -1
  135. package/dist/operations.d.mts +1 -1
  136. package/dist/orm-client.d.mts +38 -32
  137. package/dist/orm-client.d.mts.map +1 -1
  138. package/dist/orm-client.mjs +1 -1
  139. package/dist/{pack-DOLmsrEs.d.mts → pack-DI4Nur5d.d.mts} +3 -3
  140. package/dist/{pack-DOLmsrEs.d.mts.map → pack-DI4Nur5d.d.mts.map} +1 -1
  141. package/dist/plan-CuSLaQdv.d.mts +2 -0
  142. package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts → plan-cGEaSXHv-Bv-SBtFA.d.mts} +3 -3
  143. package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts.map → plan-cGEaSXHv-Bv-SBtFA.d.mts.map} +1 -1
  144. package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs +42 -0
  145. package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs.map +1 -0
  146. package/dist/{psl-build-C3WT2pWV.mjs → psl-build-8bx9WTUt.mjs} +113 -4
  147. package/dist/psl-build-8bx9WTUt.mjs.map +1 -0
  148. package/dist/psl-build-PXVtl8gM.d.mts +73 -0
  149. package/dist/psl-build-PXVtl8gM.d.mts.map +1 -0
  150. package/dist/{psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts → psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts} +5 -5
  151. package/dist/psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts.map +1 -0
  152. package/dist/{psl-field-resolution-ztVU6TV2-BSBajXoF.mjs → psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs} +7 -41
  153. package/dist/psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs.map +1 -0
  154. package/dist/{psl-infer-DHO72J_m.mjs → psl-infer-CG0_wra6.mjs} +2 -2
  155. package/dist/{psl-infer-DHO72J_m.mjs.map → psl-infer-CG0_wra6.mjs.map} +1 -1
  156. package/dist/{psl-infer-Dp_NzWE0.d.mts → psl-infer-g040TwAr.d.mts} +4 -6
  157. package/dist/psl-infer-g040TwAr.d.mts.map +1 -0
  158. package/dist/query-lane-context-C29KGcgz.d.mts +1 -0
  159. package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts → query-lane-context-C42-u9L1-CUP3uW4A.d.mts} +6 -6
  160. package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts.map → query-lane-context-C42-u9L1-CUP3uW4A.d.mts.map} +1 -1
  161. package/dist/relational-core.d.mts +13 -13
  162. package/dist/relational-core.mjs +2 -2
  163. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  164. package/dist/relational-core__ast.d.mts +4 -4
  165. package/dist/relational-core__ast.mjs +2 -2
  166. package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
  167. package/dist/relational-core__collection-methods.d.mts +2 -2
  168. package/dist/relational-core__contract-free.d.mts +3 -3
  169. package/dist/relational-core__expression.d.mts +3 -3
  170. package/dist/relational-core__functions.d.mts +1 -1
  171. package/dist/relational-core__index-reference.d.mts +2 -2
  172. package/dist/relational-core__middleware.d.mts +2 -2
  173. package/dist/relational-core__plan.d.mts +3 -3
  174. package/dist/relational-core__query-lane-context.d.mts +2 -2
  175. package/dist/relational-core__types.d.mts +2 -2
  176. package/dist/runtime.d.mts +4 -4
  177. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  178. package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts → schema-differ-CqWOkoW9-DAcuiQPU.d.mts} +4 -4
  179. package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts.map → schema-differ-CqWOkoW9-DAcuiQPU.d.mts.map} +1 -1
  180. package/dist/schema-ir.d.mts +2 -2
  181. package/dist/schema-ir.mjs +1 -1
  182. package/dist/schema-ir__types.d.mts +3 -3
  183. package/dist/schema-ir__types.mjs +1 -1
  184. package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs → schema-verify-DIfHSB4I-CU6ViTDO.mjs} +2 -2
  185. package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs.map → schema-verify-DIfHSB4I-CU6ViTDO.mjs.map} +1 -1
  186. package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs} +2 -2
  187. package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs.map → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs.map} +1 -1
  188. package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts} +2 -2
  189. package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts.map} +1 -1
  190. package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts → transaction-state-DR3nKTmH-CkkfiS9z.d.mts} +9 -9
  191. package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts.map → transaction-state-DR3nKTmH-CkkfiS9z.d.mts.map} +1 -1
  192. package/dist/types-BhcBOXu7.d.mts +1 -0
  193. package/dist/{types-DIZSW9JI-DNUF-RnL.d.mts → types-C-z8HyiZ-1Nhw0pHj.d.mts} +17 -3
  194. package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +1 -0
  195. package/dist/types-CJK7FBdw.d.mts +1 -0
  196. package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts → types-Cl4MLNrS-GHKQvTNi.d.mts} +8 -8
  197. package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts.map → types-Cl4MLNrS-GHKQvTNi.d.mts.map} +1 -1
  198. package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts → types-CzxOObSY-DTQ2rnLF.d.mts} +7 -7
  199. package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts.map → types-CzxOObSY-DTQ2rnLF.d.mts.map} +1 -1
  200. package/dist/{types-D0GFxty0-CP8b4dR3.mjs → types-DvhckjSz-Cm0Oodhr.mjs} +3 -2
  201. package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +1 -0
  202. package/dist/types-HD5m-h8B.d.mts +67 -0
  203. package/dist/types-HD5m-h8B.d.mts.map +1 -0
  204. package/dist/{types-Sh5HuaZE-CqThc46M.d.mts → types-Sh5HuaZE-Dq4AUzl7.d.mts} +2 -2
  205. package/dist/{types-Sh5HuaZE-CqThc46M.d.mts.map → types-Sh5HuaZE-Dq4AUzl7.d.mts.map} +1 -1
  206. package/dist/{types-DFZhLz18-Msi8wwig.d.mts → types-zwKzjyma-CxZkmkUI.d.mts} +114 -3
  207. package/dist/types-zwKzjyma-CxZkmkUI.d.mts.map +1 -0
  208. package/dist/{validators-CudqzmkF.d.mts → validators-BifwoR5e.d.mts} +2 -2
  209. package/dist/{validators-CudqzmkF.d.mts.map → validators-BifwoR5e.d.mts.map} +1 -1
  210. package/dist/{validators-BMWQ7-5D.mjs → validators-CfUrQdiv.mjs} +2 -2
  211. package/dist/{validators-BMWQ7-5D.mjs.map → validators-CfUrQdiv.mjs.map} +1 -1
  212. package/package.json +19 -18
  213. package/dist/ast-De8XGuVW.mjs.map +0 -1
  214. package/dist/ast-Dp6lQXUX.d.mts.map +0 -1
  215. package/dist/collection-methods-DoBrRR69.d.mts +0 -1
  216. package/dist/contract-builder-B_oFvMWk.mjs.map +0 -1
  217. package/dist/contract-builder-C4fgERNT.d.mts.map +0 -1
  218. package/dist/control-CyY2Ijms.d.mts.map +0 -1
  219. package/dist/control-_KWRuSBH.mjs.map +0 -1
  220. package/dist/control-adapter-DB7MPI5L.d.mts +0 -1
  221. package/dist/data-type-BgP6Wv48.mjs.map +0 -1
  222. package/dist/data-type-gKl5DBHw.d.mts.map +0 -1
  223. package/dist/dist-Dswy-oRP.mjs.map +0 -1
  224. package/dist/expression-DWcDQHh9.d.mts +0 -2
  225. package/dist/index-reference-ZZrszBDq.d.mts +0 -1
  226. package/dist/interpreter-C3Ltz47m-BM7A_CmQ.mjs.map +0 -1
  227. package/dist/middleware-DOKGNt72.d.mts +0 -1
  228. package/dist/plan-_8dKi13Q.d.mts +0 -2
  229. package/dist/psl-build-C3WT2pWV.mjs.map +0 -1
  230. package/dist/psl-build-TrbDSGOA.d.mts +0 -13
  231. package/dist/psl-build-TrbDSGOA.d.mts.map +0 -1
  232. package/dist/psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts.map +0 -1
  233. package/dist/psl-field-resolution-ztVU6TV2-BSBajXoF.mjs.map +0 -1
  234. package/dist/psl-infer-Dp_NzWE0.d.mts.map +0 -1
  235. package/dist/query-lane-context-DW5q2RAY.d.mts +0 -1
  236. package/dist/type-map-BMCZ_fb9-BTmWHQ-J.d.mts.map +0 -1
  237. package/dist/types-BkA6tyT-.d.mts +0 -1
  238. package/dist/types-D0GFxty0-CP8b4dR3.mjs.map +0 -1
  239. package/dist/types-DFZhLz18-Msi8wwig.d.mts.map +0 -1
  240. package/dist/types-DIZSW9JI-DNUF-RnL.d.mts.map +0 -1
  241. package/dist/types-DqSCaTK3.d.mts +0 -1
  242. package/dist/types-Uv3oTMAb.d.mts +0 -18
  243. package/dist/types-Uv3oTMAb.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schema-verify-DIfHSB4I-Du0-5I8k.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, enforceSqlDataTypeInvariants as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-DIfHSB4I.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,YAAY;CACzC,IAAI,OAAO,eAAe,YAAY,e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O.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, enforceSqlDataTypeInvariants as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-DIfHSB4I.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,YAAY;CACzC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,UAAU,UAAU,CAAC,CAAC,OAAO,YAAY;CACvD,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM;EAC3D,IAAI,CAAC,qBAAqB,UAAU,GAAG;EACvC,MAAM,oBAAoB,WAAW,MAAM,WAAW;EACtD,KAAK,MAAM,CAAC,SAAS,SAAS,OAAO,QAAQ,iBAAiB,GAAG;GAChE,uBAAuB;IACtB;IACA;IACA,cAAc,WAAW;IACzB,aAAa;IACb,sBAAsB;GACvB,CAAC;GAC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B,SAAS;CAC5E,MAAM,KAAK,cAAc;CACzB,MAAM,cAAc,iBAAiB,MAAM,YAAY,OAAO,MAAM,SAAS,gBAAgB,WAAW,MAAM,SAAS,cAAc,KAAK;CAC1I,OAAO;EACN;EACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,2BAA2B;EAChD,SAAS,KAAK,uCAAuC,8CAA8C,UAAU,UAAU,cAAc,IAAI,KAAK,IAAI;EAClJ,UAAU;GACT,aAAa,MAAM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
@@ -1,7 +1,7 @@
1
1
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
2
2
  import { f as composeSqlEntityKinds } from "./entity-kinds-DDTkNIr9-DJ2EIO94.mjs";
3
3
  import { c as isMaterializedSqlNamespace, o as SqlStorage } from "./types-DXrO0fxT.mjs";
4
- import { f as validateSqlContractFully, i as createSqlContractSchema, s as resolveSqlToOneRelationStorage } from "./validators-BMWQ7-5D.mjs";
4
+ import { f as validateSqlContractFully, i as createSqlContractSchema, s as resolveSqlToOneRelationStorage } from "./validators-CfUrQdiv.mjs";
5
5
  import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
6
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
7
7
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
@@ -188,4 +188,4 @@ var SqlContractSerializer = class extends SqlContractSerializerBase {
188
188
  //#endregion
189
189
  export { SqlContractSerializerBase as n, SqlContractSerializer as t };
190
190
 
191
- //# sourceMappingURL=sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs.map
191
+ //# sourceMappingURL=sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-DDaAVCQr.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { createSqlContractSchema, resolveSqlToOneRelationStorage, validateSqlContractFully } from \"@internal/sql-contract/validators\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { withDerivedToOneRelationNullability } from \"@internal/contract-authoring\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { type } from \"arktype\";\n//#region src/core/ir/sql-contract-serializer-base.ts\nconst NamespaceRawSchema = type({\n\tid: \"string\",\n\t\"kind?\": \"string\",\n\tentries: type({ \"+\": \"ignore\" })\n});\n/**\n* A `contract.json` written before to-one relations recorded `nullable` (rc.9 and earlier)\n* loads with the flag derived from storage: nullable when any local FK column is nullable or\n* cannot be resolved.\n*/\nfunction withSqlToOneRelationNullability(contract) {\n\tconst domain = withDerivedToOneRelationNullability(contract.domain, ({ model, relation }) => {\n\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, blindCast(model.storage), relation);\n\t\treturn {\n\t\t\townsReference: ownsForeignKey,\n\t\t\tlocalFieldNullability: columns.map((column) => column.nullable)\n\t\t};\n\t});\n\treturn {\n\t\t...contract,\n\t\tdomain\n\t};\n}\n/**\n* SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n* deserialization pipeline:\n*\n* 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n* against the SQL contract arktype schema (`validateSqlContractFully`)\n* and returns the validated flat-data shape.\n* 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n* constructs the family-shared SQL Contract IR class hierarchy\n* (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n* / …). The rest of the contract envelope is JSON-clean primitive\n* data and passes through unchanged.\n* 3. `constructTargetContract` is the target-specific extension hook;\n* defaults to identity. Targets that need to attach target-only\n* fields (e.g. target-specific derived storage fields) override it.\n*\n* Default `serializeContract` is identity over the contract — concrete\n* SQL targets ship JSON-clean class instances, so the contract value\n* can be stringified directly. The non-enumerable family-level `kind`\n* discriminator on `SqlNode` instances stays out of the persisted\n* envelope automatically. Targets that need to canonicalize on the way\n* out (key ordering, dropping computed-only fields) override\n* `serializeContract` directly.\n*/\nvar SqlContractSerializerBase = class {\n\tentityHydrationRegistry;\n\tcontractSchema;\n\tentryKinds;\n\tconstructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {\n\t\tthis.entityHydrationRegistry = entityHydrationRegistry;\n\t\tthis.entryKinds = composeSqlEntityKinds(packEntityKinds);\n\t\tthis.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;\n\t}\n\tdeserializeContract(json) {\n\t\tconst validated = withSqlToOneRelationNullability(this.parseSqlContractStructure(json));\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn blindCast(this.constructTargetContract(hydrated));\n\t}\n\tserializeContract(contract) {\n\t\treturn blindCast(contract);\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\thashCanonicalizationHooks = sqlContractCanonicalizationHooks;\n\tparseSqlContractStructure(json) {\n\t\treturn validateSqlContractFully(json, this.contractSchema !== void 0 ? { contractSchema: this.contractSchema } : void 0);\n\t}\n\thydrateSqlStorage(validated) {\n\t\tconst types = validated.storage.types;\n\t\tconst hydratedTypes = types !== void 0 ? Object.fromEntries(Object.entries(types).map(([name, entry]) => [name, this.hydrateStorageTypeEntry(entry)])) : void 0;\n\t\tconst rawNamespaces = validated.storage.namespaces;\n\t\tif (rawNamespaces === void 0) throw new ContractValidationError(\"Contract storage.namespaces is required after structural validation\", \"structural\");\n\t\tconst hydratedNamespaces = this.hydrateSqlNamespaceMap(blindCast(rawNamespaces));\n\t\treturn {\n\t\t\t...validated,\n\t\t\tstorage: new SqlStorage({\n\t\t\t\tstorageHash: validated.storage.storageHash,\n\t\t\t\t...ifDefined(\"types\", hydratedTypes),\n\t\t\t\tnamespaces: blindCast(hydratedNamespaces)\n\t\t\t})\n\t\t};\n\t}\n\thydrateSqlNamespaceMap(namespaces) {\n\t\treturn Object.fromEntries(Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n\t\t\tconst namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n\t\t\tif (!isMaterializedSqlNamespace(namespaceHydrated)) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Target serializer bug: hydrateSqlNamespaceEntry for namespace \"${nsId}\" returned a non-NamespaceBase value. Override hydrateSqlNamespaceEntry to produce a target namespace concretion.`, {\n\t\t\t\twhy: \"The target contract serializer hydrated a namespace into a value that is not a materialized namespace concretion.\",\n\t\t\t\tfix: \"Fix the target package: its hydrateSqlNamespaceEntry override must return a target namespace concretion.\",\n\t\t\t\tmeta: { namespaceId: nsId }\n\t\t\t});\n\t\t\treturn [nsId, namespaceHydrated];\n\t\t}));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst id = typeof raw[\"id\"] === \"string\" ? raw[\"id\"] : nsId;\n\t\tconst parsed = NamespaceRawSchema({\n\t\t\t...raw,\n\t\t\tid\n\t\t});\n\t\tif (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join(\"; \")}`, \"structural\");\n\t\tconst entriesRaw = parsed.entries;\n\t\tconst rawEntriesMap = isPlainRecord$1(entriesRaw) ? entriesRaw : {};\n\t\tconst entriesInput = {};\n\t\tfor (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord$1(innerMap) ? innerMap : Object.freeze({});\n\t\tconst entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, \"fail\", id);\n\t\tif (!Object.hasOwn(entriesOutput, \"table\")) entriesOutput[\"table\"] = {};\n\t\treturn blindCast({\n\t\t\tid,\n\t\t\tentries: entriesOutput\n\t\t});\n\t}\n\thydrateStorageTypeEntry(entry) {\n\t\tif (typeof entry !== \"object\" || entry === null) return entry;\n\t\tconst kind = isPlainRecord$1(entry) && \"kind\" in entry ? entry.kind : void 0;\n\t\tif (typeof kind !== \"string\") return entry;\n\t\tconst factory = this.entityHydrationRegistry.get(kind);\n\t\tif (factory === void 0) return entry;\n\t\treturn blindCast(factory(entry));\n\t}\n\tconstructTargetContract(hydrated) {\n\t\treturn blindCast(hydrated);\n\t}\n\t/**\n\t* Serializes a namespace's `entries` dict by walking every enumerable\n\t* kind — no kind is named here, mirroring the generic hydrate walk in\n\t* `hydrateSqlNamespaceEntry` above. `table` is the SQL family's one\n\t* universal base kind (every namespace carries it), so it is always\n\t* emitted, even when empty; every other kind — target- or\n\t* pack-contributed — is emitted only when it holds at least one entry.\n\t* A kind carried non-enumerable on `entries` is excluded here for free,\n\t* since `Object.entries` honors enumerability.\n\t*/\n\tserializeNamespaceEntries(entries) {\n\t\tconst out = { table: this.serializeEntries(entries[\"table\"] ?? {}) };\n\t\tfor (const [kind, record] of Object.entries(entries)) {\n\t\t\tif (kind === \"table\" || record == null || Object.keys(record).length === 0) continue;\n\t\t\tout[kind] = this.serializeEntries(record);\n\t\t}\n\t\treturn out;\n\t}\n\tserializeEntries(entries) {\n\t\tconst out = {};\n\t\tfor (const [name, entry] of Object.entries(entries)) out[name] = this.serializeJsonObject(entry);\n\t\treturn out;\n\t}\n\tserializeJsonObject(value) {\n\t\treturn blindCast(this.serializeJsonValue(value));\n\t}\n\tserializeJsonValue(value) {\n\t\treturn blindCast(JSON.parse(JSON.stringify(value)));\n\t}\n};\n//#endregion\n//#region src/core/ir/sql-contract-serializer.ts\n/**\n* Default SQL family `ContractSerializer` concretion. Inherits the\n* full SQL-shared deserialization pipeline (structural validation +\n* IR-class hydration) without pack-registered `storage.types`\n* hydration factories — targets that emit polymorphic JSON outside the\n* codec-typed envelope wire a target-specific subclass with a populated\n* registry (see Postgres). Family-level call sites instantiate this\n* default directly when no target serializer is supplied.\n*\n* Because this serializer has no target concretion, deserialization of\n* contracts that include namespace entries from JSON will throw unless\n* the caller provides pre-hydrated `NamespaceBase` instances. Production\n* paths always supply a target-specific serializer.\n*/\nvar SqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map());\n\t}\n};\n//#endregion\nexport { SqlContractSerializerBase as n, SqlContractSerializer as t };\n\n//# sourceMappingURL=sql-contract-serializer-DDaAVCQr.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;AAMD,SAAS,gCAAgC,UAAU;CAClD,MAAM,SAAS,oCAAoC,SAAS,SAAS,EAAE,OAAO,eAAe;EAC5F,MAAM,EAAE,gBAAgB,YAAY,+BAA+B,UAAU,UAAU,MAAM,OAAO,GAAG,QAAQ;EAC/G,OAAO;GACN,eAAe;GACf,uBAAuB,QAAQ,KAAK,WAAW,OAAO,QAAQ;EAC/D;CACD,CAAC;CACD,OAAO;EACN,GAAG;EACH;CACD;A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AAG,OAAO;EAC/B,OAAO,UAAU,QAAQ,KAAK,CAAC;CAChC;CACA,wBAAwB,UAAU;EACjC,OAAO,UAAU,QAAQ;CAC1B;;;;;;;;;;;CAWA,0BAA0B,SAAS;EAClC,MAAM,MAAM,EAAE,OAAO,KAAK,iBAAiB,QAAQ,YAAY,CAAC,CAAC,EAAE;EACnE,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,OAAO,GAAG;GACrD,IAAI,SAAS,WAAW,UAAU,QAAQ,OAAO,KAAK,MAAM,CAAC,CAAC,WAAW,GAAG;GAC5E,IAAI,QAAQ,KAAK,iBAAiB,MAAM;EACzC;EACA,OAAO;CACR;CACA,iBAAiB,SAAS;EACzB,MAAM,MAAM,CAAC;EACb,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,OAAO,GAAG,IAAI,QAAQ,KAAK,oBAAoB,KAAK;EAC/F,OAAO;CACR;CACA,oBAAoB,OAAO;EAC1B,OAAO,UAAU,KAAK,mBAAmB,KAAK,CAAC;CAChD;CACA,mBAAmB,OAAO;EACzB,OAAO,UAAU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC;CACnD;AACD;;;;;;;;;;;;;;;AAiBA,IAAI,wBAAwB,cAAc,0BAA0B;CACnE,cAAc;EACb,sBAAsB,IAAI,IAAI,CAAC;CAChC;AACD"}
1
+ {"version":3,"file":"sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-DDaAVCQr.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { createSqlContractSchema, resolveSqlToOneRelationStorage, validateSqlContractFully } from \"@internal/sql-contract/validators\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { withDerivedToOneRelationNullability } from \"@internal/contract-authoring\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { type } from \"arktype\";\n//#region src/core/ir/sql-contract-serializer-base.ts\nconst NamespaceRawSchema = type({\n\tid: \"string\",\n\t\"kind?\": \"string\",\n\tentries: type({ \"+\": \"ignore\" })\n});\n/**\n* A `contract.json` written before to-one relations recorded `nullable` (rc.9 and earlier)\n* loads with the flag derived from storage: nullable when any local FK column is nullable or\n* cannot be resolved.\n*/\nfunction withSqlToOneRelationNullability(contract) {\n\tconst domain = withDerivedToOneRelationNullability(contract.domain, ({ model, relation }) => {\n\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, blindCast(model.storage), relation);\n\t\treturn {\n\t\t\townsReference: ownsForeignKey,\n\t\t\tlocalFieldNullability: columns.map((column) => column.nullable)\n\t\t};\n\t});\n\treturn {\n\t\t...contract,\n\t\tdomain\n\t};\n}\n/**\n* SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n* deserialization pipeline:\n*\n* 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n* against the SQL contract arktype schema (`validateSqlContractFully`)\n* and returns the validated flat-data shape.\n* 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n* constructs the family-shared SQL Contract IR class hierarchy\n* (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n* / …). The rest of the contract envelope is JSON-clean primitive\n* data and passes through unchanged.\n* 3. `constructTargetContract` is the target-specific extension hook;\n* defaults to identity. Targets that need to attach target-only\n* fields (e.g. target-specific derived storage fields) override it.\n*\n* Default `serializeContract` is identity over the contract — concrete\n* SQL targets ship JSON-clean class instances, so the contract value\n* can be stringified directly. The non-enumerable family-level `kind`\n* discriminator on `SqlNode` instances stays out of the persisted\n* envelope automatically. Targets that need to canonicalize on the way\n* out (key ordering, dropping computed-only fields) override\n* `serializeContract` directly.\n*/\nvar SqlContractSerializerBase = class {\n\tentityHydrationRegistry;\n\tcontractSchema;\n\tentryKinds;\n\tconstructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {\n\t\tthis.entityHydrationRegistry = entityHydrationRegistry;\n\t\tthis.entryKinds = composeSqlEntityKinds(packEntityKinds);\n\t\tthis.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;\n\t}\n\tdeserializeContract(json) {\n\t\tconst validated = withSqlToOneRelationNullability(this.parseSqlContractStructure(json));\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn blindCast(this.constructTargetContract(hydrated));\n\t}\n\tserializeContract(contract) {\n\t\treturn blindCast(contract);\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\thashCanonicalizationHooks = sqlContractCanonicalizationHooks;\n\tparseSqlContractStructure(json) {\n\t\treturn validateSqlContractFully(json, this.contractSchema !== void 0 ? { contractSchema: this.contractSchema } : void 0);\n\t}\n\thydrateSqlStorage(validated) {\n\t\tconst types = validated.storage.types;\n\t\tconst hydratedTypes = types !== void 0 ? Object.fromEntries(Object.entries(types).map(([name, entry]) => [name, this.hydrateStorageTypeEntry(entry)])) : void 0;\n\t\tconst rawNamespaces = validated.storage.namespaces;\n\t\tif (rawNamespaces === void 0) throw new ContractValidationError(\"Contract storage.namespaces is required after structural validation\", \"structural\");\n\t\tconst hydratedNamespaces = this.hydrateSqlNamespaceMap(blindCast(rawNamespaces));\n\t\treturn {\n\t\t\t...validated,\n\t\t\tstorage: new SqlStorage({\n\t\t\t\tstorageHash: validated.storage.storageHash,\n\t\t\t\t...ifDefined(\"types\", hydratedTypes),\n\t\t\t\tnamespaces: blindCast(hydratedNamespaces)\n\t\t\t})\n\t\t};\n\t}\n\thydrateSqlNamespaceMap(namespaces) {\n\t\treturn Object.fromEntries(Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n\t\t\tconst namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n\t\t\tif (!isMaterializedSqlNamespace(namespaceHydrated)) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Target serializer bug: hydrateSqlNamespaceEntry for namespace \"${nsId}\" returned a non-NamespaceBase value. Override hydrateSqlNamespaceEntry to produce a target namespace concretion.`, {\n\t\t\t\twhy: \"The target contract serializer hydrated a namespace into a value that is not a materialized namespace concretion.\",\n\t\t\t\tfix: \"Fix the target package: its hydrateSqlNamespaceEntry override must return a target namespace concretion.\",\n\t\t\t\tmeta: { namespaceId: nsId }\n\t\t\t});\n\t\t\treturn [nsId, namespaceHydrated];\n\t\t}));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst id = typeof raw[\"id\"] === \"string\" ? raw[\"id\"] : nsId;\n\t\tconst parsed = NamespaceRawSchema({\n\t\t\t...raw,\n\t\t\tid\n\t\t});\n\t\tif (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join(\"; \")}`, \"structural\");\n\t\tconst entriesRaw = parsed.entries;\n\t\tconst rawEntriesMap = isPlainRecord$1(entriesRaw) ? entriesRaw : {};\n\t\tconst entriesInput = {};\n\t\tfor (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord$1(innerMap) ? innerMap : Object.freeze({});\n\t\tconst entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, \"fail\", id);\n\t\tif (!Object.hasOwn(entriesOutput, \"table\")) entriesOutput[\"table\"] = {};\n\t\treturn blindCast({\n\t\t\tid,\n\t\t\tentries: entriesOutput\n\t\t});\n\t}\n\thydrateStorageTypeEntry(entry) {\n\t\tif (typeof entry !== \"object\" || entry === null) return entry;\n\t\tconst kind = isPlainRecord$1(entry) && \"kind\" in entry ? entry.kind : void 0;\n\t\tif (typeof kind !== \"string\") return entry;\n\t\tconst factory = this.entityHydrationRegistry.get(kind);\n\t\tif (factory === void 0) return entry;\n\t\treturn blindCast(factory(entry));\n\t}\n\tconstructTargetContract(hydrated) {\n\t\treturn blindCast(hydrated);\n\t}\n\t/**\n\t* Serializes a namespace's `entries` dict by walking every enumerable\n\t* kind — no kind is named here, mirroring the generic hydrate walk in\n\t* `hydrateSqlNamespaceEntry` above. `table` is the SQL family's one\n\t* universal base kind (every namespace carries it), so it is always\n\t* emitted, even when empty; every other kind — target- or\n\t* pack-contributed — is emitted only when it holds at least one entry.\n\t* A kind carried non-enumerable on `entries` is excluded here for free,\n\t* since `Object.entries` honors enumerability.\n\t*/\n\tserializeNamespaceEntries(entries) {\n\t\tconst out = { table: this.serializeEntries(entries[\"table\"] ?? {}) };\n\t\tfor (const [kind, record] of Object.entries(entries)) {\n\t\t\tif (kind === \"table\" || record == null || Object.keys(record).length === 0) continue;\n\t\t\tout[kind] = this.serializeEntries(record);\n\t\t}\n\t\treturn out;\n\t}\n\tserializeEntries(entries) {\n\t\tconst out = {};\n\t\tfor (const [name, entry] of Object.entries(entries)) out[name] = this.serializeJsonObject(entry);\n\t\treturn out;\n\t}\n\tserializeJsonObject(value) {\n\t\treturn blindCast(this.serializeJsonValue(value));\n\t}\n\tserializeJsonValue(value) {\n\t\treturn blindCast(JSON.parse(JSON.stringify(value)));\n\t}\n};\n//#endregion\n//#region src/core/ir/sql-contract-serializer.ts\n/**\n* Default SQL family `ContractSerializer` concretion. Inherits the\n* full SQL-shared deserialization pipeline (structural validation +\n* IR-class hydration) without pack-registered `storage.types`\n* hydration factories — targets that emit polymorphic JSON outside the\n* codec-typed envelope wire a target-specific subclass with a populated\n* registry (see Postgres). Family-level call sites instantiate this\n* default directly when no target serializer is supplied.\n*\n* Because this serializer has no target concretion, deserialization of\n* contracts that include namespace entries from JSON will throw unless\n* the caller provides pre-hydrated `NamespaceBase` instances. Production\n* paths always supply a target-specific serializer.\n*/\nvar SqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map());\n\t}\n};\n//#endregion\nexport { SqlContractSerializerBase as n, SqlContractSerializer as t };\n\n//# sourceMappingURL=sql-contract-serializer-DDaAVCQr.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;AAMD,SAAS,gCAAgC,UAAU;CAClD,MAAM,SAAS,oCAAoC,SAAS,SAAS,EAAE,OAAO,eAAe;EAC5F,MAAM,EAAE,gBAAgB,YAAY,+BAA+B,UAAU,UAAU,MAAM,OAAO,GAAG,QAAQ;EAC/G,OAAO;GACN,eAAe;GACf,uBAAuB,QAAQ,KAAK,WAAW,OAAO,QAAQ;EAC/D;CACD,CAAC;CACD,OAAO;EACN,GAAG;EACH;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,4BAA4B,MAAM;CACrC;CACA;CACA;CACA,YAAY,0CAA0C,IAAI,IAAI,GAAG,kBAAkB,CAAC,GAAG;EACtF,KAAK,0BAA0B;EAC/B,KAAK,aAAa,sBAAsB,eAAe;EACvD,KAAK,iBAAiB,gBAAgB,SAAS,IAAI,wBAAwB,KAAK,UAAU,IAAI,KAAK;CACpG;CACA,oBAAoB,MAAM;EACzB,MAAM,YAAY,gCAAgC,KAAK,0BAA0B,IAAI,CAAC;EACtF,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,UAAU,KAAK,wBAAwB,QAAQ,CAAC;CACxD;CACA,kBAAkB,UAAU;EAC3B,OAAO,UAAU,QAAQ;CAC1B;CACA,sBAAsB,iCAAiC;CACvD,cAAc,iCAAiC;CAC/C,4BAA4B;CAC5B,0BAA0B,MAAM;EAC/B,OAAO,yBA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oBAAoB,OAAO;EAC1B,OAAO,UAAU,KAAK,mBAAmB,KAAK,CAAC;CAChD;CACA,mBAAmB,OAAO;EACzB,OAAO,UAAU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC;CACnD;AACD;;;;;;;;;;;;;;;AAiBA,IAAI,wBAAwB,cAAc,0BAA0B;CACnE,cAAc;EACb,sBAAsB,IAAI,IAAI,CAAC;CAChC;AACD"}
@@ -1,4 +1,4 @@
1
- import { h as AnyQueryAst } from "./types-Sh5HuaZE-CqThc46M.mjs";
1
+ import { h as AnyQueryAst } from "./types-Sh5HuaZE-Dq4AUzl7.mjs";
2
2
  import { ExecutionPlan } from "@prisma/orm-framework/components/runtime";
3
3
  //#region ../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts
4
4
  //#region src/sql-execution-plan.d.ts
@@ -28,4 +28,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
28
28
  }
29
29
  //#endregion
30
30
  export { SqlExecutionPlan as t };
31
- //# sourceMappingURL=sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map
31
+ //# sourceMappingURL=sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-execution-plan-C7XauPPu-eskZJbmm.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
1
+ {"version":3,"file":"sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan-C7XauPPu.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
@@ -1,12 +1,12 @@
1
- import { h as AnyQueryAst, mt as LoweredParam } from "./types-Sh5HuaZE-CqThc46M.mjs";
1
+ import { h as AnyQueryAst, mt as LoweredParam } from "./types-Sh5HuaZE-Dq4AUzl7.mjs";
2
2
  import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
3
- import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
4
- import { a as CodecValue, i as CodecTypesBase, o as Expression, t as AffectedCount } from "./expression-Ck1wys3N-RNyviMcU.mjs";
5
- import "./expression-DWcDQHh9.mjs";
6
- import "./ast-Dp6lQXUX.mjs";
7
- import "./plan-_8dKi13Q.mjs";
8
- import { h as RuntimeScope } from "./types-Cl4MLNrS-lbf-K25i.mjs";
9
- import "./types-BkA6tyT-.mjs";
3
+ import { n as SqlQueryPlan } from "./plan-cGEaSXHv-Bv-SBtFA.mjs";
4
+ import { a as CodecValue, i as CodecTypesBase, o as Expression, t as AffectedCount } from "./expression-Ck1wys3N-CBfr-HMG.mjs";
5
+ import "./expression-eDSWdiqh.mjs";
6
+ import "./ast-DbmdIKFd.mjs";
7
+ import "./plan-CuSLaQdv.mjs";
8
+ import { h as RuntimeScope } from "./types-Cl4MLNrS-GHKQvTNi.mjs";
9
+ import "./types-BhcBOXu7.mjs";
10
10
  import { JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
11
11
  import { AsyncIterableResult, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
12
12
  //#region ../../../2-sql/5-runtime/dist/transaction-state-DR3nKTmH.d.mts
@@ -112,4 +112,4 @@ interface TransactionStartTarget {
112
112
  declare function createTransactionStart(): TransactionStart;
113
113
  //#endregion
114
114
  export { transactionStart as S, createTransactionStart as _, ParamSpec as a, settlementOf as b, PreparedExecution as c, PreparedStatementExecuteTarget as d, PreparedStatementQueryTarget as f, TransactionStartTarget as g, TransactionStart as h, DeclaredNullable as i, PreparedFor as l, TransactionSettlementState as m, Declaration as n, ParamsFromDeclaration as o, SettledTransactionTarget as p, DeclaredCodecId as r, PrepareCallback as s, BindSiteParams as t, PreparedStatement as u, preparedStatementExecute as v, transactionSettlement as x, preparedStatementQuery as y };
115
- //# sourceMappingURL=transaction-state-DR3nKTmH-BZ-54Zu0.d.mts.map
115
+ //# sourceMappingURL=transaction-state-DR3nKTmH-CkkfiS9z.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-state-DR3nKTmH-BZ-54Zu0.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/transaction-state-DR3nKTmH.d.mts"],"mappings":";;;;;;;;;;;;;KAOK,UAAU,WAAW,iBAAiB,yBAAyB;WACzD,eAAe;WACf,aAAa;WACb;;KAEN,YAAY,WAAW,iBAAiB,kBAAkB,SAAS,eAAe,UAAU;KAC5F,gBAAgB,KAAK,mBAAmB,IAAI;WACtC,eAAe;IACtB;KACC,iBAAiB,KAAK;WAChB;;KAEN,eAAe,iBAAiB,WAAW,IAAI;EAClD,SAAS,gBAAgB,EAAE;EAC3B,UAAU,iBAAiB,EAAE;;KAE1B,sBAAsB,GAAG,WAAW,8BAA8B,WAAW,IAAI,WAAW,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK;KAC3I,gBAAgB,GAAG,QAAQ,QAAQ,eAAe,OAAO,aAAa;UACjE,kBAAkB,QAAQ;WACzB;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,UAAU;WACV,OAAO;EAChB,MAAM,QAAQ,cAAc,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;;UAQ1F,kBAAkB;WACjB;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,UAAU;EACnB,QAAQ,QAAQ,cAAc,QAAQ,QAAQ,UAAU,wBAAwB,QAAQ;;;;;;;;;;;;;;;;;;KAkBrF,YAAY,QAAQ,QAAQ,uBAAuB,kBAAkB,QAAQ,QAAQ,cAAc,iBAAiB,kBAAkB,UAAU,kBAAkB,QAAQ;;;cAGjK;UACJ,uCAAuC;GAC9C,0BAA0B,QAAQ,WAAW,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uB,kBAAkB,QAAQ,QAAQ,cAAc,iBAAiB,kBAAkB,UAAU,kBAAkB,QAAQ;;;cAGjK;UACJ,uCAAuC;GAC9C,0BAA0B,QAAQ,WAAW,kBAAkB,SAAS,QAAQ,QAAQ,UAAU,wBAAwB,QAAQ;;;;cAIvH;UACJ,qCAAqC;GAC5C,wBAAwB,QAAQ,KAAK,WAAW,kBAAkB,QAAQ,MAAM,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;cAO3I;UACJ;;WAEC;;WAEA;;EAET,gBAAgB;;UAER;YACE,wBAAwB;;iBAEnB,aAAa,sBAAsB;;;;cAItC;UACJ;EACR;;UAEQ;YACE,mBAAmB;;iBAEd,0BAA0B"}
@@ -0,0 +1 @@
1
+ import "./types-Cl4MLNrS-GHKQvTNi.mjs";
@@ -3,7 +3,7 @@ import { IRNodeBase } from "@prisma/orm-framework/components/ir";
3
3
  import { CodecRef, DataType, ToCanonicalForm } from "@prisma/orm-framework/components/codec";
4
4
  import { ColumnDefault, ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
5
5
  import { DiffSubjectGranularity, DiffableNode, SchemaNodeRef } from "@prisma/orm-framework/components/control";
6
- //#region ../../../2-sql/1-core/schema-ir/dist/types-DIZSW9JI.d.mts
6
+ //#region ../../../2-sql/1-core/schema-ir/dist/types-C-z8HyiZ.d.mts
7
7
  //#region src/ir/default-in-canonical-form.d.ts
8
8
  interface DefaultInCanonicalForm {
9
9
  readonly value: ColumnDefaultLiteralInputValue;
@@ -280,6 +280,16 @@ declare class SqlColumnDefaultIR extends SqlSchemaIRNode implements DiffableNode
280
280
  type SqlAnnotations = {
281
281
  readonly [namespace: string]: unknown;
282
282
  };
283
+ /** What introspection hands over about the element type of one column. */
284
+ interface ReportedSqlType {
285
+ /** The element type's text as the database reports it: on Postgres its catalog text (`format_type`), on SQLite the declared type from `PRAGMA table_info`. */
286
+ readonly text: string;
287
+ /** The target's word for the type's kind, such as `enum`; undefined for a base type. */
288
+ readonly kind: string | undefined;
289
+ readonly schema: string | undefined;
290
+ /** The type's name, unquoted. */
291
+ readonly name: string | undefined;
292
+ }
283
293
  interface SqlColumnIRInput {
284
294
  readonly name: string;
285
295
  readonly nativeType: string;
@@ -346,6 +356,8 @@ interface SqlColumnIRInput {
346
356
  * Stamped on the contract-derived column; absent on introspected nodes.
347
357
  */
348
358
  readonly toCanonicalForm?: ToCanonicalForm;
359
+ /** The element type as the database reports it. Set by introspection; absent on contract-derived nodes. */
360
+ readonly reportedType?: ReportedSqlType;
349
361
  }
350
362
  /**
351
363
  * Schema IR node for a single column on a table, as observed by
@@ -384,6 +396,8 @@ declare class SqlColumnIR extends SqlSchemaIRNode implements DiffableNode {
384
396
  readonly dataType?: DataType;
385
397
  /** See {@link SqlColumnIRInput.toCanonicalForm}. Non-enumerable, same reason as {@link codecRef}. */
386
398
  readonly toCanonicalForm?: ToCanonicalForm;
399
+ /** See {@link SqlColumnIRInput.reportedType}. Non-enumerable, same reason as {@link codecRef}. */
400
+ readonly reportedType?: ReportedSqlType;
387
401
  constructor(input: SqlColumnIRInput);
388
402
  get id(): string;
389
403
  /**
@@ -722,5 +736,5 @@ declare class SqlSchemaIR extends SqlSchemaIRNode implements DiffableNode {
722
736
  children(): readonly DiffableNode[];
723
737
  }
724
738
  //#endregion
725
- export { SqlUniqueIRInput as C, defineNonEnumerable as D, defaultInCanonicalForm as E, relationalNodeEntityKind as O, SqlUniqueIR as S, contractDefaultRefusal as T, SqlSchemaIR as _, SqlAnnotations as a, SqlTableIR as b, SqlColumnDefaultIR as c, SqlColumnIRInput as d, SqlForeignKeyIR as f, SqlReferentialAction as g, SqlIndexIRInput as h, RelationalSchemaNodeKind as i, relationalNodeGranularity as k, SqlColumnDefaultIRInput as l, SqlIndexIR as m, PrimaryKey as n, SqlCheckConstraintIR as o, SqlForeignKeyIRInput as p, PrimaryKeyInput as r, SqlCheckConstraintIRInput as s, DefaultInCanonicalForm as t, SqlColumnIR as u, SqlSchemaIRInput as v, assertNode as w, SqlTableIRInput as x, SqlSchemaIRNode as y };
726
- //# sourceMappingURL=types-DIZSW9JI-DNUF-RnL.d.mts.map
739
+ export { relationalNodeGranularity as A, SqlUniqueIR as C, defaultInCanonicalForm as D, contractDefaultRefusal as E, defineNonEnumerable as O, SqlTableIRInput as S, assertNode as T, SqlReferentialAction as _, ReportedSqlType as a, SqlSchemaIRNode as b, SqlCheckConstraintIRInput as c, SqlColumnIR as d, SqlColumnIRInput as f, SqlIndexIRInput as g, SqlIndexIR as h, RelationalSchemaNodeKind as i, relationalNodeEntityKind as k, SqlColumnDefaultIR as l, SqlForeignKeyIRInput as m, PrimaryKey as n, SqlAnnotations as o, SqlForeignKeyIR as p, PrimaryKeyInput as r, SqlCheckConstraintIR as s, DefaultInCanonicalForm as t, SqlColumnDefaultIRInput as u, SqlSchemaIR as v, SqlUniqueIRInput as w, SqlTableIR as x, SqlSchemaIRInput as y };
740
+ //# sourceMappingURL=types-C-z8HyiZ-1Nhw0pHj.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-C-z8HyiZ-1Nhw0pHj.d.mts","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/types-C-z8HyiZ.d.mts"],"mappings":";;;;;;;UAMU;WACC,OAAO;;WAEP;;;;;;;iBAOM,uBAAuB,OAAO,gCAAgC,iBAAiB,6BAA6B,gBAAgB;;;;;iBAK5H,uBAAuB,eAAe,2BAA2B,iBAAiB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;uBAwBzG,wBAAwB;WACpC;;;;;;;;;oBASS;EAClB;;;;;;;;iBAQe,WAAW,UAAU,iBAAiB,MAAM,6BAA6B,mBAAmB,YAAY,MAAM,oBAAoB,QAAQ,YAAY,QAAQ;;;;;;;;;;iBAU9J,oBAAoB,kBAAkB,QAAQ,GAAG,aAAa;;;UAGrE;WACC;WACA;;;;;;WAMA,qBAAqB;;;;;;;;;;;;;;;cAelB,mBAAmB,2BAA2B;WACjD;WACA;WACA;;WA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OAAO;;;;UAIT;WACC;WACA,SAAS,eAAe,cAAc;WACtC,aAAa,cAAc,kBAAkB;WAC7C,SAAS,cAAc,cAAc;WACrC,SAAS,cAAc,aAAa;WACpC,aAAa,aAAa;WAC1B,cAAc;;WAEd,SAAS,cAAc,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;cAuB3C,mBAAmB,2BAA2B;WACjD;WACA;WACA,SAAS,SAAS,eAAe;WACjC,aAAa,cAAc;WAC3B,SAAS,cAAc;WACvB,SAAS,cAAc;WACvB,aAAa;WACb,cAAc;WACd,SAAS,cAAc;EAChC,YAAY,OAAO;MACf;EACJ,UAAU,OAAO;EACjB,qBAAqB;;;;UAIb;WACC,QAAQ,eAAe,aAAa;WACpC,cAAc;;;;;;;;;;;;;;;;;cAiBX,oBAAoB,2BAA2B;WAClD;WACA,QAAQ,SAAS,eAAe;WAChC,cAAc;EACvB,YAAY,OAAO;MACf;EACJ,UAAU,OAAO;EACjB,qBAAqB"}
@@ -0,0 +1 @@
1
+ import "./types-C-z8HyiZ-1Nhw0pHj.mjs";
@@ -1,13 +1,13 @@
1
1
  import { t as StorageColumn } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
2
2
  import { l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
3
- import { f as ExtractFieldOutputTypes } from "./types-DFZhLz18-Msi8wwig.mjs";
4
- import "./types-Uv3oTMAb.mjs";
5
- import { t as SqlLoweringSpec } from "./index-We-mbWnZ.mjs";
6
- import { Ct as ParamRef, O as ColumnRef } from "./types-Sh5HuaZE-CqThc46M.mjs";
3
+ import { m as ExtractFieldOutputTypes } from "./types-zwKzjyma-CxZkmkUI.mjs";
4
+ import "./types-HD5m-h8B.mjs";
5
+ import { t as SqlLoweringSpec } from "./index-CJlr0Eja.mjs";
6
+ import { Ct as ParamRef, O as ColumnRef } from "./types-Sh5HuaZE-Dq4AUzl7.mjs";
7
7
  import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
8
- import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
9
- import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mjs";
10
- import { n as ExecutionContext } from "./query-lane-context-C42-u9L1-Bxa4DkI_.mjs";
8
+ import { n as SqlQueryPlan } from "./plan-cGEaSXHv-Bv-SBtFA.mjs";
9
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-DI9L8IkC.mjs";
10
+ import { n as ExecutionContext } from "./query-lane-context-C42-u9L1-CUP3uW4A.mjs";
11
11
  import { Contract } from "@prisma/orm-framework/contract/types";
12
12
  import { AsyncIterableResult, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
13
13
  import { ParamSpec } from "@prisma/orm-framework/operations";
@@ -236,4 +236,4 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
236
236
  }
237
237
  //#endregion
238
238
  export { TablesOf as S, SqlOrmPlan as _, ColumnsOf as a, TableKey as b, META as c, ModelMetadata as d, OperationTypeSignature as f, SqlBuilderOptions as g, RuntimeScope as h, ColumnResolutionContract as i, Meta as l, OperationsForTypeId as m, BuildParamsMap as n, ComputeColumnJsType as o, OperationTypes as p, CodecTypes as r, Expr as s, BuildOptions as t, ModelDef as u, SqlPlan as v, TableMetadata as x, TableDef as y };
239
- //# sourceMappingURL=types-Cl4MLNrS-lbf-K25i.d.mts.map
239
+ //# sourceMappingURL=types-Cl4MLNrS-GHKQvTNi.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-Cl4MLNrS-lbf-K25i.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/types-Cl4MLNrS.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBK,WAAW,iBAAiB,iBAAiB,OAAO,aAAa;;;;;;;;UAQ5D;EACR,MAAM,KAAK,MAAM,WAAW,MAAM,UAAU,wBAAwB,oBAAoB;EACxF,QAAQ,MAAM,YAAY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UAEF;WACC,SAAS;;UAEV,kBAAkB,kBAAkB,SAAS,cAAc,SAAS;WACnE,SAAS,iBAAiB"}
@@ -1,11 +1,11 @@
1
1
  import { r as StorageTable, t as StorageColumn } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
2
2
  import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
3
- import { O as SqlControlDriverInstance } from "./types-DFZhLz18-Msi8wwig.mjs";
4
- import "./types-Uv3oTMAb.mjs";
5
- import { r as SqlOperationDescriptors } from "./index-We-mbWnZ.mjs";
6
- import { y as SqlSchemaIRNode } from "./types-DIZSW9JI-DNUF-RnL.mjs";
7
- import "./types-DqSCaTK3.mjs";
8
- import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-DH5DAObc.mjs";
3
+ import { j as SqlControlDriverInstance } from "./types-zwKzjyma-CxZkmkUI.mjs";
4
+ import "./types-HD5m-h8B.mjs";
5
+ import { r as SqlOperationDescriptors } from "./index-CJlr0Eja.mjs";
6
+ import { b as SqlSchemaIRNode } from "./types-C-z8HyiZ-1Nhw0pHj.mjs";
7
+ import "./types-CJK7FBdw.mjs";
8
+ import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-4WUzQP7G.mjs";
9
9
  import { Contract } from "@prisma/orm-framework/contract/types";
10
10
  import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
11
11
  import { Result } from "@prisma/orm-framework/utils/result";
@@ -408,4 +408,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
408
408
  }
409
409
  //#endregion
410
410
  export { StorageTypePlanResult as A, SqlPlanTargetDetails as C, SqlPlannerFailureResult as D, SqlPlannerConflictLocation as E, SqlPlannerResult as O, SqlMigrationRunnerSuccessValue as S, SqlPlannerConflictKind as T, SqlMigrationRunnerErrorCode as _, FieldEventContext as a, SqlMigrationRunnerFailure as b, SqlControlExtensionDescriptor as c, SqlMigrationPlanOperation as d, SqlMigrationPlanOperationStep as f, SqlMigrationRunner as g, SqlMigrationPlannerPlanOptions as h, FieldEvent as i, SqlPlannerSuccessResult as k, SqlMigrationPlan as l, SqlMigrationPlanner as m, CodecControlHooks as n, ResolveIdentityValueInput as o, SqlMigrationPlanOperationTarget as p, CreateSqlMigrationPlanOptions as r, SqlControlAdapterDescriptor as s, AnyRecord as t, SqlMigrationPlanContractInfo as u, SqlMigrationRunnerExecuteCallbacks as v, SqlPlannerConflict as w, SqlMigrationRunnerResult as x, SqlMigrationRunnerExecuteOptions as y };
411
- //# sourceMappingURL=types-CzxOObSY-BxwvvyRZ.d.mts.map
411
+ //# sourceMappingURL=types-CzxOObSY-DTQ2rnLF.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CzxOObSY-BxwvvyRZ.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-CzxOObSY.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;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ACA,SAAS;WACT,aAAa;WACb,qBAAqB,0BAA0B;;;;;;WAM/C;WACA,OAAO"}
@@ -6,7 +6,7 @@ import { blindCast } from "@prisma/orm-framework/utils/casts";
6
6
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
7
7
  import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
8
8
  import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
9
- //#region ../../../2-sql/1-core/schema-ir/dist/types-D0GFxty0.mjs
9
+ //#region ../../../2-sql/1-core/schema-ir/dist/types-DvhckjSz.mjs
10
10
  /**
11
11
  * A literal default in the canonical form of the column's values (ADR 254), element by element for
12
12
  * a list column. A `Date` is read as its ISO text first. A value the form refuses is kept as it is,
@@ -448,6 +448,7 @@ var SqlColumnIR = class SqlColumnIR extends SqlSchemaIRNode {
448
448
  defineNonEnumerable(this, "codecBaseNativeType", input.codecBaseNativeType);
449
449
  defineNonEnumerable(this, "dataType", input.dataType);
450
450
  defineNonEnumerable(this, "toCanonicalForm", input.toCanonicalForm);
451
+ defineNonEnumerable(this, "reportedType", input.reportedType);
451
452
  freezeNode(this);
452
453
  }
453
454
  get id() {
@@ -820,4 +821,4 @@ var SqlSchemaIR = class extends SqlSchemaIRNode {
820
821
  //#endregion
821
822
  export { relationalNodeGranularity as _, SqlColumnIR as a, SqlSchemaIR as c, SqlUniqueIR as d, assertNode as f, relationalNodeEntityKind as g, defineNonEnumerable as h, SqlColumnDefaultIR as i, SqlSchemaIRNode as l, defaultInCanonicalForm as m, RelationalSchemaNodeKind as n, SqlForeignKeyIR as o, contractDefaultRefusal as p, SqlCheckConstraintIR as r, SqlIndexIR as s, PrimaryKey as t, SqlTableIR as u };
822
823
 
823
- //# sourceMappingURL=types-D0GFxty0-CP8b4dR3.mjs.map
824
+ //# sourceMappingURL=types-DvhckjSz-Cm0Oodhr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DvhckjSz-Cm0Oodhr.mjs","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/types-DvhckjSz.mjs"],"sourcesContent":["import { f as normalizeIndexOptionValue, l as nameOf } from \"./naming-CT8tRisJ.mjs\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/ir/default-in-canonical-form.ts\n/**\n* A literal default in the canonical form of the column's values (ADR 254), element by element for\n* a list column. A `Date` is read as its ISO text first. A value the form refuses is kept as it is,\n* with the form's message.\n*/\nfunction defaultInCanonicalForm(value, toCanonicalForm, list) {\n\tif (toCanonicalForm === void 0) return {\n\t\tvalue,\n\t\trefusal: void 0\n\t};\n\tif (list && Array.isArray(value)) {\n\t\tconst elements = value.map((element) => inCanonicalForm(element, toCanonicalForm));\n\t\treturn {\n\t\t\tvalue: elements.map((element) => element.value),\n\t\t\trefusal: elements.find((element) => element.refusal !== void 0)?.refusal\n\t\t};\n\t}\n\tconst canonical = inCanonicalForm(value instanceof Date ? value.toISOString() : value, toCanonicalForm);\n\treturn canonical.refusal === void 0 ? canonical : {\n\t\tvalue,\n\t\trefusal: canonical.refusal\n\t};\n}\nfunction inCanonicalForm(value, toCanonicalForm) {\n\tif (value === null) return {\n\t\tvalue,\n\t\trefusal: void 0\n\t};\n\ttry {\n\t\treturn {\n\t\t\tvalue: toCanonicalForm(value),\n\t\t\trefusal: void 0\n\t\t};\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.CAST_REFUSED\") return {\n\t\t\tvalue,\n\t\t\trefusal: error.message\n\t\t};\n\t\tthrow error;\n\t}\n}\n/**\n* The refusal of a contract's literal default that the canonical form of its column's values does\n* not take, which a contract emitted by an earlier version can carry, with what to do about it.\n*/\nfunction contractDefaultRefusal(columnDefault, toCanonicalForm, list) {\n\tif (columnDefault?.kind !== \"literal\") return void 0;\n\tconst { refusal } = defaultInCanonicalForm(columnDefault.value, toCanonicalForm, list);\n\treturn refusal === void 0 ? void 0 : `The contract holds this default in a form its data type does not store: ${refusal} Re-emit the contract, then try again.`;\n}\n//#endregion\n//#region src/ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each relational schema-diff leaf node.\n* Each node carries a unique value; the differ pairs siblings by `id`, and\n* these kinds distinguish the node types that appear as `PostgresTableSchemaNode`\n* children (columns, primary key, foreign keys, uniques, indexes, checks) from\n* each other and from the RLS policy/role kinds a target defines separately.\n*/\nconst RelationalSchemaNodeKind = {\n\tschema: \"sql-schema\",\n\ttable: \"sql-table\",\n\tcolumn: \"sql-column\",\n\tcolumnDefault: \"sql-column-default\",\n\tprimaryKey: \"sql-primary-key\",\n\tforeignKey: \"sql-foreign-key\",\n\tunique: \"sql-unique\",\n\tindex: \"sql-index\",\n\tcheck: \"sql-check-constraint\"\n};\n/**\n* The one real map from a relational `nodeKind` to the framework-neutral\n* {@link DiffSubjectGranularity} its diff issues carry — the SQL family's\n* post-diff filters (issue category, strict-mode gating) and the framework\n* aggregate's unclaimed-elements sweep key on the granularity, never on the\n* `nodeKind` spelling and never on anything stamped on the node. Resolution\n* is by `nodeKind` equality against this map, not a suffix string match.\n* Target-specific node kinds (Postgres namespace/table/policy/role) are\n* outside this family layer's vocabulary and map their own kinds directly.\n*/\nconst RELATIONAL_NODE_GRANULARITY = {\n\t[RelationalSchemaNodeKind.schema]: \"structural\",\n\t[RelationalSchemaNodeKind.table]: \"entity\",\n\t[RelationalSchemaNodeKind.column]: \"field\",\n\t[RelationalSchemaNodeKind.columnDefault]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.primaryKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.foreignKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.unique]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.index]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.check]: \"auxiliary\"\n};\nfunction isRelationalSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(RELATIONAL_NODE_GRANULARITY, nodeKind);\n}\n/**\n* Looks up the subject granularity for a relational `nodeKind`. Throws for a\n* `nodeKind` outside this map (a target-specific kind, e.g. Postgres's\n* namespace/table/policy/role) — those map their own kinds directly rather\n* than through this family-level map.\n*/\nfunction relationalNodeGranularity(nodeKind) {\n\tif (!isRelationalSchemaNodeKind(nodeKind)) throw new InternalError(`relationalNodeGranularity: unrecognized relational node kind \"${nodeKind}\"`);\n\treturn RELATIONAL_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The one real map from a relational `nodeKind` to its storage `entityKind`\n* — the same vocabulary the contract storage's `entries` dictionary keys use\n* (`elementCoordinates` walks it). Only the whole-table kind has an entity of\n* its own; every other relational node (a column, an index, …) is nested\n* under one and maps to nothing here.\n*/\nconst RELATIONAL_NODE_ENTITY_KIND = { [RelationalSchemaNodeKind.table]: \"table\" };\n/**\n* Looks up the storage `entityKind` for a relational `nodeKind` — sibling of\n* {@link relationalNodeGranularity}, resolved by `nodeKind` equality against\n* {@link RELATIONAL_NODE_ENTITY_KIND}. `undefined` for a target-specific kind\n* (targets map their own kinds directly) or a relational kind with no entity\n* of its own.\n*/\nfunction relationalNodeEntityKind(nodeKind) {\n\treturn isRelationalSchemaNodeKind(nodeKind) ? RELATIONAL_NODE_ENTITY_KIND[nodeKind] : void 0;\n}\n//#endregion\n//#region src/ir/sql-schema-ir-node.ts\n/**\n* SQL Schema IR node base. Carries the family-level\n* `kind = 'sql-schema-ir'` discriminator and inherits the framework's\n* `freezeNode` affordance.\n*\n* SQL Schema IR represents the actual database state as discovered by\n* introspection (the parallel to SQL Contract IR, which represents the\n* desired state).\n*\n* The discriminator is installed as a non-enumerable own property,\n* matching the SqlNode pattern. This keeps `JSON.stringify(node)`\n* canonical (no `kind` field), keeps `toEqual({...})` test assertions\n* against pre-lift flat shapes passing, and keeps `node.kind` readable\n* for dispatch.\n*\n* Both `kind` and `nodeKind` are required: every concrete leaf is a node\n* the generic differ can pair and compare, so every leaf must declare which\n* node it is. `nodeKind` has no default here — every direct subclass sets its\n* own literal value (the relational leaves via `RelationalSchemaNodeKind`,\n* target concretions via their own vocabulary, e.g. `PostgresSchemaNodeKind`).\n*/\nvar SqlSchemaIRNode = class extends IRNodeBase {\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql-schema-ir\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t}\n};\n/**\n* Asserts `node` matches `predicate`, narrowing its type to `T`. The one\n* shared implementation every node class's `static assert` and `isEqualTo`\n* reach for, instead of each hand-writing its own throw: the message names\n* the class the caller expected.\n*/\nfunction assertNode(node, className, predicate) {\n\tif (node === void 0 || !predicate(node)) throw new InternalError(`Expected a ${className} but got nodeKind=${node?.nodeKind ?? \"undefined\"}`);\n}\n/**\n* Defines a non-enumerable own property, the same treatment `kind` gets\n* above: a derivation-time render-support field stays out of\n* `JSON.stringify`, `toEqual({...})` structural assertions, and spreads,\n* while remaining directly readable (`node.field`) for the one consumer\n* that resolves it at plan time. A no-op when `value` is `undefined` — the\n* property is simply absent, matching every other optional field on these\n* nodes.\n*/\nfunction defineNonEnumerable(target, key, value) {\n\tif (value === void 0) return;\n\tObject.defineProperty(target, key, {\n\t\tvalue,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tconfigurable: false\n\t});\n}\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`\n* shape (same `columns` + optional `name`) so verification can compare\n* intent and actual structurally. Defined here independently to avoid\n* a sql-schema-ir -> sql-contract dependency.\n*\n* Implements `DiffableNode` so a primary key is directly a table's diff-tree\n* child. `id` is a fixed sentinel — a table has at most one primary key, so\n* there is never a sibling to disambiguate against. `isEqualTo` compares the\n* column tuple; the PK's own `name` is a database-assigned label with no\n* semantic weight, so it is not compared (mirrors the policy node's\n* name-insensitivity to non-identifying detail).\n*/\nvar PrimaryKey = class PrimaryKey extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.primaryKey;\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\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"primary-key\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.primaryKey;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"PrimaryKey\", PrimaryKey.is);\n\t\treturn this.columns.length === node.columns.length && this.columns.every((c, i) => c === node.columns[i]);\n\t}\n};\n//#endregion\n//#region src/ir/sql-check-constraint-ir.ts\n/**\n* Schema IR node for a table-level check constraint, carried as an opaque\n* predicate. The expression is never parsed — a database reprints predicates\n* in its own normalized form, so any structured reading of it would drift.\n*\n* Implements `DiffableNode` so a check is directly a table's diff-tree child;\n* `id` is `check:<name>`. `isEqualTo` is mode-selected by the receiver's\n* `prefix` (the differ always calls `expected.isEqualTo(actual)`): a\n* wire-named receiver compares ids only — the wire name's hash already\n* commits to the predicate — while an exact-named receiver byte-compares the\n* expression, which is reliable precisely when both sides came from the same\n* reprint.\n*/\nvar SqlCheckConstraintIR = class SqlCheckConstraintIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.check;\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `check:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlCheckConstraintIR ? value : new SqlCheckConstraintIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.check;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlCheckConstraintIR\", SqlCheckConstraintIR.is);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.expression === node.expression;\n\t}\n};\n//#endregion\n//#region src/ir/resolved-default-equality.ts\n/**\n* Structural equality for two resolved column defaults, ported from the relational walk's\n* `columnDefaultsEqual` normalized branch: kinds must match; literal values are normalized (a\n* value of a type with a canonical form, such as a date or time type or a 64-bit integer type, to\n* that form through `toCanonicalForm`; a numeric native type's number to its decimal text, and when the type has\n* a modifier, its decimal text to its digits without zeros that do not change the value; a list\n* element by element under its element type) then compared canonically (JSON objects match their\n* canonical string form); function expressions compare case- and whitespace-insensitively.\n*\n* `nativeType` provides the normalization context (the actual side's resolved native type in a diff\n* comparison). `toCanonicalForm` is the canonical form of the column's values (ADR 254), from\n* `canonicalFormOf`; a value it refuses compares as it is. A target that reads a raw\n* expression as a literal does so before this comparison, through its `resolveDefault` hook.\n*/\nfunction resolvedDefaultsEqual(expected, actual, nativeType, toCanonicalForm) {\n\tif (expected.kind !== actual.kind) return false;\n\tif (expected.kind === \"literal\" && actual.kind === \"literal\") return literalValuesEqual(normalizeLiteralValue(expected.value, nativeType, toCanonicalForm), normalizeLiteralValue(actual.value, nativeType, toCanonicalForm));\n\tif (expected.kind === \"function\" && actual.kind === \"function\") return normalizeFunctionExpression(expected.expression) === normalizeFunctionExpression(actual.expression);\n\treturn false;\n}\nfunction normalizeFunctionExpression(expression) {\n\treturn expression.toLowerCase().replace(/\\s+/g, \"\");\n}\n/**\n* A numeric type with a modifier (`numeric(10,2)`, or `numeric(5,-2)` with the negative scale\n* PostgreSQL 15 and later accept) stores every value at its scale, so zeros that do not change the\n* value do not count. Without one, the value keeps the scale it was written with.\n*/\nconst DECIMAL_NATIVE_TYPE = /^(?:numeric|decimal)(\\(\\d+(?:,\\s*-?\\d+)?\\))?$/i;\nconst DECIMAL_NUMERAL = /^(-?)(\\d+)(?:\\.(\\d+))?$/;\nconst EXPONENT_NUMERAL = /^(-?)(\\d+)(?:\\.(\\d+))?[eE]([+-]?\\d+)$/;\n/**\n* The plain decimal spelling of a value, so that a number JavaScript prints as `1e-7` or `1e+21`\n* can be compared with the decimal text a numeric column stores. No digit is added or dropped;\n* only the decimal point moves.\n*/\nfunction decimalText(value) {\n\tconst text = String(value);\n\tconst numeral = EXPONENT_NUMERAL.exec(text);\n\tif (numeral === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\", exponent = \"0\"] = numeral;\n\tconst digits = `${whole}${fraction}`;\n\tconst point = whole.length + Number(exponent);\n\tif (point <= 0) return `${sign}0.${\"0\".repeat(-point)}${digits}`;\n\tif (point >= digits.length) return `${sign}${digits}${\"0\".repeat(point - digits.length)}`;\n\treturn `${sign}${digits.slice(0, point)}.${digits.slice(point)}`;\n}\nfunction decimalDigits(value) {\n\tconst numeral = DECIMAL_NUMERAL.exec(decimalText(value));\n\tif (numeral === null) return value;\n\tconst whole = (numeral[2] ?? \"\").replace(/^0+(?=\\d)/, \"\");\n\tconst fraction = (numeral[3] ?? \"\").replace(/0+$/, \"\");\n\tconst digits = fraction === \"\" ? whole : `${whole}.${fraction}`;\n\treturn digits === \"0\" ? digits : `${numeral[1] ?? \"\"}${digits}`;\n}\nfunction normalizeLiteralValue(value, nativeType, toCanonicalForm) {\n\tif (Array.isArray(value) && nativeType?.endsWith(\"[]\")) {\n\t\tconst elementType = nativeType.slice(0, -2);\n\t\treturn value.map((element) => normalizeLiteralValue(element, elementType, toCanonicalForm));\n\t}\n\tconst json = value instanceof Date ? value.toISOString() : value;\n\tif (toCanonicalForm !== void 0) return defaultInCanonicalForm(json, toCanonicalForm, false).value;\n\tif (value instanceof Date) return json;\n\tconst decimalType = nativeType === void 0 ? null : DECIMAL_NATIVE_TYPE.exec(nativeType);\n\tif ((typeof value === \"number\" || typeof value === \"string\") && decimalType !== null) return decimalType[1] === void 0 ? decimalText(value) : decimalDigits(value);\n\treturn value;\n}\nfunction literalValuesEqual(a, b) {\n\tif (a === b) return true;\n\tif (typeof a === \"object\" && a !== null && typeof b === \"object\" && b !== null) return canonicalStringify(a) === canonicalStringify(b);\n\tif (typeof a === \"object\" && a !== null && typeof b === \"string\") try {\n\t\treturn canonicalStringify(a) === canonicalStringify(JSON.parse(b));\n\t} catch {\n\t\treturn false;\n\t}\n\tif (typeof a === \"string\" && typeof b === \"object\" && b !== null) try {\n\t\treturn canonicalStringify(JSON.parse(a)) === canonicalStringify(b);\n\t} catch {\n\t\treturn false;\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/ir/sql-column-default-ir.ts\n/**\n* Schema-diff node for a column's default value. The default is the one\n* column attribute with an extra/missing/drift lifecycle of its own, so it\n* is a child node of the column rather than a compared attribute: an\n* undeclared live default surfaces as `not-expected`, a declared default the\n* database lacks as `not-found`, and a divergent value as `not-equal` — the\n* three reasons cover the legacy `extra_default` / `default_missing` /\n* `default_mismatch` vocabulary with no attribute inspection.\n*\n* `id` is a fixed sentinel — a column has at most one default. Built\n* transiently by `SqlColumnIR.children()` from the column's own fields;\n* never constructed by derivation or introspection directly.\n*/\nvar SqlColumnDefaultIR = class SqlColumnDefaultIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.columnDefault;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (input.resolved !== void 0) this.resolved = input.resolved;\n\t\tif (input.raw !== void 0) this.raw = input.raw;\n\t\tif (input.nativeTypeContext !== void 0) this.nativeTypeContext = input.nativeTypeContext;\n\t\tdefineNonEnumerable(this, \"authored\", input.authored);\n\t\tdefineNonEnumerable(this, \"many\", input.many);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"codecBaseNativeType\", input.codecBaseNativeType);\n\t\tdefineNonEnumerable(this, \"toCanonicalForm\", input.toCanonicalForm);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"default\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.columnDefault;\n\t}\n\t/**\n\t* Structured comparison with `this` as the expected side: both sides\n\t* resolved compare per the relational walk's `columnDefaultsEqual`\n\t* semantics, a literal through the canonical form of the column's values when the\n\t* contract-derived side carries one; a declared expected default against an unparseable actual\n\t* (raw present, no resolved parse) is a mismatch; two raw-only nodes fall\n\t* back to raw string equality.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnDefaultIR\", SqlColumnDefaultIR.is);\n\t\tif (this.resolved !== void 0 && node.resolved !== void 0) return resolvedDefaultsEqual(this.resolved, node.resolved, node.nativeTypeContext ?? this.nativeTypeContext, this.toCanonicalForm ?? node.toCanonicalForm);\n\t\tif (this.resolved !== void 0 || node.resolved !== void 0) return false;\n\t\treturn this.raw === node.raw;\n\t}\n\t/**\n\t* The refusal of an expected literal its canonical form does not take, which a contract emitted\n\t* by an earlier version can carry, so the mismatch names its cause.\n\t*/\n\texplainMismatch() {\n\t\treturn contractDefaultRefusal(this.resolved, this.toCanonicalForm, (this.many ?? this.codecRef?.many) === true);\n\t}\n};\n//#endregion\n//#region src/ir/sql-column-ir.ts\n/**\n* Schema IR node for a single column on a table, as observed by\n* introspection. Unlike the Contract IR `StorageColumn`, this carries\n* the column's `name` (Schema IR columns are returned as arrays from\n* introspection queries; the parent table re-keys them into a record\n* for downstream consumers).\n*\n* Implements `DiffableNode` so a column is directly a table's diff-tree\n* child: `id` is the column name (unique among a table's columns); `isEqualTo`\n* compares this column's own attributes only — never children, since a\n* column is a leaf. When both sides carry `resolvedNativeType` (stamped at\n* derivation/introspection), the comparison uses the resolved values —\n* resolved native type, nullability, and structured default equality per\n* the relational walk's `columnDefaultsEqual` semantics, with `this` as the\n* expected side. Otherwise it falls back to comparing raw fields.\n*/\nvar SqlColumnIR = class SqlColumnIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.column;\n\tname;\n\tnativeType;\n\tnullable;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.nativeType = input.nativeType;\n\t\tthis.nullable = input.nullable;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.many !== void 0) this.many = input.many;\n\t\tif (input.resolvedNativeType !== void 0) this.resolvedNativeType = input.resolvedNativeType;\n\t\tif (input.resolvedDefault !== void 0) this.resolvedDefault = input.resolvedDefault;\n\t\tdefineNonEnumerable(this, \"authoredDefault\", input.authoredDefault);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"codecBaseNativeType\", input.codecBaseNativeType);\n\t\tdefineNonEnumerable(this, \"dataType\", input.dataType);\n\t\tdefineNonEnumerable(this, \"toCanonicalForm\", input.toCanonicalForm);\n\t\tdefineNonEnumerable(this, \"reportedType\", input.reportedType);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `column:${this.name}`;\n\t}\n\t/**\n\t* The column's default, when declared/present, is the column's one child\n\t* node — it has an extra/missing/drift lifecycle of its own, so the differ\n\t* recurses to it rather than `isEqualTo` comparing it. Built transiently\n\t* from this column's own fields.\n\t*/\n\tchildren() {\n\t\tif (this.resolvedDefault === void 0 && this.default === void 0) return [];\n\t\treturn [new SqlColumnDefaultIR({\n\t\t\t...ifDefined(\"resolved\", this.resolvedDefault),\n\t\t\t...ifDefined(\"raw\", this.default),\n\t\t\t...ifDefined(\"authored\", this.authoredDefault),\n\t\t\t...ifDefined(\"nativeTypeContext\", this.resolvedNativeType),\n\t\t\t...ifDefined(\"many\", this.many ?? this.codecRef?.many),\n\t\t\t...ifDefined(\"codecRef\", this.codecRef),\n\t\t\t...ifDefined(\"codecBaseNativeType\", this.codecBaseNativeType),\n\t\t\t...ifDefined(\"toCanonicalForm\", this.toCanonicalForm)\n\t\t})];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.column;\n\t}\n\t/**\n\t* Compares the column's own attributes only — the default lives on the\n\t* child node. When both sides carry `resolvedNativeType`, the resolved\n\t* value governs (array-ness rides on its `[]` suffix); otherwise raw\n\t* fields compare.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\tif (this.resolvedNativeType !== void 0 && node.resolvedNativeType !== void 0) return this.resolvedNativeType === node.resolvedNativeType && this.nullable === node.nullable;\n\t\treturn this.nativeType === node.nativeType && this.nullable === node.nullable && Boolean(this.many) === Boolean(node.many);\n\t}\n};\n//#endregion\n//#region src/ir/sql-foreign-key-ir.ts\n/**\n* Schema IR node for a foreign-key constraint as observed by\n* introspection. The `referencedTable` / `referencedColumns` field\n* names match the introspection vocabulary (`pg_constraint.confkey`,\n* etc.) and intentionally differ from the Contract IR's nested\n* `references: { table, columns }` shape so that the verifier's\n* structural comparison stays explicit about which side it's reading.\n*\n* Implements `DiffableNode` so a foreign key is directly a table's diff-tree\n* child. Foreign keys are frequently unnamed (introspection may not carry a\n* constraint name, and the contract side never invents one), so `id` is\n* derived from the referencing/referenced coordinates rather than `name` —\n* the same tuple that makes two FK constraints the same constraint. This\n* also serves as the comparison key: two FKs with the same coordinates are\n* paired by the differ, and `isEqualTo` then compares the remaining\n* attribute — the referential actions.\n*/\nvar SqlForeignKeyIR = class SqlForeignKeyIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.foreignKey;\n\tcolumns;\n\treferencedTable;\n\treferencedColumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tthis.referencedTable = input.referencedTable;\n\t\tthis.referencedColumns = input.referencedColumns;\n\t\tif (input.referencedSchema !== void 0) this.referencedSchema = input.referencedSchema;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tconst resolvedReferencedNamespace = input.resolvedReferencedNamespace ?? input.referencedSchema;\n\t\tif (resolvedReferencedNamespace !== void 0) this.resolvedReferencedNamespace = resolvedReferencedNamespace;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\tconst referencedNamespace = this.resolvedReferencedNamespace ?? \"\";\n\t\treturn `foreign-key:${this.columns.join(\",\")}->${referencedNamespace}.${this.referencedTable}(${this.referencedColumns.join(\",\")})`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.foreignKey;\n\t}\n\t/**\n\t* Referential-action comparison with `this` as the expected side, matching\n\t* the relational walk's `getReferentialActionMismatches`: `noAction` is the\n\t* database default and equivalent to an undeclared action, and drift is\n\t* flagged only when the expected side declares a (normalized) action.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlForeignKeyIR\", SqlForeignKeyIR.is);\n\t\treturn referentialActionMatches(this.onDelete, node.onDelete) && referentialActionMatches(this.onUpdate, node.onUpdate);\n\t}\n};\nfunction referentialActionMatches(expected, actual) {\n\tconst normalizedExpected = expected === \"noAction\" ? void 0 : expected;\n\tif (normalizedExpected === void 0) return true;\n\treturn normalizedExpected === (actual === \"noAction\" ? void 0 : actual);\n}\n//#endregion\n//#region src/ir/sql-index-ir.ts\n/**\n* Schema IR node for a secondary index as observed by introspection.\n* Unlike the Contract IR `Index`, the Schema IR carries an explicit\n* `unique` field — introspection sees the underlying index regardless\n* of whether the user expressed it as `@@index` or `@@unique`, and the\n* verifier needs to distinguish them when comparing to the Contract.\n*\n* Implements `DiffableNode` so an index is directly a table's diff-tree\n* child. Indexes are name-identified: every index — contract-derived or\n* introspected — carries its full physical name, and `id` is that name.\n* Names are catalog-unique per schema, so two indexes legitimately sharing\n* one column tuple (a unique index beside a redundant plain index) are two\n* distinct siblings, and expression indexes need no column tuple at all.\n*\n* `isEqualTo` is selected by the receiver (the differ always calls\n* `expected.isEqualTo(actual)`) and delegates to {@link contentEquals} —\n* the single node-owned content relation: both modes compare `unique`\n* strict, `type` and option values through the named normalization seams,\n* and `columns` ordered-strict when both sides carry them; an exact-named\n* receiver (`prefix === undefined`) additionally byte-compares\n* `expression`/`where` (both sides are reprints in the supported flow —\n* normalizing would only mask real drift); a wire-named receiver never\n* compares bodies (the wire-name hash already commits to them).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL that any SQL target may\n* introspect, so the family node must represent them; a target declining\n* to author them is a capability decision, not target-specificity.\n*/\nvar SqlIndexIR = class SqlIndexIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.index;\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new InternalError(`SqlIndexIR \"${name}\": exactly one of columns or expression must be set.`);\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\tconst normalizedType = normalizeIndexType(input.type);\n\t\tif (normalizedType !== void 0) this.type = normalizedType;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tdefineNonEnumerable(this, \"partial\", input.partial);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `index:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlIndexIR ? value : new SqlIndexIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.index;\n\t}\n\t/**\n\t* Mode-selected structural equality — see the class doc. Delegates to the\n\t* single node-owned relation: `columns` compare ordered-strict when both\n\t* sides carry them; an exact receiver (`prefix === undefined`)\n\t* byte-compares `expression ?? ''` and `where ?? ''`; a wire-named receiver\n\t* never compares bodies (the wire-name hash already commits to them).\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlIndexIR\", SqlIndexIR.is);\n\t\treturn this.contentEquals(node, {\n\t\t\tcolumnPresence: \"when-both-defined\",\n\t\t\tbodies: this.prefix !== void 0 ? \"ignored\" : \"verbatim\"\n\t\t});\n\t}\n\t/**\n\t* The single index content-equality relation — every comparer (the differ\n\t* via {@link isEqualTo}, the planner's rename content-pairing) calls this\n\t* with its mode-appropriate strictness rather than growing a parallel\n\t* relation:\n\t*\n\t* - `columnPresence: 'when-both-defined'` (the differ's rule) compares\n\t* the tuples ordered-strict only when both sides carry them — a paired\n\t* node's identity already agreed, so a column node meeting an\n\t* expression node skips the tuple.\n\t* - `columnPresence: 'matching'` (the rename-pairing rule) additionally\n\t* requires presence to agree: a column index never pairs an expression\n\t* index.\n\t* - `bodies: 'verbatim'` byte-compares `expression ?? ''` / `where ?? ''`\n\t* (absent ≡ empty, no normalization — both sides are reprints in the\n\t* supported flow); `bodies: 'ignored'` skips them (wire identity —\n\t* the wire-name hash commits to the content).\n\t*\n\t* `unique` compares strictly; `type` and option VALUES compare through\n\t* the named normalization seams below.\n\t*/\n\tcontentEquals(other, strictness) {\n\t\tconst columnsEqual = strictness.columnPresence === \"matching\" ? this.columns === void 0 === (other.columns === void 0) && (this.columns === void 0 || isArrayEqual(this.columns, other.columns ?? [])) : this.columns === void 0 || other.columns === void 0 || isArrayEqual(this.columns, other.columns);\n\t\tif (!(this.unique === other.unique && normalizeIndexType(this.type) === normalizeIndexType(other.type) && indexOptionsEqual(this.options, other.options) && columnsEqual)) return false;\n\t\tif (strictness.bodies === \"ignored\") return true;\n\t\treturn (this.expression ?? \"\") === (other.expression ?? \"\") && (this.where ?? \"\") === (other.where ?? \"\");\n\t}\n};\n/**\n* The btree-default normalization seam: the default access method (`btree`\n* in every supported SQL target) normalizes to absent. Applied at\n* construction — every derivation path (contract tree, introspection, flat\n* family tree) builds through the class, so both compare sides are\n* symmetric by definition — and again inside\n* {@link SqlIndexIR.contentEquals} so the relation holds for any input.\n* The contract JSON and the wire-name content hash keep the authored\n* spelling: `@@index([a], type: \"btree\")` and `@@index([a])` are distinct\n* wire names — but content-equal after normalization, so a spelling change\n* between them converges as a rename via the planner's content\n* pairing (the hashes differ, so hash pairing never pairs them).\n*/\nfunction normalizeIndexType(type) {\n\treturn type === \"btree\" ? void 0 : type;\n}\n/**\n* Option-bag equality: same key set, values compared through\n* {@link normalizeIndexOptionValue} — Postgres introspection returns\n* reloptions values as catalog-reprint strings (`'70'`, `'on'`) while\n* contract option leaves are typed (number, boolean, string).\n*/\nfunction indexOptionsEqual(a, b) {\n\tconst aKeys = a ? Object.keys(a).sort() : [];\n\tconst bKeys = b ? Object.keys(b).sort() : [];\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i += 1) if (aKeys[i] !== bKeys[i]) return false;\n\tif (aKeys.length === 0) return true;\n\tfor (const key of aKeys) if (normalizeIndexOptionValue(a?.[key]) !== normalizeIndexOptionValue(b?.[key])) return false;\n\treturn true;\n}\n//#endregion\n//#region src/ir/sql-unique-ir.ts\n/**\n* Schema IR node for a table-level unique constraint as observed by\n* introspection.\n*\n* Implements `DiffableNode` so a unique constraint is directly a table's\n* diff-tree child. Unique constraints are frequently unnamed, so `id` is\n* derived from the column tuple rather than `name` — the column tuple is\n* also what makes two unique constraints the same constraint, so it doubles\n* as the pairing key. There are no further attributes to compare once\n* columns are equal (the differ pairs on `id`), so `isEqualTo` is identity.\n*/\nvar SqlUniqueIR = class SqlUniqueIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.unique;\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\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `unique:${this.columns.join(\",\")}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.unique;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlUniqueIR\", SqlUniqueIR.is);\n\t\treturn this.id === node.id;\n\t}\n};\n//#endregion\n//#region src/ir/sql-table-ir.ts\n/**\n* Schema IR node for a single table as observed by introspection.\n*\n* Unlike the Contract IR `StorageTable`, this carries the table's\n* `name` — introspection queries return tables as arrays and the\n* verifier keys them into `SqlSchemaIR.tables` afterwards, so the name\n* stays on the table object for downstream call sites that walk\n* `Object.values(schema.tables)`.\n*\n* The constructor normalises nested IR-class fields so downstream\n* walks see a uniform AST regardless of whether the input was a\n* plain-data literal (from introspection) or already-constructed\n* class instances.\n*\n* Implements `DiffableNode` so a flat (single-schema) tree is directly\n* diffable: `id` is the table name; `isEqualTo` is identity (the table's\n* structural drift is entirely expressed by its children); `children()`\n* yields every column, the primary key (when present), every foreign key,\n* unique, index, and check constraint — the same composition and order as\n* the Postgres table node, minus policies.\n*/\nvar SqlTableIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map(SqlIndexIR.from));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(SqlCheckConstraintIR.from));\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [\n\t\t\t...Object.values(this.columns),\n\t\t\t...this.primaryKey ? [this.primaryKey] : [],\n\t\t\t...this.foreignKeys,\n\t\t\t...this.uniques,\n\t\t\t...this.indexes,\n\t\t\t...this.checks ?? []\n\t\t];\n\t}\n};\n//#endregion\n//#region src/ir/sql-schema-ir.ts\n/**\n* Root Schema IR node representing the complete database schema as\n* observed by introspection. Target-agnostic; used by both verifiers\n* (compare against intended Contract storage) and migration planners\n* (derive operations needed to reconcile).\n*\n* The constructor normalises nested `SqlTableIR` instances so\n* downstream walks see a uniform AST regardless of whether the input\n* was a plain-data literal or already-constructed class instances.\n*\n* Implements `DiffableNode` as the root of a flat (single-schema) diff\n* tree: `id` is the fixed sentinel `'database'` (roots have no siblings),\n* `isEqualTo` is identity (a container has no own attributes), and\n* `children()` yields the table nodes.\n*/\nvar SqlSchemaIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.schema;\n\ttables;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tables = Object.freeze(Object.fromEntries(Object.entries(input.tables).map(([key, t]) => [key, t instanceof SqlTableIR ? t : new SqlTableIR(t)])));\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"database\";\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn Object.values(this.tables);\n\t}\n};\n//#endregion\nexport { defaultInCanonicalForm as _, SqlForeignKeyIR as a, SqlCheckConstraintIR as c, assertNode as d, defineNonEnumerable as f, contractDefaultRefusal as g, relationalNodeGranularity as h, SqlIndexIR as i, PrimaryKey as l, relationalNodeEntityKind as m, SqlTableIR as n, SqlColumnIR as o, RelationalSchemaNodeKind as p, SqlUniqueIR as r, SqlColumnDefaultIR as s, SqlSchemaIR as t, SqlSchemaIRNode as u };\n\n//# sourceMappingURL=types-DvhckjSz.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,uBAAuB,OAAO,iBAAiB,MAAM;CAC7D,IAAI,oBAAoB,KAAK,GAAG,OAAO;EACtC;EACA,SAAS,KAAK;CACf;CACA,IAAI,QAAQ,MAAM,QAAQ,KAAK,GAAG;EACjC,MAAM,WAAW,MAAM,KAAK,YAAY,gBAAgB,SAAS,eAAe,CAAC;EACjF,OAAO;GACN,OAAO,SAAS,KAAK,YAAY,QAAQ,KAAK;GAC9C,SAAS,SAAS,MAAM,YAAY,QAAQ,YAAY,KAAK,CAAC,CAAC,EAAE;EAClE;CACD;CACA,MAAM,YAAY,gBAAgB,iBAAiB,OAAO,MAAM,YAAY,IAAI,OAAO,eAAe;CACtG,OAAO,UAAU,YAAY,KAAK,IAAI,YAAY;EACjD;EACA,SAAS,UAAU;CACpB;AACD;AACA,SAAS,gBAAgB,OAAO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