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

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 (221) hide show
  1. package/dist/{ast-Bf6J9_ra.d.mts → ast-Bmb-2vbO.d.mts} +3 -3
  2. package/dist/{ast-Bf6J9_ra.d.mts.map → ast-Bmb-2vbO.d.mts.map} +1 -1
  3. package/dist/{authoring-entity-types-CZ-vdwYS-Bq3LXsCn.d.mts → authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts} +2 -2
  4. package/dist/{authoring-entity-types-CZ-vdwYS-Bq3LXsCn.d.mts.map → authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts.map} +1 -1
  5. package/dist/{authoring-type-constructors-0Iv2zdwS-CVl4womm.mjs → authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs} +2 -2
  6. package/dist/{authoring-type-constructors-0Iv2zdwS-CVl4womm.mjs.map → authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs.map} +1 -1
  7. package/dist/builder.d.mts +2 -2
  8. package/dist/builder__runtime.d.mts +9 -9
  9. package/dist/builder__runtime.mjs +1 -1
  10. package/dist/builder__types.d.mts +2 -2
  11. package/dist/{codec-descriptor-registry-D7bl9ayf.mjs → codec-descriptor-registry-CdIIOkuE.mjs} +2 -2
  12. package/dist/{codec-descriptor-registry-D7bl9ayf.mjs.map → codec-descriptor-registry-CdIIOkuE.mjs.map} +1 -1
  13. package/dist/{config-types-DeIF6WyF.mjs → config-types-D0sxpKAN.mjs} +2 -2
  14. package/dist/{config-types-DeIF6WyF.mjs.map → config-types-D0sxpKAN.mjs.map} +1 -1
  15. package/dist/{config-types-Cag6qJnA.d.mts → config-types-DB6gRJ5K.d.mts} +4 -4
  16. package/dist/{config-types-Cag6qJnA.d.mts.map → config-types-DB6gRJ5K.d.mts.map} +1 -1
  17. package/dist/{contract-builder-BaJMQFAc.d.mts → contract-builder-V5pFHDv3.d.mts} +14 -11
  18. package/dist/contract-builder-V5pFHDv3.d.mts.map +1 -0
  19. package/dist/{contract-builder-BlFrYr97.mjs → contract-builder-tEax3I2q.mjs} +4 -4
  20. package/dist/{contract-builder-BlFrYr97.mjs.map → contract-builder-tEax3I2q.mjs.map} +1 -1
  21. package/dist/contract-emitter.mjs +1 -1
  22. package/dist/contract-prisma7__provider.d.mts +2 -2
  23. package/dist/contract-prisma7__provider.mjs +36 -8
  24. package/dist/contract-prisma7__provider.mjs.map +1 -1
  25. package/dist/contract-psl.d.mts +3 -3
  26. package/dist/contract-psl.mjs +1 -1
  27. package/dist/contract-psl__attribute-specs.d.mts +4 -4
  28. package/dist/contract-psl__attribute-specs.d.mts.map +1 -1
  29. package/dist/contract-psl__attribute-specs.mjs +1 -1
  30. package/dist/contract-psl__provider.d.mts +2 -2
  31. package/dist/contract-psl__provider.mjs +2 -2
  32. package/dist/contract-psl__provider.mjs.map +1 -1
  33. package/dist/contract-ts.d.mts +3 -3
  34. package/dist/contract-ts.mjs +3 -3
  35. package/dist/contract-ts__config-types.d.mts +1 -1
  36. package/dist/contract-ts__config-types.mjs +1 -1
  37. package/dist/contract-ts__contract-builder.d.mts +2 -2
  38. package/dist/contract-ts__contract-builder.mjs +2 -2
  39. package/dist/{contract-view-Cd6_tdxU.d.mts → contract-view-C1xX3yIj.d.mts} +2 -2
  40. package/dist/{contract-view-Cd6_tdxU.d.mts.map → contract-view-C1xX3yIj.d.mts.map} +1 -1
  41. package/dist/contract.d.mts +14 -14
  42. package/dist/contract.mjs +9 -8
  43. package/dist/contract__contract-view.d.mts +1 -1
  44. package/dist/contract__entity-kinds.d.mts +1 -1
  45. package/dist/contract__entity-kinds.mjs +1 -1
  46. package/dist/contract__factories.d.mts +1 -1
  47. package/dist/contract__factories.mjs +1 -1
  48. package/dist/contract__foreign-key-materialization.d.mts +2 -2
  49. package/dist/contract__foreign-key-materialization.mjs +3 -2
  50. package/dist/contract__index-type-validation.d.mts +1 -1
  51. package/dist/contract__referential-action-sql.d.mts +1 -1
  52. package/dist/contract__resolve-storage-table.d.mts +1 -1
  53. package/dist/contract__types.d.mts +6 -6
  54. package/dist/contract__types.mjs +3 -3
  55. package/dist/contract__validators.d.mts +1 -1
  56. package/dist/contract__validators.mjs +2 -2
  57. package/dist/{control-BkyDhucB.d.mts → control-B3Mb21Md.d.mts} +16 -16
  58. package/dist/{control-BkyDhucB.d.mts.map → control-B3Mb21Md.d.mts.map} +1 -1
  59. package/dist/{control-BRbds4vn.mjs → control-C5Yy0n3w.mjs} +10 -10
  60. package/dist/{control-BRbds4vn.mjs.map → control-C5Yy0n3w.mjs.map} +1 -1
  61. package/dist/control-adapter-BXQ29_fa.d.mts +1 -0
  62. package/dist/{control-adapter-CkFfBVei-Ba9JNrCN.d.mts → control-adapter-CkFfBVei-BLYeKcLW.d.mts} +6 -6
  63. package/dist/{control-adapter-CkFfBVei-Ba9JNrCN.d.mts.map → control-adapter-CkFfBVei-BLYeKcLW.d.mts.map} +1 -1
  64. package/dist/{db-D7R5zKiH-SEM04lcK.d.mts → db-D7R5zKiH-P7Tg4ZXk.d.mts} +9 -9
  65. package/dist/{db-D7R5zKiH-SEM04lcK.d.mts.map → db-D7R5zKiH-P7Tg4ZXk.d.mts.map} +1 -1
  66. package/dist/{ddl-types-DtKZjNtN-6TxFf4bH.d.mts → ddl-types-DtKZjNtN-CByECwns.d.mts} +4 -4
  67. package/dist/{ddl-types-DtKZjNtN-6TxFf4bH.d.mts.map → ddl-types-DtKZjNtN-CByECwns.d.mts.map} +1 -1
  68. package/dist/{derived-checks-DdguQPYm-BP57ljP8.mjs → derived-checks-D5zdlyyh-CPofdm1W.mjs} +30 -20
  69. package/dist/{derived-checks-DdguQPYm-BP57ljP8.mjs.map → derived-checks-D5zdlyyh-CPofdm1W.mjs.map} +1 -1
  70. package/dist/{derived-checks-DpPkO6Dt-BituyKFg.d.mts → derived-checks-DpPkO6Dt-D3M7YEr2.d.mts} +3 -3
  71. package/dist/{derived-checks-DpPkO6Dt-BituyKFg.d.mts.map → derived-checks-DpPkO6Dt-D3M7YEr2.d.mts.map} +1 -1
  72. package/dist/{diff-DMOqiT2h.d.mts → diff-CBqsNkxe.d.mts} +6 -6
  73. package/dist/{diff-DMOqiT2h.d.mts.map → diff-CBqsNkxe.d.mts.map} +1 -1
  74. package/dist/{dist-7hmkNQGd.mjs → dist-Dm_hQ-hh.mjs} +2 -2
  75. package/dist/{dist-7hmkNQGd.mjs.map → dist-Dm_hQ-hh.mjs.map} +1 -1
  76. package/dist/{entity-kinds-DCwkg9t7.d.mts → entity-kinds--HvqT50S.d.mts} +2 -2
  77. package/dist/{entity-kinds-DCwkg9t7.d.mts.map → entity-kinds--HvqT50S.d.mts.map} +1 -1
  78. package/dist/{entity-kinds-JlqzyFoo-kIaAUFyK.mjs → entity-kinds-O3V1K26U-B8TUrsX2.mjs} +16 -5
  79. package/dist/entity-kinds-O3V1K26U-B8TUrsX2.mjs.map +1 -0
  80. package/dist/{expression-B-QXMOmY.d.mts → expression-DE893va7.d.mts} +7 -7
  81. package/dist/{expression-B-QXMOmY.d.mts.map → expression-DE893va7.d.mts.map} +1 -1
  82. package/dist/{factories-BsUyFxsk.mjs → factories-Bp41Aity.mjs} +4 -3
  83. package/dist/factories-Bp41Aity.mjs.map +1 -0
  84. package/dist/{factories-CgVRbL8l.d.mts → factories-DzLBAAvj.d.mts} +4 -4
  85. package/dist/{factories-CgVRbL8l.d.mts.map → factories-DzLBAAvj.d.mts.map} +1 -1
  86. package/dist/family.d.mts +13 -13
  87. package/dist/family.mjs +6 -6
  88. package/dist/family__control-adapter.d.mts +2 -2
  89. package/dist/family__control.d.mts +4 -4
  90. package/dist/family__control.mjs +3 -3
  91. package/dist/family__diff.d.mts +2 -2
  92. package/dist/family__diff.mjs +1 -1
  93. package/dist/family__ir.d.mts +1 -1
  94. package/dist/family__ir.mjs +1 -1
  95. package/dist/family__migration.d.mts +1 -1
  96. package/dist/family__pack.d.mts +1 -1
  97. package/dist/family__pack.mjs +2 -2
  98. package/dist/family__psl-build.mjs +1 -1
  99. package/dist/family__psl-infer.d.mts +1 -1
  100. package/dist/family__psl-infer.mjs +1 -1
  101. package/dist/family__runtime.d.mts +2 -2
  102. package/dist/foreign-key-materialization-Cv3q8Pix.mjs +278 -0
  103. package/dist/foreign-key-materialization-Cv3q8Pix.mjs.map +1 -0
  104. package/dist/foreign-key-materialization-D0Ltg78T.d.mts +96 -0
  105. package/dist/foreign-key-materialization-D0Ltg78T.d.mts.map +1 -0
  106. package/dist/{foreign-key-C-iTPuRT-C9ip8zFx.d.mts → foreign-key-qkDFfG8t-Fyrzd0VI.d.mts} +20 -4
  107. package/dist/foreign-key-qkDFfG8t-Fyrzd0VI.d.mts.map +1 -0
  108. package/dist/{index-qOLTnfYz.d.mts → index-CnpTmyXs.d.mts} +3 -3
  109. package/dist/{index-qOLTnfYz.d.mts.map → index-CnpTmyXs.d.mts.map} +1 -1
  110. package/dist/index-equivalence-DswCiq5l-C7wLMPwF.mjs +109 -0
  111. package/dist/index-equivalence-DswCiq5l-C7wLMPwF.mjs.map +1 -0
  112. package/dist/{index-DYjWQAcJ.d.mts → index-oNRBExeI.d.mts} +11 -11
  113. package/dist/{index-DYjWQAcJ.d.mts.map → index-oNRBExeI.d.mts.map} +1 -1
  114. package/dist/{index-type-validation-BHppm9U-.d.mts → index-type-validation-B925ye4q.d.mts} +3 -3
  115. package/dist/{index-type-validation-BHppm9U-.d.mts.map → index-type-validation-B925ye4q.d.mts.map} +1 -1
  116. package/dist/{interpreter-BF5Xrf3W-bdklH78q.mjs → interpreter-DlG-2o64-DmykcFbp.mjs} +64 -17
  117. package/dist/interpreter-DlG-2o64-DmykcFbp.mjs.map +1 -0
  118. package/dist/{ir-BYHqe2mj.d.mts → ir-BPrf_vgX.d.mts} +3 -3
  119. package/dist/{ir-BYHqe2mj.d.mts.map → ir-BPrf_vgX.d.mts.map} +1 -1
  120. package/dist/middleware-DwaZ6s12.d.mts +1 -0
  121. package/dist/{middleware-mLwvcOLS-6Y52seRP.d.mts → middleware-mLwvcOLS-SaqhgsmA.d.mts} +2 -2
  122. package/dist/{middleware-mLwvcOLS-6Y52seRP.d.mts.map → middleware-mLwvcOLS-SaqhgsmA.d.mts.map} +1 -1
  123. package/dist/{migration-C5HGygKM.d.mts → migration-C_J49WKy.d.mts} +4 -4
  124. package/dist/{migration-C5HGygKM.d.mts.map → migration-C_J49WKy.d.mts.map} +1 -1
  125. package/dist/operations.d.mts +1 -1
  126. package/dist/orm-client.d.mts +15 -15
  127. package/dist/orm-client.mjs +1 -1
  128. package/dist/{pack-l0vLQrO8.d.mts → pack-DZtuLikU.d.mts} +3 -3
  129. package/dist/{pack-l0vLQrO8.d.mts.map → pack-DZtuLikU.d.mts.map} +1 -1
  130. package/dist/plan-Dhl03MtT.d.mts +2 -0
  131. package/dist/{plan-cGEaSXHv-2F5y-Dpy.d.mts → plan-cGEaSXHv-BeW-cC5v.d.mts} +4 -4
  132. package/dist/{plan-cGEaSXHv-2F5y-Dpy.d.mts.map → plan-cGEaSXHv-BeW-cC5v.d.mts.map} +1 -1
  133. package/dist/{prepared-statement-YtgdlN7e-DBJtJAm7.d.mts → prepared-statement-YtgdlN7e-CI1fD5IM.d.mts} +16 -16
  134. package/dist/{prepared-statement-YtgdlN7e-DBJtJAm7.d.mts.map → prepared-statement-YtgdlN7e-CI1fD5IM.d.mts.map} +1 -1
  135. package/dist/{psl-build-Di-cBOCv.mjs → psl-build-B5iMVWHu.mjs} +2 -2
  136. package/dist/{psl-build-Di-cBOCv.mjs.map → psl-build-B5iMVWHu.mjs.map} +1 -1
  137. package/dist/{psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts → psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts} +2 -2
  138. package/dist/{psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts.map → psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts.map} +1 -1
  139. package/dist/{psl-field-resolution-DUCrDnuq-DSxPrd-4.mjs → psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs} +6 -6
  140. package/dist/psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs.map +1 -0
  141. package/dist/{psl-infer-fU7LRjTx.mjs → psl-infer-B0yuv-j_.mjs} +22 -16
  142. package/dist/psl-infer-B0yuv-j_.mjs.map +1 -0
  143. package/dist/{psl-infer-Cm7eDSA-.d.mts → psl-infer-DkPZJnUM.d.mts} +11 -12
  144. package/dist/{psl-infer-Cm7eDSA-.d.mts.map → psl-infer-DkPZJnUM.d.mts.map} +1 -1
  145. package/dist/query-lane-context-BaoHpLsE.d.mts +1 -0
  146. package/dist/{query-lane-context-CJoNBspB-Ylhia3fC.d.mts → query-lane-context-CJoNBspB-CR_n8DNB.d.mts} +5 -5
  147. package/dist/{query-lane-context-CJoNBspB-Ylhia3fC.d.mts.map → query-lane-context-CJoNBspB-CR_n8DNB.d.mts.map} +1 -1
  148. package/dist/{referential-action-sql-DJ9ps6-S.d.mts → referential-action-sql-Cw1Q0YSd.d.mts} +2 -2
  149. package/dist/referential-action-sql-Cw1Q0YSd.d.mts.map +1 -0
  150. package/dist/relational-core.d.mts +11 -11
  151. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  152. package/dist/relational-core__ast.d.mts +3 -3
  153. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  154. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  155. package/dist/relational-core__contract-free.d.mts +4 -4
  156. package/dist/relational-core__expression.d.mts +1 -1
  157. package/dist/relational-core__middleware.d.mts +2 -2
  158. package/dist/relational-core__plan.d.mts +3 -3
  159. package/dist/relational-core__query-lane-context.d.mts +2 -2
  160. package/dist/relational-core__types.d.mts +2 -2
  161. package/dist/{resolve-storage-table-Ba33K41A.d.mts → resolve-storage-table-B7m9cFy4.d.mts} +3 -3
  162. package/dist/{resolve-storage-table-Ba33K41A.d.mts.map → resolve-storage-table-B7m9cFy4.d.mts.map} +1 -1
  163. package/dist/{runtime-BUemUdMk.d.mts → runtime-Ca7PVQcJ.d.mts} +2 -2
  164. package/dist/{runtime-BUemUdMk.d.mts.map → runtime-Ca7PVQcJ.d.mts.map} +1 -1
  165. package/dist/runtime.d.mts +4 -4
  166. package/dist/runtime.mjs +2 -2
  167. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  168. package/dist/{schema-differ-CqWOkoW9--uxNOini.d.mts → schema-differ-CqWOkoW9-BABSAGGB.d.mts} +3 -3
  169. package/dist/{schema-differ-CqWOkoW9--uxNOini.d.mts.map → schema-differ-CqWOkoW9-BABSAGGB.d.mts.map} +1 -1
  170. package/dist/{schema-verify-DIfHSB4I-CjYnmUuD.mjs → schema-verify-DIfHSB4I-Dx3Tq9hf.mjs} +2 -2
  171. package/dist/{schema-verify-DIfHSB4I-CjYnmUuD.mjs.map → schema-verify-DIfHSB4I-Dx3Tq9hf.mjs.map} +1 -1
  172. package/dist/{serialized-index-QAYy0fjm-zxvK3RBa.mjs → serialized-index-C26m_DWu-CnNi8WAI.mjs} +3 -3
  173. package/dist/{serialized-index-QAYy0fjm-zxvK3RBa.mjs.map → serialized-index-C26m_DWu-CnNi8WAI.mjs.map} +1 -1
  174. package/dist/{sql-contract-serializer-DDaAVCQr-CLDkZLXO.mjs → sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs} +4 -4
  175. package/dist/{sql-contract-serializer-DDaAVCQr-CLDkZLXO.mjs.map → sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs.map} +1 -1
  176. package/dist/{sql-execution-plan-C7XauPPu-BMi8hJlv.d.mts → sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts} +2 -2
  177. package/dist/{sql-execution-plan-C7XauPPu-BMi8hJlv.d.mts.map → sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts.map} +1 -1
  178. package/dist/{sql-storage-DSnnRQAf-DaHPnley.d.mts → sql-storage-BTlJLUID-O6fBB_am.d.mts} +3 -3
  179. package/dist/{sql-storage-DSnnRQAf-DaHPnley.d.mts.map → sql-storage-BTlJLUID-O6fBB_am.d.mts.map} +1 -1
  180. package/dist/{storage-table-CyL4CNMi-ByGZXmzd.mjs → storage-table-B7OSPl3G-EOodFPzq.mjs} +5 -3
  181. package/dist/storage-table-B7OSPl3G-EOodFPzq.mjs.map +1 -0
  182. package/dist/{storage-table-BBcKoAuF-CssyCQhM.d.mts → storage-table-WXeVNycx-tlFMnbig.d.mts} +3 -3
  183. package/dist/{storage-table-BBcKoAuF-CssyCQhM.d.mts.map → storage-table-WXeVNycx-tlFMnbig.d.mts.map} +1 -1
  184. package/dist/{types-BJQcLx-8-DSnaugR4.d.mts → types-BJQcLx-8-DY221fiX.d.mts} +10 -10
  185. package/dist/{types-BJQcLx-8-DSnaugR4.d.mts.map → types-BJQcLx-8-DY221fiX.d.mts.map} +1 -1
  186. package/dist/{types-DkOYK86-.d.mts → types-BURWzacK.d.mts} +5 -5
  187. package/dist/{types-DkOYK86-.d.mts.map → types-BURWzacK.d.mts.map} +1 -1
  188. package/dist/{types-DDHgx581.mjs → types-C7oOtFcJ.mjs} +2 -2
  189. package/dist/{types-DDHgx581.mjs.map → types-C7oOtFcJ.mjs.map} +1 -1
  190. package/dist/{types-CzxOObSY-CNWyrf87.d.mts → types-CzxOObSY-DEfjmbj1.d.mts} +7 -7
  191. package/dist/{types-CzxOObSY-CNWyrf87.d.mts.map → types-CzxOObSY-DEfjmbj1.d.mts.map} +1 -1
  192. package/dist/{types-DV040Uuq-Bu8CnbMa.d.mts → types-DFZhLz18-C_h0u-Zx.d.mts} +8 -7
  193. package/dist/types-DFZhLz18-C_h0u-Zx.d.mts.map +1 -0
  194. package/dist/types-DLjT0ADz.d.mts +1 -0
  195. package/dist/{types-Sh5HuaZE-C8I29pGQ.d.mts → types-Sh5HuaZE-B_FQUPng.d.mts} +2 -2
  196. package/dist/{types-Sh5HuaZE-C8I29pGQ.d.mts.map → types-Sh5HuaZE-B_FQUPng.d.mts.map} +1 -1
  197. package/dist/{validators-BAa0JKuB.d.mts → validators-Cr_FFJAG.d.mts} +5 -4
  198. package/dist/{validators-BAa0JKuB.d.mts.map → validators-Cr_FFJAG.d.mts.map} +1 -1
  199. package/dist/{validators-Xx-TKcx3.mjs → validators-oyDG5mVX.mjs} +22 -2
  200. package/dist/validators-oyDG5mVX.mjs.map +1 -0
  201. package/package.json +18 -18
  202. package/dist/contract-builder-BaJMQFAc.d.mts.map +0 -1
  203. package/dist/control-adapter-CD_gz6TI.d.mts +0 -1
  204. package/dist/entity-kinds-JlqzyFoo-kIaAUFyK.mjs.map +0 -1
  205. package/dist/factories-BsUyFxsk.mjs.map +0 -1
  206. package/dist/foreign-key-C-iTPuRT-C9ip8zFx.d.mts.map +0 -1
  207. package/dist/foreign-key-materialization-IGfTKmHV.mjs +0 -73
  208. package/dist/foreign-key-materialization-IGfTKmHV.mjs.map +0 -1
  209. package/dist/foreign-key-materialization-U4M9cqKd.d.mts +0 -65
  210. package/dist/foreign-key-materialization-U4M9cqKd.d.mts.map +0 -1
  211. package/dist/interpreter-BF5Xrf3W-bdklH78q.mjs.map +0 -1
  212. package/dist/middleware-BFoORv3y.d.mts +0 -1
  213. package/dist/plan-CmfWjqtI.d.mts +0 -2
  214. package/dist/psl-field-resolution-DUCrDnuq-DSxPrd-4.mjs.map +0 -1
  215. package/dist/psl-infer-fU7LRjTx.mjs.map +0 -1
  216. package/dist/query-lane-context-qK5s2okl.d.mts +0 -1
  217. package/dist/referential-action-sql-DJ9ps6-S.d.mts.map +0 -1
  218. package/dist/storage-table-CyL4CNMi-ByGZXmzd.mjs.map +0 -1
  219. package/dist/types-14L6c26e.d.mts +0 -1
  220. package/dist/types-DV040Uuq-Bu8CnbMa.d.mts.map +0 -1
  221. package/dist/validators-Xx-TKcx3.mjs.map +0 -1
@@ -50,8 +50,8 @@ type RelationField = {
50
50
  readonly references?: readonly string[] | undefined;
51
51
  readonly onDelete?: string | undefined;
52
52
  readonly onUpdate?: string | undefined;
53
- /** `false` when the FK's source columns have no live backing index; omitted (the default) otherwise. */
54
- readonly index?: boolean | undefined;
53
+ /** `false` when nothing live serves the FK's lookups, the name of the live key or index that serves them where the derived backing index would not match it, omitted (the default) otherwise. */
54
+ readonly index?: false | string | undefined;
55
55
  };
56
56
  //#endregion
57
57
  //#region src/core/psl-contract-infer/relation-inference.d.ts
@@ -67,17 +67,16 @@ declare function inferRelations(tables: Record<string, SqlTableIR>, modelNameMap
67
67
  * `tables` (e.g. a cross-space reference into another contract) can reuse the
68
68
  * same normalization instead of duplicating it.
69
69
  *
70
- * `hostTable` is the table the FK is declared on (i.e. `table`, not the
71
- * referenced parent) — its own indexes/uniques/primary key are what a
72
- * backing index for this FK would be. When none of them exactly match the
73
- * FK's source columns (in order), `index: false` is stamped so the emitted
74
- * `@relation` opts out of the framework's default derived backing-index
75
- * expectation, matching what `db verify` will find live. Passing the table
76
- * is optional so existing single-FK callers (e.g. cross-space resolution
77
- * before a host table reference is threaded through) can omit it and keep
78
- * the framework default.
70
+ * `hostTable` is the table the FK is declared on (not the referenced
71
+ * parent). `contract emit` derives a backing index for every relation and
72
+ * drops it again when the table has an identical index or a key serving its
73
+ * lookups, by the same rule (`derivedBackingIndexIsRedundant`). Otherwise
74
+ * the relation names a live named key or plain index whose first columns are
75
+ * the foreign key's (`leadingBackingObjectName`), or says `index: false`, so
76
+ * the emitted contract expects no index the database lacks. Without a host
77
+ * table, the relation keeps the default.
79
78
  */
80
79
  declare function buildChildRelationField(fieldName: string, parentModelName: string, fk: SqlForeignKeyIR, optional: boolean, relationName?: string, hostTable?: SqlTableIR): RelationField;
81
80
  //#endregion
82
81
  export { buildChildRelationField as a, inferRelations as c, toFieldName as d, toModelName as f, RelationField as i, pluralize as l, InferredRelations as n, deriveBackRelationFieldName as o, PslPrinterOptions as r, deriveRelationFieldName as s, EnumInfo as t, toEnumName as u };
83
- //# sourceMappingURL=psl-infer-Cm7eDSA-.d.mts.map
82
+ //# sourceMappingURL=psl-infer-DkPZJnUM.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"psl-infer-Cm7eDSA-.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.d.mts"],"mappings":";;;;;;KAIK;WACM;WACA;;iBAEM,YAAY,oBAAoB;iBAChC,YAAY,qBAAqB;iBACjC,WAAW,qBAAqB;iBAChC,UAAU;iBACV,wBAAwB,8BAA8B;iBACtD,4BAA4B,wBAAwB;;;UAG3D;WACC,WAAW;WACX,aAAa;;UAEd;WACC,SAAS;WACT,iBAAiB;WACjB,WAAW;WACX,mBAAmB,oBAAoB,wBAAwB;;KAErE;WACM;WACA;;;;;;WAMA;;;;;;WAMA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;;;KAIN;WACM,kBAAkB,6BAA6B;;iBAEzC,eAAe,QAAQ,eAAe,aAAa,cAAc,8BAA8B;;;;;;;;;;;;;;;;;;;iBAmB/F,wBAAwB,mBAAmB,yBAAyB,IAAI,iBAAiB,mBAAmB,uBAAuB,YAAY,aAAa"}
1
+ {"version":3,"file":"psl-infer-DkPZJnUM.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.d.mts"],"mappings":";;;;;;KAIK;WACM;WACA;;iBAEM,YAAY,oBAAoB;iBAChC,YAAY,qBAAqB;iBACjC,WAAW,qBAAqB;iBAChC,UAAU;iBACV,wBAAwB,8BAA8B;iBACtD,4BAA4B,wBAAwB;;;UAG3D;WACC,WAAW;WACX,aAAa;;UAEd;WACC,SAAS;WACT,iBAAiB;WACjB,WAAW;WACX,mBAAmB,oBAAoB,wBAAwB;;KAErE;WACM;WACA;;;;;;WAMA;;;;;;WAMA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;;;KAIN;WACM,kBAAkB,6BAA6B;;iBAEzC,eAAe,QAAQ,eAAe,aAAa,cAAc,8BAA8B;;;;;;;;;;;;;;;;;;iBAkB/F,wBAAwB,mBAAmB,yBAAyB,IAAI,iBAAiB,mBAAmB,uBAAuB,YAAY,aAAa"}
@@ -0,0 +1 @@
1
+ import "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
@@ -1,7 +1,7 @@
1
- import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
2
- import "./types-DkOYK86-.mjs";
3
- import { a as SqlOperationRegistry } from "./index-qOLTnfYz.mjs";
4
- import { c as AnyExpression, k as ContractCodecRegistry } from "./types-Sh5HuaZE-C8I29pGQ.mjs";
1
+ import { l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
2
+ import "./types-BURWzacK.mjs";
3
+ import { a as SqlOperationRegistry } from "./index-CnpTmyXs.mjs";
4
+ import { c as AnyExpression, k as ContractCodecRegistry } from "./types-Sh5HuaZE-B_FQUPng.mjs";
5
5
  import { CodecDescriptor, CodecRef } from "@prisma/orm-framework/components/codec";
6
6
  import { Contract } from "@prisma/orm-framework/contract/types";
7
7
  import { AggregateDescriptor, AggregateResultNullability } from "@prisma/orm-framework/components/components";
@@ -118,4 +118,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
118
118
  }
119
119
  //#endregion
120
120
  export { SqlAggregateDescriptorRegistry as a, TypeHelperRegistry as c, SqlAggregateDescriptor as i, isSqlAggregateDescriptor as l, ExecutionContext as n, SqlAggregateLowering as o, ResolvedSqlAggregate as r, SqlAggregateLoweringContext as s, CodecDescriptorRegistry as t };
121
- //# sourceMappingURL=query-lane-context-CJoNBspB-Ylhia3fC.d.mts.map
121
+ //# sourceMappingURL=query-lane-context-CJoNBspB-CR_n8DNB.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-lane-context-CJoNBspB-Ylhia3fC.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-CJoNBspB.d.mts"],"mappings":";;;;;;;;;;;;;UAWU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;;;;KAOxB,uBAAuB;WACjB;WACA,QAAQ;WACR,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;;;;;;UAMhB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS,qBAAqB;WACvF,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO"}
1
+ {"version":3,"file":"query-lane-context-CJoNBspB-CR_n8DNB.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-CJoNBspB.d.mts"],"mappings":";;;;;;;;;;;;;UAWU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;;;;KAOxB,uBAAuB;WACjB;WACA,QAAQ;WACR,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;;;;;;UAMhB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS,qBAAqB;WACvF,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO"}
@@ -1,4 +1,4 @@
1
- import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
1
+ import { o as ReferentialAction } from "./foreign-key-qkDFfG8t-Fyrzd0VI.mjs";
2
2
  //#region ../../../2-sql/1-core/contract/dist/referential-action-sql.d.mts
3
3
  //#region src/referential-action-sql.d.ts
4
4
  /**
@@ -9,4 +9,4 @@ import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
9
9
  declare const REFERENTIAL_ACTION_SQL: Record<ReferentialAction, string>;
10
10
  //#endregion
11
11
  export { REFERENTIAL_ACTION_SQL as t };
12
- //# sourceMappingURL=referential-action-sql-DJ9ps6-S.d.mts.map
12
+ //# sourceMappingURL=referential-action-sql-Cw1Q0YSd.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"referential-action-sql-Cw1Q0YSd.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/referential-action-sql.d.mts"],"mappings":";;;;;;;;cAOc,wBAAwB,OAAO"}
@@ -1,13 +1,13 @@
1
- import { $ as InsertValue, $t as queryAstKinds, A as DefaultValueExpr, At as RawQueryResult, B as EqColJoinOn, Bt as ToWhereExpr, C as CodecCallContext$1, Ct as ParamRef, D as CodecTrait$1, Dt as RawExpr, E as CodecRef$1, Et as ProjectionItem, F as DescriptorCodecJson, Ft as SqlCodecInstanceContext, G as ExpressionSource, Gt as aggregateFnNames, H as ExprVisitor, Ht as WhereArg, I as DescriptorCodecTraits, It as SqlColumnRef, J as FunctionSource, Jt as isAggregateFn, K as ExtractCodecTypes, Kt as checkLimitOffset, L as Direction, Lt as SubqueryExpr, M as DerivedTableSource, Mt as SelectAst, N as DescriptorCodecId, Nt as SelectAstOptions, O as ColumnRef, Ot as RawQueryAst, P as DescriptorCodecInput, Pt as SqlCodecCallContext, Q as InsertOnConflict, Qt as isWhereExpr, R as DoNothingConflictAction, Rt as TableRef, S as Codec$1, St as OrderByNulls, T as CodecJsonValueProjection, Tt as ProjectionExpr, U as ExpressionFolder, Ut as WindowFn, V as ExistsExpr, Vt as UpdateAst, W as ExpressionRewriter, Wt as WindowFuncExpr, X as IdentifierRef, Xt as isOrderByNulls, Y as FunctionSourceAlias, Yt as isOrderByDirection, Z as InsertAst, Zt as isQueryAst, _ as BinaryExpr, _t as NotExpr, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as OrExpr, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LockWaitPolicy, en as whereExprKinds, et as JoinAst, f as AnyJsonValueProjection, ft as LockingClause, g as AstRewriter, gt as NativeJsonValueProjection, h as AnyQueryAst, ht as LoweredStatement, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as RawSqlLiteral, k as ContractCodecRegistry, kt as RawQueryColumn, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as LoweredParam, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as LockingClauseOptions, q as FunctionCallExpr, qt as frozenCodecRef, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LockStrength, v as BinaryOp, vt as NullCheckExpr, w as CodecDescriptor$1, wt as PreparedParamRef, x as CastExpr, xt as OrderByItem, y as CaseBranch, yt as OperationExpr, z as DoUpdateSetConflictAction, zt as TableSource } from "./types-Sh5HuaZE-C8I29pGQ.mjs";
1
+ import { $ as InsertValue, $t as queryAstKinds, A as DefaultValueExpr, At as RawQueryResult, B as EqColJoinOn, Bt as ToWhereExpr, C as CodecCallContext$1, Ct as ParamRef, D as CodecTrait$1, Dt as RawExpr, E as CodecRef$1, Et as ProjectionItem, F as DescriptorCodecJson, Ft as SqlCodecInstanceContext, G as ExpressionSource, Gt as aggregateFnNames, H as ExprVisitor, Ht as WhereArg, I as DescriptorCodecTraits, It as SqlColumnRef, J as FunctionSource, Jt as isAggregateFn, K as ExtractCodecTypes, Kt as checkLimitOffset, L as Direction, Lt as SubqueryExpr, M as DerivedTableSource, Mt as SelectAst, N as DescriptorCodecId, Nt as SelectAstOptions, O as ColumnRef, Ot as RawQueryAst, P as DescriptorCodecInput, Pt as SqlCodecCallContext, Q as InsertOnConflict, Qt as isWhereExpr, R as DoNothingConflictAction, Rt as TableRef, S as Codec$1, St as OrderByNulls, T as CodecJsonValueProjection, Tt as ProjectionExpr, U as ExpressionFolder, Ut as WindowFn, V as ExistsExpr, Vt as UpdateAst, W as ExpressionRewriter, Wt as WindowFuncExpr, X as IdentifierRef, Xt as isOrderByNulls, Y as FunctionSourceAlias, Yt as isOrderByDirection, Z as InsertAst, Zt as isQueryAst, _ as BinaryExpr, _t as NotExpr, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as OrExpr, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LockWaitPolicy, en as whereExprKinds, et as JoinAst, f as AnyJsonValueProjection, ft as LockingClause, g as AstRewriter, gt as NativeJsonValueProjection, h as AnyQueryAst, ht as LoweredStatement, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as RawSqlLiteral, k as ContractCodecRegistry, kt as RawQueryColumn, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as LoweredParam, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as LockingClauseOptions, q as FunctionCallExpr, qt as frozenCodecRef, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LockStrength, v as BinaryOp, vt as NullCheckExpr, w as CodecDescriptor$1, wt as PreparedParamRef, x as CastExpr, xt as OrderByItem, y as CaseBranch, yt as OperationExpr, z as DoUpdateSetConflictAction, zt as TableSource } from "./types-Sh5HuaZE-B_FQUPng.mjs";
2
2
  import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
3
- import { a as DdlNode, c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, h as renderOpaqueSql, i as DdlColumnDefault, l as LiteralColumnDefault, m as opaqueSql, n as CheckExpressionConstraint, o as DdlTableConstraint, p as isDdlNode, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault, u as OpaqueSql } from "./ddl-types-DtKZjNtN-6TxFf4bH.mjs";
4
- import { $ as sqlTextColumn, A as collectOrderedParamRefs, B as sqlCharColumn, C as SqlFloatDescriptor, D as SqlTextDescriptor, E as SqlTextCodec, F as lockIncompatible, G as sqlFloatColumn, H as sqlCharDescriptor, I as lockOptionCapabilities, J as sqlFloatEncode, K as sqlFloatDecode, L as lockStrengthCapabilities, M as encodeListLiteralDefault, N as encodeLiteralDefault, O as SqlVarcharCodec, P as isAggregateProjection, Q as sqlIntEncode, R as lockWaitPolicyOf, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlCharEncode, V as sqlCharDecode, W as sqlCharRenderOutputType, X as sqlIntDecode, Y as sqlIntColumn, Z as sqlIntDescriptor, _ as SQL_INT_CODEC_ID, a as EncodedLiteralDefault, at as sqlVarcharDescriptor, b as SqlCharCodec, c as LockOptionCapabilities, d as LockWaitRequest, et as sqlTextDecode, f as Lowerer, g as SQL_FLOAT_CODEC_ID, h as SQL_CHAR_CODEC_ID, i as CapabilityRequirement, it as sqlVarcharDecode, j as compact, k as SqlVarcharDescriptor, l as LockStrengthCapabilities, m as MarkerReadResult, n as AdapterProfile, nt as sqlTextEncode, o as LiteralDefaultColumn, ot as sqlVarcharEncode, p as LowererContext, q as sqlFloatDescriptor, r as AdapterTarget, rt as sqlVarcharColumn, s as LockConflict, st as sqlVarcharRenderOutputType, t as Adapter, tt as sqlTextDescriptor, u as LockWaitOptions, v as SQL_TEXT_CODEC_ID, w as SqlIntCodec, x as SqlCharDescriptor, y as SQL_VARCHAR_CODEC_ID, z as missingCapability } from "./ast-Bf6J9_ra.mjs";
5
- import { n as SqlQueryPlan, r as planFromAst, t as Preparable } from "./plan-cGEaSXHv-2F5y-Dpy.mjs";
6
- import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-B-QXMOmY.mjs";
7
- import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BMi8hJlv.mjs";
8
- import "./plan-CmfWjqtI.mjs";
9
- import { a as SqlAggregateDescriptorRegistry, c as TypeHelperRegistry, n as ExecutionContext, r as ResolvedSqlAggregate, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-Ylhia3fC.mjs";
10
- import "./query-lane-context-qK5s2okl.mjs";
11
- import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as SqlPlan, x as TableMetadata, y as TableDef } from "./types-BJQcLx-8-DSnaugR4.mjs";
12
- import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-mLwvcOLS-6Y52seRP.mjs";
3
+ import { a as DdlNode, c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, h as renderOpaqueSql, i as DdlColumnDefault, l as LiteralColumnDefault, m as opaqueSql, n as CheckExpressionConstraint, o as DdlTableConstraint, p as isDdlNode, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault, u as OpaqueSql } from "./ddl-types-DtKZjNtN-CByECwns.mjs";
4
+ import { $ as sqlTextColumn, A as collectOrderedParamRefs, B as sqlCharColumn, C as SqlFloatDescriptor, D as SqlTextDescriptor, E as SqlTextCodec, F as lockIncompatible, G as sqlFloatColumn, H as sqlCharDescriptor, I as lockOptionCapabilities, J as sqlFloatEncode, K as sqlFloatDecode, L as lockStrengthCapabilities, M as encodeListLiteralDefault, N as encodeLiteralDefault, O as SqlVarcharCodec, P as isAggregateProjection, Q as sqlIntEncode, R as lockWaitPolicyOf, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlCharEncode, V as sqlCharDecode, W as sqlCharRenderOutputType, X as sqlIntDecode, Y as sqlIntColumn, Z as sqlIntDescriptor, _ as SQL_INT_CODEC_ID, a as EncodedLiteralDefault, at as sqlVarcharDescriptor, b as SqlCharCodec, c as LockOptionCapabilities, d as LockWaitRequest, et as sqlTextDecode, f as Lowerer, g as SQL_FLOAT_CODEC_ID, h as SQL_CHAR_CODEC_ID, i as CapabilityRequirement, it as sqlVarcharDecode, j as compact, k as SqlVarcharDescriptor, l as LockStrengthCapabilities, m as MarkerReadResult, n as AdapterProfile, nt as sqlTextEncode, o as LiteralDefaultColumn, ot as sqlVarcharEncode, p as LowererContext, q as sqlFloatDescriptor, r as AdapterTarget, rt as sqlVarcharColumn, s as LockConflict, st as sqlVarcharRenderOutputType, t as Adapter, tt as sqlTextDescriptor, u as LockWaitOptions, v as SQL_TEXT_CODEC_ID, w as SqlIntCodec, x as SqlCharDescriptor, y as SQL_VARCHAR_CODEC_ID, z as missingCapability } from "./ast-Bmb-2vbO.mjs";
5
+ import { n as SqlQueryPlan, r as planFromAst, t as Preparable } from "./plan-cGEaSXHv-BeW-cC5v.mjs";
6
+ import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-DE893va7.mjs";
7
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BFhGKvp4.mjs";
8
+ import "./plan-Dhl03MtT.mjs";
9
+ import { a as SqlAggregateDescriptorRegistry, c as TypeHelperRegistry, n as ExecutionContext, r as ResolvedSqlAggregate, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
10
+ import "./query-lane-context-BaoHpLsE.mjs";
11
+ import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as SqlPlan, x as TableMetadata, y as TableDef } from "./types-BJQcLx-8-DY221fiX.mjs";
12
+ import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-mLwvcOLS-SaqhgsmA.mjs";
13
13
  export { Adapter, AdapterProfile, AdapterTarget, AffectedCount, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyCodecDescriptorTemplate, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, CapabilityRequirement, CaseBranch, CaseExpr, CastExpr, CheckExpressionConstraint, Codec$1 as Codec, type CodecCallContext$1 as CodecCallContext, type CodecDescriptor$1 as CodecDescriptor, CodecDescriptorRegistry, CodecExpression, CodecJsonValueProjection, type CodecRef$1 as CodecRef, type CodecTrait$1 as CodecTrait, CodecTypes, CodecTypesBase, CodecValue, ColumnRef, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, ContractCodecRegistry, DdlColumn, DdlColumnDefault, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EncodedLiteralDefault, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralDefaultColumn, LiteralExpr, LockConflict, LockOptionCapabilities, LockStrength, LockStrengthCapabilities, LockWaitOptions, LockWaitPolicy, LockWaitRequest, LockingClause, LockingClauseOptions, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult, Meta, ModelDef, ModelMetadata, NativeJsonValueProjection, NoReservedRowColumn, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, OrderByNulls, ParamRef, type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, Preparable, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawAffectedCountQuery, RawCodecInferer, RawExpr, RawPlanContext, RawQueryAst, RawQueryColumn, RawQueryResult, RawRow, RawRowQuery, RawRowSpec, RawRowSpecEntry, RawSqlBuilder, RawSqlInterpolation, RawSqlLiteral, RawSqlStatementBuilder, RawSqlStatementTag, RawSqlTag, ResolvedSqlAggregate, type RuntimeScope, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, ScalarListExpression, ScopeField, SelectAst, SelectAstOptions, SqlAggregateDescriptorRegistry, SqlBuilderOptions, SqlCharCodec, SqlCharDescriptor, SqlCodecCallContext, SqlCodecInstanceContext, SqlColumnRef, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, type SqlExecutionPlan, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, type SqlOrmPlan, type SqlParamRefMutator, type SqlParamRefMutatorInternal, SqlPlan, SqlQueryPlan, SqlQueryable, SqlStatementStats, SqlTextCodec, SqlTextDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, buildOperation, checkLimitOffset, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isExpression, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, param, planFromAst, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
@@ -1,4 +1,4 @@
1
- import { a as SqlAggregateDescriptorRegistry, i as SqlAggregateDescriptor, l as isSqlAggregateDescriptor, o as SqlAggregateLowering, s as SqlAggregateLoweringContext, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-Ylhia3fC.mjs";
1
+ import { a as SqlAggregateDescriptorRegistry, i as SqlAggregateDescriptor, l as isSqlAggregateDescriptor, o as SqlAggregateLowering, s as SqlAggregateLoweringContext, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
2
2
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.d.mts
3
3
  //#region src/aggregate-descriptor-registry.d.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { $ as InsertValue, $t as queryAstKinds, A as DefaultValueExpr, At as RawQueryResult, B as EqColJoinOn, Bt as ToWhereExpr, C as CodecCallContext$1, Ct as ParamRef, D as CodecTrait$1, Dt as RawExpr, E as CodecRef$1, Et as ProjectionItem, F as DescriptorCodecJson, Ft as SqlCodecInstanceContext, G as ExpressionSource, Gt as aggregateFnNames, H as ExprVisitor, Ht as WhereArg, I as DescriptorCodecTraits, It as SqlColumnRef, J as FunctionSource, Jt as isAggregateFn, K as ExtractCodecTypes, Kt as checkLimitOffset, L as Direction, Lt as SubqueryExpr, M as DerivedTableSource, Mt as SelectAst, N as DescriptorCodecId, Nt as SelectAstOptions, O as ColumnRef, Ot as RawQueryAst, P as DescriptorCodecInput, Pt as SqlCodecCallContext, Q as InsertOnConflict, Qt as isWhereExpr, R as DoNothingConflictAction, Rt as TableRef, S as Codec$1, St as OrderByNulls, T as CodecJsonValueProjection, Tt as ProjectionExpr, U as ExpressionFolder, Ut as WindowFn, V as ExistsExpr, Vt as UpdateAst, W as ExpressionRewriter, Wt as WindowFuncExpr, X as IdentifierRef, Xt as isOrderByNulls, Y as FunctionSourceAlias, Yt as isOrderByDirection, Z as InsertAst, Zt as isQueryAst, _ as BinaryExpr, _t as NotExpr, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as OrExpr, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LockWaitPolicy, en as whereExprKinds, et as JoinAst, f as AnyJsonValueProjection, ft as LockingClause, g as AstRewriter, gt as NativeJsonValueProjection, h as AnyQueryAst, ht as LoweredStatement, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as RawSqlLiteral, k as ContractCodecRegistry, kt as RawQueryColumn, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as LoweredParam, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as LockingClauseOptions, q as FunctionCallExpr, qt as frozenCodecRef, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LockStrength, v as BinaryOp, vt as NullCheckExpr, w as CodecDescriptor$1, wt as PreparedParamRef, x as CastExpr, xt as OrderByItem, y as CaseBranch, yt as OperationExpr, z as DoUpdateSetConflictAction, zt as TableSource } from "./types-Sh5HuaZE-C8I29pGQ.mjs";
1
+ import { $ as InsertValue, $t as queryAstKinds, A as DefaultValueExpr, At as RawQueryResult, B as EqColJoinOn, Bt as ToWhereExpr, C as CodecCallContext$1, Ct as ParamRef, D as CodecTrait$1, Dt as RawExpr, E as CodecRef$1, Et as ProjectionItem, F as DescriptorCodecJson, Ft as SqlCodecInstanceContext, G as ExpressionSource, Gt as aggregateFnNames, H as ExprVisitor, Ht as WhereArg, I as DescriptorCodecTraits, It as SqlColumnRef, J as FunctionSource, Jt as isAggregateFn, K as ExtractCodecTypes, Kt as checkLimitOffset, L as Direction, Lt as SubqueryExpr, M as DerivedTableSource, Mt as SelectAst, N as DescriptorCodecId, Nt as SelectAstOptions, O as ColumnRef, Ot as RawQueryAst, P as DescriptorCodecInput, Pt as SqlCodecCallContext, Q as InsertOnConflict, Qt as isWhereExpr, R as DoNothingConflictAction, Rt as TableRef, S as Codec$1, St as OrderByNulls, T as CodecJsonValueProjection, Tt as ProjectionExpr, U as ExpressionFolder, Ut as WindowFn, V as ExistsExpr, Vt as UpdateAst, W as ExpressionRewriter, Wt as WindowFuncExpr, X as IdentifierRef, Xt as isOrderByNulls, Y as FunctionSourceAlias, Yt as isOrderByDirection, Z as InsertAst, Zt as isQueryAst, _ as BinaryExpr, _t as NotExpr, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as OrExpr, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LockWaitPolicy, en as whereExprKinds, et as JoinAst, f as AnyJsonValueProjection, ft as LockingClause, g as AstRewriter, gt as NativeJsonValueProjection, h as AnyQueryAst, ht as LoweredStatement, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as RawSqlLiteral, k as ContractCodecRegistry, kt as RawQueryColumn, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as LoweredParam, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as LockingClauseOptions, q as FunctionCallExpr, qt as frozenCodecRef, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LockStrength, v as BinaryOp, vt as NullCheckExpr, w as CodecDescriptor$1, wt as PreparedParamRef, x as CastExpr, xt as OrderByItem, y as CaseBranch, yt as OperationExpr, z as DoUpdateSetConflictAction, zt as TableSource } from "./types-Sh5HuaZE-B_FQUPng.mjs";
2
2
  import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
3
- import { a as DdlNode, c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, h as renderOpaqueSql, i as DdlColumnDefault, l as LiteralColumnDefault, m as opaqueSql, n as CheckExpressionConstraint, o as DdlTableConstraint, p as isDdlNode, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault, u as OpaqueSql } from "./ddl-types-DtKZjNtN-6TxFf4bH.mjs";
4
- import { $ as sqlTextColumn, A as collectOrderedParamRefs, B as sqlCharColumn, C as SqlFloatDescriptor, D as SqlTextDescriptor, E as SqlTextCodec, F as lockIncompatible, G as sqlFloatColumn, H as sqlCharDescriptor, I as lockOptionCapabilities, J as sqlFloatEncode, K as sqlFloatDecode, L as lockStrengthCapabilities, M as encodeListLiteralDefault, N as encodeLiteralDefault, O as SqlVarcharCodec, P as isAggregateProjection, Q as sqlIntEncode, R as lockWaitPolicyOf, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlCharEncode, V as sqlCharDecode, W as sqlCharRenderOutputType, X as sqlIntDecode, Y as sqlIntColumn, Z as sqlIntDescriptor, _ as SQL_INT_CODEC_ID, a as EncodedLiteralDefault, at as sqlVarcharDescriptor, b as SqlCharCodec, c as LockOptionCapabilities, d as LockWaitRequest, et as sqlTextDecode, f as Lowerer, g as SQL_FLOAT_CODEC_ID, h as SQL_CHAR_CODEC_ID, i as CapabilityRequirement, it as sqlVarcharDecode, j as compact, k as SqlVarcharDescriptor, l as LockStrengthCapabilities, m as MarkerReadResult, n as AdapterProfile, nt as sqlTextEncode, o as LiteralDefaultColumn, ot as sqlVarcharEncode, p as LowererContext, q as sqlFloatDescriptor, r as AdapterTarget, rt as sqlVarcharColumn, s as LockConflict, st as sqlVarcharRenderOutputType, t as Adapter, tt as sqlTextDescriptor, u as LockWaitOptions, v as SQL_TEXT_CODEC_ID, w as SqlIntCodec, x as SqlCharDescriptor, y as SQL_VARCHAR_CODEC_ID, z as missingCapability } from "./ast-Bf6J9_ra.mjs";
3
+ import { a as DdlNode, c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, h as renderOpaqueSql, i as DdlColumnDefault, l as LiteralColumnDefault, m as opaqueSql, n as CheckExpressionConstraint, o as DdlTableConstraint, p as isDdlNode, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault, u as OpaqueSql } from "./ddl-types-DtKZjNtN-CByECwns.mjs";
4
+ import { $ as sqlTextColumn, A as collectOrderedParamRefs, B as sqlCharColumn, C as SqlFloatDescriptor, D as SqlTextDescriptor, E as SqlTextCodec, F as lockIncompatible, G as sqlFloatColumn, H as sqlCharDescriptor, I as lockOptionCapabilities, J as sqlFloatEncode, K as sqlFloatDecode, L as lockStrengthCapabilities, M as encodeListLiteralDefault, N as encodeLiteralDefault, O as SqlVarcharCodec, P as isAggregateProjection, Q as sqlIntEncode, R as lockWaitPolicyOf, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlCharEncode, V as sqlCharDecode, W as sqlCharRenderOutputType, X as sqlIntDecode, Y as sqlIntColumn, Z as sqlIntDescriptor, _ as SQL_INT_CODEC_ID, a as EncodedLiteralDefault, at as sqlVarcharDescriptor, b as SqlCharCodec, c as LockOptionCapabilities, d as LockWaitRequest, et as sqlTextDecode, f as Lowerer, g as SQL_FLOAT_CODEC_ID, h as SQL_CHAR_CODEC_ID, i as CapabilityRequirement, it as sqlVarcharDecode, j as compact, k as SqlVarcharDescriptor, l as LockStrengthCapabilities, m as MarkerReadResult, n as AdapterProfile, nt as sqlTextEncode, o as LiteralDefaultColumn, ot as sqlVarcharEncode, p as LowererContext, q as sqlFloatDescriptor, r as AdapterTarget, rt as sqlVarcharColumn, s as LockConflict, st as sqlVarcharRenderOutputType, t as Adapter, tt as sqlTextDescriptor, u as LockWaitOptions, v as SQL_TEXT_CODEC_ID, w as SqlIntCodec, x as SqlCharDescriptor, y as SQL_VARCHAR_CODEC_ID, z as missingCapability } from "./ast-Bmb-2vbO.mjs";
5
5
  export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyCodecDescriptorTemplate, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, CapabilityRequirement, CaseBranch, CaseExpr, CastExpr, CheckExpressionConstraint, Codec$1 as Codec, type CodecCallContext$1 as CodecCallContext, type CodecDescriptor$1 as CodecDescriptor, CodecJsonValueProjection, type CodecRef$1 as CodecRef, type CodecTrait$1 as CodecTrait, ColumnRef, ContractCodecRegistry, DdlColumn, DdlColumnDefault, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EncodedLiteralDefault, EqColJoinOn, ExistsExpr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralDefaultColumn, LiteralExpr, LockConflict, LockOptionCapabilities, LockStrength, LockStrengthCapabilities, LockWaitOptions, LockWaitPolicy, LockWaitRequest, LockingClause, LockingClauseOptions, LoweredParam, LoweredStatement, Lowerer, LowererContext, MarkerReadResult, NativeJsonValueProjection, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OrExpr, OrderByItem, OrderByNulls, ParamRef, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawExpr, RawQueryAst, RawQueryColumn, RawQueryResult, RawSqlLiteral, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SelectAstOptions, SqlCharCodec, SqlCharDescriptor, SqlCodecCallContext, SqlCodecInstanceContext, SqlColumnRef, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlQueryable, SqlStatementStats, SqlTextCodec, SqlTextDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, checkLimitOffset, collectOrderedParamRefs, compact, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };
@@ -1,7 +1,7 @@
1
- import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
2
- import "./types-DkOYK86-.mjs";
3
- import { o as AnyCodecDescriptor$1 } from "./types-Sh5HuaZE-C8I29pGQ.mjs";
4
- import { t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-Ylhia3fC.mjs";
1
+ import { l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
2
+ import "./types-BURWzacK.mjs";
3
+ import { o as AnyCodecDescriptor$1 } from "./types-Sh5HuaZE-B_FQUPng.mjs";
4
+ import { t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
5
5
  import { CodecRef } from "@prisma/orm-framework/components/codec";
6
6
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.d.mts
7
7
  //#region src/codec-descriptor-registry.d.ts
@@ -1,2 +1,2 @@
1
- import { n as codecRefForStorageColumn, t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-D7bl9ayf.mjs";
1
+ import { n as codecRefForStorageColumn, t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-CdIIOkuE.mjs";
2
2
  export { buildCodecDescriptorRegistry, codecRefForStorageColumn };
@@ -1,7 +1,7 @@
1
- import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
2
- import "./types-DkOYK86-.mjs";
3
- import { E as CodecRef$1, Et as ProjectionItem, Mt as SelectAst, O as ColumnRef, Vt as UpdateAst, Z as InsertAst, c as AnyExpression, et as JoinAst, l as AnyFromSource, xt as OrderByItem, zt as TableSource } from "./types-Sh5HuaZE-C8I29pGQ.mjs";
4
- import { c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, l as LiteralColumnDefault, n as CheckExpressionConstraint, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault } from "./ddl-types-DtKZjNtN-6TxFf4bH.mjs";
1
+ import { o as ReferentialAction } from "./foreign-key-qkDFfG8t-Fyrzd0VI.mjs";
2
+ import "./types-BURWzacK.mjs";
3
+ import { E as CodecRef$1, Et as ProjectionItem, Mt as SelectAst, O as ColumnRef, Vt as UpdateAst, Z as InsertAst, c as AnyExpression, et as JoinAst, l as AnyFromSource, xt as OrderByItem, zt as TableSource } from "./types-Sh5HuaZE-B_FQUPng.mjs";
4
+ import { c as FunctionColumnDefault, d as PrimaryKeyConstraint, f as UniqueConstraint, l as LiteralColumnDefault, n as CheckExpressionConstraint, r as DdlColumn, s as ForeignKeyConstraint, t as AnyDdlColumnDefault } from "./ddl-types-DtKZjNtN-CByECwns.mjs";
5
5
  import { ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
6
6
  import { ParamSpec } from "@prisma/orm-framework/operations";
7
7
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/contract-free.d.mts
@@ -1,2 +1,2 @@
1
- import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-B-QXMOmY.mjs";
1
+ import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-DE893va7.mjs";
2
2
  export { AffectedCount, BuildOperationSpec, CodecExpression, CodecTypesBase, CodecValue, Expression, NoReservedRowColumn, RawAffectedCountQuery, RawCodecInferer, RawPlanContext, RawRow, RawRowQuery, RawRowSpec, RawRowSpecEntry, RawSqlBuilder, RawSqlInterpolation, RawSqlStatementBuilder, RawSqlStatementTag, RawSqlTag, ScalarListExpression, ScopeField, TraitExpression, buildOperation, codecOf, createRawSql, isExpression, param, toExpr };
@@ -1,3 +1,3 @@
1
- import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-mLwvcOLS-6Y52seRP.mjs";
2
- import "./middleware-BFoORv3y.mjs";
1
+ import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-mLwvcOLS-SaqhgsmA.mjs";
2
+ import "./middleware-DwaZ6s12.mjs";
3
3
  export { type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, type SqlParamRefMutator, type SqlParamRefMutatorInternal, createSqlParamRefMutator };
@@ -1,4 +1,4 @@
1
- import { n as SqlQueryPlan, r as planFromAst, t as Preparable } from "./plan-cGEaSXHv-2F5y-Dpy.mjs";
2
- import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BMi8hJlv.mjs";
3
- import "./plan-CmfWjqtI.mjs";
1
+ import { n as SqlQueryPlan, r as planFromAst, t as Preparable } from "./plan-cGEaSXHv-BeW-cC5v.mjs";
2
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BFhGKvp4.mjs";
3
+ import "./plan-Dhl03MtT.mjs";
4
4
  export { Preparable, type SqlExecutionPlan, SqlQueryPlan, planFromAst };
@@ -1,3 +1,3 @@
1
- import { a as SqlAggregateDescriptorRegistry, c as TypeHelperRegistry, n as ExecutionContext, r as ResolvedSqlAggregate, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-Ylhia3fC.mjs";
2
- import "./query-lane-context-qK5s2okl.mjs";
1
+ import { a as SqlAggregateDescriptorRegistry, c as TypeHelperRegistry, n as ExecutionContext, r as ResolvedSqlAggregate, t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
2
+ import "./query-lane-context-BaoHpLsE.mjs";
3
3
  export { CodecDescriptorRegistry, ExecutionContext, ResolvedSqlAggregate, SqlAggregateDescriptorRegistry, TypeHelperRegistry };
@@ -1,3 +1,3 @@
1
- import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as SqlPlan, x as TableMetadata, y as TableDef } from "./types-BJQcLx-8-DSnaugR4.mjs";
2
- import "./types-14L6c26e.mjs";
1
+ import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as SqlPlan, x as TableMetadata, y as TableDef } from "./types-BJQcLx-8-DY221fiX.mjs";
2
+ import "./types-DLjT0ADz.mjs";
3
3
  export { BuildOptions, BuildParamsMap, CodecTypes, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, Expr, META, Meta, ModelDef, ModelMetadata, OperationTypeSignature, OperationTypes, OperationsForTypeId, type RuntimeScope, SqlBuilderOptions, type SqlOrmPlan, SqlPlan, TableDef, TableKey, TableMetadata, TablesOf };
@@ -1,5 +1,5 @@
1
- import { r as StorageTable } from "./storage-table-BBcKoAuF-CssyCQhM.mjs";
2
- import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
1
+ import { r as StorageTable } from "./storage-table-WXeVNycx-tlFMnbig.mjs";
2
+ import { l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
3
3
  //#region ../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts
4
4
  //#region src/resolve-storage-table.d.ts
5
5
  interface ResolvedStorageTable {
@@ -18,4 +18,4 @@ interface ResolvedStorageTable {
18
18
  declare function resolveStorageTable(storage: SqlStorage, tableName: string, namespaceId?: string): ResolvedStorageTable | undefined;
19
19
  //#endregion
20
20
  export { resolveStorageTable as n, ResolvedStorageTable as t };
21
- //# sourceMappingURL=resolve-storage-table-Ba33K41A.d.mts.map
21
+ //# sourceMappingURL=resolve-storage-table-B7m9cFy4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-storage-table-Ba33K41A.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts"],"mappings":";;;;UAGU;WACC;WACA,OAAO;;;;;;;;;;;iBAWD,oBAAoB,SAAS,YAAY,mBAAmB,uBAAuB"}
1
+ {"version":3,"file":"resolve-storage-table-B7m9cFy4.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/resolve-storage-table.d.mts"],"mappings":";;;;UAGU;WACC;WACA,OAAO;;;;;;;;;;;iBAWD,oBAAoB,SAAS,YAAY,mBAAmB,uBAAuB"}
@@ -1,4 +1,4 @@
1
- import "./resolve-storage-table-Ba33K41A.mjs";
1
+ import "./resolve-storage-table-B7m9cFy4.mjs";
2
2
  import { ResolvedDomainModel, UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma/orm-framework/contract/types";
3
3
  import { RuntimeMutationDefaultGenerator } from "@prisma/orm-framework/components/runtime";
4
4
  import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma/orm-framework/components/execution";
@@ -43,4 +43,4 @@ declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRunt
43
43
  declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
44
44
  //#endregion
45
45
  export { timestampNowRuntimeGenerator as a, sqlRuntimeFamilyDescriptor as i, UNBOUND_DOMAIN_NAMESPACE_ID as n, resolveDomainModel as r, ResolvedDomainModel as t };
46
- //# sourceMappingURL=runtime-BUemUdMk.d.mts.map
46
+ //# sourceMappingURL=runtime-Ca7PVQcJ.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-BUemUdMk.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
1
+ {"version":3,"file":"runtime-Ca7PVQcJ.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
@@ -1,5 +1,5 @@
1
- import { m as MarkerReadResult } from "./ast-Bf6J9_ra.mjs";
2
- import { c as TypeHelperRegistry, n as ExecutionContext } from "./query-lane-context-CJoNBspB-Ylhia3fC.mjs";
3
- import { A as SqlMiddlewareContext, B as TransactionContext, C as RuntimeParameterizedCodecDescriptor, D as SqlExecutionStack, E as RuntimeTransaction, F as SqlRuntimeExtensionDescriptor, G as encodeParamsWithMetadata, H as createExecutionContext, I as SqlRuntimeExtensionInstance, J as withTransaction, L as SqlRuntimeTargetDescriptor, M as SqlRuntimeAdapterInstance, N as SqlRuntimeBase, O as SqlExecutionStackWithDriver, P as SqlRuntimeDriverInstance, R as SqlStaticContributions, S as RuntimeOptions, T as RuntimeTelemetryEvent, U as createSqlExecutionStack, V as VerifyMarkerOption, W as deriveParamMetadata, _ as PreparedStatementInternals, a as DeclaredCodecId, b as RuntimeConnection, c as ParamSpec, d as PreparedExecution, f as PreparedExecutionImpl, g as PreparedStatementImpl, i as Declaration, j as SqlRuntimeAdapterDescriptor, k as SqlMiddleware, l as ParamsFromDeclaration, m as PreparedStatement, n as CloseRefusal, o as DeclaredNullable, p as PreparedFor, r as ConnectionProvider, s as MarkerReader, t as BindSiteParams, u as PrepareCallback, w as RuntimeQueryable, x as RuntimeFamilyAdapter, y as Runtime, z as TelemetryOutcome } from "./prepared-statement-YtgdlN7e-DBJtJAm7.mjs";
4
- import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-DYjWQAcJ.mjs";
1
+ import { m as MarkerReadResult } from "./ast-Bmb-2vbO.mjs";
2
+ import { c as TypeHelperRegistry, n as ExecutionContext } from "./query-lane-context-CJoNBspB-CR_n8DNB.mjs";
3
+ import { A as SqlMiddlewareContext, B as TransactionContext, C as RuntimeParameterizedCodecDescriptor, D as SqlExecutionStack, E as RuntimeTransaction, F as SqlRuntimeExtensionDescriptor, G as encodeParamsWithMetadata, H as createExecutionContext, I as SqlRuntimeExtensionInstance, J as withTransaction, L as SqlRuntimeTargetDescriptor, M as SqlRuntimeAdapterInstance, N as SqlRuntimeBase, O as SqlExecutionStackWithDriver, P as SqlRuntimeDriverInstance, R as SqlStaticContributions, S as RuntimeOptions, T as RuntimeTelemetryEvent, U as createSqlExecutionStack, V as VerifyMarkerOption, W as deriveParamMetadata, _ as PreparedStatementInternals, a as DeclaredCodecId, b as RuntimeConnection, c as ParamSpec, d as PreparedExecution, f as PreparedExecutionImpl, g as PreparedStatementImpl, i as Declaration, j as SqlRuntimeAdapterDescriptor, k as SqlMiddleware, l as ParamsFromDeclaration, m as PreparedStatement, n as CloseRefusal, o as DeclaredNullable, p as PreparedFor, r as ConnectionProvider, s as MarkerReader, t as BindSiteParams, u as PrepareCallback, w as RuntimeQueryable, x as RuntimeFamilyAdapter, y as Runtime, z as TelemetryOutcome } from "./prepared-statement-YtgdlN7e-CI1fD5IM.mjs";
4
+ import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-oNRBExeI.mjs";
5
5
  export { type AfterExecuteResult, type AfterQueryResult, type BindSiteParams, type BudgetsOptions, type CloseRefusal, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecuteInterceptResult, type ExecutionContext, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedExecution, PreparedExecutionImpl, type PreparedFor, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type QueryInterceptResult, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeOptions, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction };
package/dist/runtime.mjs CHANGED
@@ -3,7 +3,7 @@ import { K as isQueryAst, j as PreparedParamRef } from "./types-NTQsD2MS-DAP2yVD
3
3
  import { t as collectOrderedParamRefs } from "./util-BBgcP3gI-XJBkxo1K.mjs";
4
4
  import { t as createSqlParamRefMutator } from "./middleware-yBAfiVWn-CzNCthJT.mjs";
5
5
  import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-DrJ1vHEo.mjs";
6
- import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-D7bl9ayf.mjs";
6
+ import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-CdIIOkuE.mjs";
7
7
  import { i as runPreparedQuery, n as preparedStatementQuery, r as runPreparedExecute, t as preparedStatementExecute } from "./prepared-query-BJr50wPm-ChoqfJbX.mjs";
8
8
  import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
9
9
  import { createHash } from "node:crypto";
@@ -11,10 +11,10 @@ import { materializeCodec, resolveCodecDescriptorOrThrow } from "@prisma/orm-fra
11
11
  import { blindCast } from "@prisma/orm-framework/utils/casts";
12
12
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
13
13
  import { assertNever, isInternalError } from "@prisma/orm-framework/utils/internal-error";
14
+ import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
14
15
  import { checkContractComponentRequirements, mergeCapabilityMatrices } from "@prisma/orm-framework/components/components";
15
16
  import { AsyncIterableResult, RuntimeCore, applyMutationDefaults, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, onQueryEndOutsideTransaction, raceAgainstAbort, reportExecuteEnding, reportQueryEnding, runBeforeExecuteChain, runBeforeQueryChain, runExecuteWithMiddleware, runQueryWithMiddleware, runtimeError as runtimeError$1 } from "@prisma/orm-framework/components/runtime";
16
17
  import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
17
- import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
18
18
  import { createExecutionStack } from "@prisma/orm-framework/components/execution";
19
19
  import { hashContent } from "@prisma/orm-framework/utils/hash-content";
20
20
  //#region ../../../2-sql/5-runtime/dist/exports-D-zfG6F6.mjs
@@ -1,2 +1,2 @@
1
- import { K as preparedStatementExecute, h as PreparedStatementExecuteTarget, q as preparedStatementQuery, v as PreparedStatementQueryTarget } from "./prepared-statement-YtgdlN7e-DBJtJAm7.mjs";
1
+ import { K as preparedStatementExecute, h as PreparedStatementExecuteTarget, q as preparedStatementQuery, v as PreparedStatementQueryTarget } from "./prepared-statement-YtgdlN7e-CI1fD5IM.mjs";
2
2
  export { type PreparedStatementExecuteTarget, type PreparedStatementQueryTarget, preparedStatementExecute, preparedStatementQuery };
@@ -1,5 +1,5 @@
1
- import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
2
- import "./types-DkOYK86-.mjs";
1
+ import { l as SqlStorage } from "./sql-storage-BTlJLUID-O6fBB_am.mjs";
2
+ import "./types-BURWzacK.mjs";
3
3
  import { y as SqlSchemaIRNode } from "./types-CLsPsUiw-Db1BsN9R.mjs";
4
4
  import "./types-D6XuABFQ.mjs";
5
5
  import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
@@ -44,4 +44,4 @@ interface SqlSchemaDiffInput {
44
44
  type SqlSchemaDiffFn = (input: SqlSchemaDiffInput) => SqlSchemaDiffResult;
45
45
  //#endregion
46
46
  export { SqlSchemaDiffInput as n, SqlSchemaDiffResult as r, SqlSchemaDiffFn as t };
47
- //# sourceMappingURL=schema-differ-CqWOkoW9--uxNOini.d.mts.map
47
+ //# sourceMappingURL=schema-differ-CqWOkoW9-BABSAGGB.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-differ-CqWOkoW9--uxNOini.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/schema-differ-CqWOkoW9.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAcU;;WAEC,iBAAiB;;;;;;;;;WASjB,uBAAuB,OAAO,oBAAoB;;;;;;WAMlD,gBAAgB;aACd,QAAQ;;;UAGX;WACC,UAAU,SAAS;WACnB,QAAQ;WACR,qBAAqB,cAAc;;KAEzC,mBAAmB,OAAO,uBAAuB"}
1
+ {"version":3,"file":"schema-differ-CqWOkoW9-BABSAGGB.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/schema-differ-CqWOkoW9.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAcU;;WAEC,iBAAiB;;;;;;;;;WASjB,uBAAuB,OAAO,oBAAoB;;;;;;WAMlD,gBAAgB;aACd,QAAQ;;;UAGX;WACC,UAAU,SAAS;WACnB,QAAQ;WACR,qBAAqB,cAAc;;KAEzC,mBAAmB,OAAO,uBAAuB"}
@@ -1,6 +1,6 @@
1
1
  import { n as findSqlDataTypeCollision, r as isSqlDataType } from "./data-type-CAPmGXg9.mjs";
2
2
  import { r as assertNothingCastsFromSqlExpression } from "./sql-expression-D7GsLgDM.mjs";
3
- import { u as isStorageTypeInstance } from "./types-DDHgx581.mjs";
3
+ import { u as isStorageTypeInstance } from "./types-C7oOtFcJ.mjs";
4
4
  import { blindCast } from "@prisma/orm-framework/utils/casts";
5
5
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
6
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -243,4 +243,4 @@ function verifySqlSchemaByDiff(input) {
243
243
  //#endregion
244
244
  export { computeStorageTypeVerdict as a, verifySqlSchemaByDiff as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, enforceSqlDataTypeInvariants as o, classifySqlDiffIssue as r, extractCodecControlHooks as s, classifyDiffEntityKind as t };
245
245
 
246
- //# sourceMappingURL=schema-verify-DIfHSB4I-CjYnmUuD.mjs.map
246
+ //# sourceMappingURL=schema-verify-DIfHSB4I-Dx3Tq9hf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-verify-DIfHSB4I-CjYnmUuD.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDiffIssue as r, enforceSqlDataTypeInvariants as s, classifyDiffEntityKind as t };\n\n//# sourceMappingURL=schema-verify-DIfHSB4I.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,YAAY;CACzC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM,OAAO;CAClE,MAAM,QAAQ,UAAU,UAAU,CAAC,CAAC,OAAO,YAAY;CACvD,OAAO,UAAU,QAAQ,UAAU,KAAK,KAAK,OAAO,UAAU;AAC/D;AACA,SAAS,yBAAyB,aAAa;CAC9C,MAAM,wBAAwB,IAAI,IAAI;CACtC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,OAAO,eAAe,YAAY,eAAe,MAAM;EAC3D,IAAI,CAAC,qBAAqB,UAAU,GAAG;EACvC,MAAM,oBAAoB,WAAW,MAAM,WAAW;EACtD,KAAK,MAAM,CAAC,SAAS,SAAS,OAAO,QAAQ,iBAAiB,GAAG;GAChE,uBAAuB;IACtB;IACA;IACA,cAAc,WAAW;IACzB,aAAa;IACb,sBAAsB;GACvB,CAAC;GACD,MAAM,IAAI,SAAS,IAAI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K,cAAc;CACzB,MAAM,cAAc,iBAAiB,MAAM,YAAY,OAAO,MAAM,SAAS,gBAAgB,WAAW,MAAM,SAAS,cAAc,KAAK;CAC1I,OAAO;EACN;EACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,2BAA2B;EAChD,SAAS,KAAK,uCAAuC,8CAA8C,UAAU,UAAU,cAAc,IAAI,KAAK,IAAI;EAClJ,UAAU;GACT,aAAa,MAAM,SAAS,QAAQ;GACpC,GAAG,UAAU,eAAe,WAAW;EACxC;EACA,QAAQ;GACP,UAAU,MAAM,SAAS;GACzB,QAAQ,MAAM,SAAS;EACxB;EACA,QAAQ;GACP,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ;GAChE,UAAU,EAAE,QAAQ,CAAC,GAAG,YAAY,UAAU,GAAG,mBAAmB,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
1
+ {"version":3,"file":"schema-verify-DIfHSB4I-Dx3Tq9hf.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/schema-verify-DIfHSB4I.mjs"],"sourcesContent":["import { assertNothingCastsFromSqlExpression } from \"@internal/sql-contract/sql-expression\";\nimport { VERIFY_CODE_SCHEMA_FAILURE, assertUniqueCodecOwner, dispositionForCategory, issueOutcome } from \"@internal/framework-components/control\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { findSqlDataTypeCollision, isSqlDataType } from \"@internal/sql-contract/data-type\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\n//#region src/core/assembly.ts\nfunction hasCodecControlHooks(descriptor) {\n\tif (typeof descriptor !== \"object\" || descriptor === null) return false;\n\tconst hooks = blindCast(descriptor).types?.codecTypes?.controlPlaneHooks;\n\treturn hooks !== null && hooks !== void 0 && typeof hooks === \"object\";\n}\nfunction extractCodecControlHooks(descriptors) {\n\tconst hooks = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (typeof descriptor !== \"object\" || descriptor === null) continue;\n\t\tif (!hasCodecControlHooks(descriptor)) continue;\n\t\tconst controlPlaneHooks = descriptor.types.codecTypes.controlPlaneHooks;\n\t\tfor (const [codecId, hook] of Object.entries(controlPlaneHooks)) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId: descriptor.id,\n\t\t\t\tentityLabel: \"control hooks\",\n\t\t\t\tentityOwnershipLabel: \"owner\"\n\t\t\t});\n\t\t\thooks.set(codecId, hook);\n\t\t\towners.set(codecId, descriptor.id);\n\t\t}\n\t}\n\treturn hooks;\n}\n/**\n* The SQL family's checks of the stack's data types and codecs, each naming the contributor:\n* no two SQL data types would both recognise one reported type, by colliding claiming texts or by\n* claiming the same kind; no data type casts from `sql/expression`; and every codec represents a\n* SQL data type, because a codec represents a column's type and `sql/expression` is the one data\n* type no column has.\n*/\nfunction enforceSqlDataTypeInvariants(declaredDataTypes, codecDescriptors) {\n\tconst declaredById = new Map(declaredDataTypes.map((declared) => [declared.type.id, declared]));\n\tconst describe = (type) => `data type \"${type.id}\" contributed by \"${declaredById.get(type.id)?.contributedBy ?? \"<unknown>\"}\"`;\n\tconst collision = findSqlDataTypeCollision(declaredDataTypes.map(({ type }) => type));\n\tif (collision !== void 0) {\n\t\tconst { first, second, claims } = collision;\n\t\tif (claims.by === \"kind\") throw new InternalError(`The ${describe(first)} and the ${describe(second)} both claim the kind \"${claims.kind}\".`);\n\t\tthrow new InternalError(`The ${describe(first)} claims the text \"${claims.first}\", which collides with the text \"${claims.second}\" claimed by the ${describe(second)}.`);\n\t}\n\tassertNothingCastsFromSqlExpression(declaredDataTypes);\n\tfor (const codec of codecDescriptors) {\n\t\tconst represented = declaredById.get(codec.dataType)?.type;\n\t\tif (represented === void 0 || isSqlDataType(represented)) continue;\n\t\tthrow new InternalError(`Codec \"${codec.codecId}\" represents ${describe(represented)}, which is not a SQL data type. In a SQL stack a codec represents a column's type, so its data type is declared with sqlDataType.`);\n\t}\n}\n//#endregion\n//#region src/core/diff/verifier-disposition.ts\n/**\n* Classifies a codec `verifyType` hook finding into the target-neutral\n* categories the framework grades. A storage type is a named type instance\n* (e.g. a native enum); the only shape divergence it can carry is a change\n* to its value set, so a paired mismatch always classifies as `valueDrift`.\n*/\nfunction classifyStorageTypeDiffIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") return \"extraAuxiliary\";\n\treturn \"valueDrift\";\n}\nfunction verifierDisposition(controlPolicy, issue) {\n\treturn dispositionForCategory(controlPolicy, classifyStorageTypeDiffIssue(issue));\n}\n//#endregion\n//#region src/core/diff/schema-verify.ts\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/**\n* Resolves an issue's framework-neutral {@link DiffSubjectGranularity} on\n* demand, from the issue's node's `nodeKind` via the target-provided\n* `granularityOf` map. The node carries only its `nodeKind` identity, never a\n* classification, and nothing is stamped onto the issue — every consumer\n* (the family verdict below, the framework aggregate's unclaimed-elements\n* sweep via {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable})\n* calls this the same way, resolved by the family/target that owns the node\n* vocabulary. `undefined` for an issue with no node.\n*/\nfunction classifyDiffSubjectGranularity(issue, granularityOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : granularityOf(node.nodeKind);\n}\n/**\n* Resolves an issue's storage `entityKind` on demand, from the issue's\n* node's `nodeKind` via the target-provided `entityKindOf` map — the sibling\n* of {@link classifyDiffSubjectGranularity}, called the same way by the same\n* consumers (via\n* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}).\n* `undefined` for an issue with no node, or for a node kind with no storage\n* entity of its own.\n*/\nfunction classifyDiffEntityKind(issue, entityKindOf) {\n\tconst node = issueNode(issue);\n\treturn node === void 0 ? void 0 : entityKindOf(node.nodeKind);\n}\n/**\n* Re-keys the legacy `classifySqlVerifierIssueKind` category mapping on the\n* issue's {@link DiffSubjectGranularity} (resolved via `granularityOf`) + the\n* issue reason. The vocabulary maps one-to-one: an undeclared live entity or\n* namespace is `extraTopLevelObject`, an undeclared live field\n* `extraNestedElement`, undeclared auxiliaries (constraints, indexes,\n* defaults) and structural leaves (policies) `extraAuxiliary`; every paired\n* divergence is `declaredIncompatible`; anything the database lacks is\n* `declaredMissing`.\n* `granularityOf` is the target's classifier, so target and extension node\n* kinds classify without the family importing them.\n*/\nfunction classifySqlDiffIssue(issue, granularityOf) {\n\tif (issueOutcome(issue) === \"not-found\") return \"declaredMissing\";\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\t\tif (granularity === \"entity\" || granularity === \"namespace\") return \"extraTopLevelObject\";\n\t\tif (granularity === \"field\") return \"extraNestedElement\";\n\t\treturn \"extraAuxiliary\";\n\t}\n\treturn \"declaredIncompatible\";\n}\n/**\n* Whether a `not-expected` issue is a strict-mode-only finding. The legacy\n* walk detected every relational extra (namespaces, entities, fields, and\n* their auxiliaries) only under `--strict`; the structural diff (roots, RLS\n* policies, roles) was never strict-gated — its extras fail in both modes.\n* Keyed on the issue's granularity, resolved via `granularityOf`.\n*/\nfunction isStrictOnlyExtra(issue, granularityOf) {\n\tconst granularity = classifyDiffSubjectGranularity(issue, granularityOf);\n\treturn granularity === \"namespace\" || granularity === \"entity\" || granularity === \"field\" || granularity === \"auxiliary\";\n}\n/**\n* Applies the two consumer filters to a diff issue list: strict gating\n* (relational `not-expected` findings drop in lenient mode) and\n* control-policy disposition (each surviving issue grades against its\n* subject table's effective policy; suppressed issues drop, `observed`\n* subjects warn). The verify verdict is `failures.length === 0`.\n*/\nfunction computeSqlDiffVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tfor (const issue of input.issues) {\n\t\tif (!input.strict && issueOutcome(issue) === \"not-expected\" && isStrictOnlyExtra(issue, input.granularityOf)) continue;\n\t\tconst disposition = dispositionForCategory(effectiveControlPolicy(input.resolveControlPolicy(issue), input.defaultControlPolicy), classifySqlDiffIssue(issue, input.granularityOf));\n\t\tif (disposition === \"suppress\") continue;\n\t\tif (disposition === \"warn\") {\n\t\t\twarnings.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tfailures.push(issue);\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\nfunction computeStorageTypeVerdict(input) {\n\tconst failures = [];\n\tconst warnings = [];\n\tconst policy = effectiveControlPolicy(void 0, input.contract.defaultControlPolicy);\n\tfor (const pair of input.namespacePairs) {\n\t\tif (pair.actual === void 0) continue;\n\t\tfor (const [typeName, typeInstance] of Object.entries(input.contract.storage.types ?? {})) {\n\t\t\tif (!isStorageTypeInstance(typeInstance)) continue;\n\t\t\tconst hook = input.codecHooks.get(typeInstance.codecId);\n\t\t\tif (!hook?.verifyType) continue;\n\t\t\tconst typeIssues = hook.verifyType({\n\t\t\t\ttypeName,\n\t\t\t\ttypeInstance,\n\t\t\t\tschema: pair.actual\n\t\t\t});\n\t\t\tfor (const issue of typeIssues) {\n\t\t\t\tconst disposition = verifierDisposition(policy, issue);\n\t\t\t\tif (disposition === \"suppress\") continue;\n\t\t\t\tif (disposition === \"warn\") {\n\t\t\t\t\twarnings.push(issue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfailures.push(issue);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tfailures,\n\t\twarnings\n\t};\n}\n/**\n* THE SQL schema verify: runs the target's full-tree node diff, grades it\n* through the family's post-diff filters (strict gating + control-policy\n* disposition) plus the codec `verifyType` hook findings, and wraps the\n* verdict in the issue-based result envelope. `ok` holds exactly when both\n* issue lists are empty — the lists carry the verdict's failures.\n*/\nfunction verifySqlSchemaByDiff(input) {\n\tconst startTime = Date.now();\n\tconst verdictDiff = input.diffSchema({\n\t\tcontract: input.contract,\n\t\tschema: input.schema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst diffVerdict = computeSqlDiffVerdict({\n\t\tissues: verdictDiff.issues,\n\t\tresolveControlPolicy: verdictDiff.resolveControlPolicy,\n\t\tstrict: input.strict,\n\t\tdefaultControlPolicy: input.contract.defaultControlPolicy,\n\t\tgranularityOf: input.granularityOf\n\t});\n\tconst storageTypeVerdict = computeStorageTypeVerdict({\n\t\tcontract: input.contract,\n\t\tnamespacePairs: verdictDiff.namespacePairs,\n\t\tcodecHooks: extractCodecControlHooks(input.frameworkComponents)\n\t});\n\tconst failCount = diffVerdict.failures.length + storageTypeVerdict.failures.length;\n\tconst ok = failCount === 0;\n\tconst profileHash = \"profileHash\" in input.contract && typeof input.contract.profileHash === \"string\" ? input.contract.profileHash : void 0;\n\treturn {\n\t\tok,\n\t\t...ok ? {} : { code: VERIFY_CODE_SCHEMA_FAILURE },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : `Database schema does not satisfy contract (${failCount} failure${failCount === 1 ? \"\" : \"s\"})`,\n\t\tcontract: {\n\t\t\tstorageHash: input.contract.storage.storageHash,\n\t\t\t...ifDefined(\"profileHash\", profileHash)\n\t\t},\n\t\ttarget: {\n\t\t\texpected: input.contract.target,\n\t\t\tactual: input.contract.target\n\t\t},\n\t\tschema: {\n\t\t\tissues: [...diffVerdict.failures, ...storageTypeVerdict.failures],\n\t\t\twarnings: { issues: [...diffVerdict.warnings, ...storageTypeVerdict.warnings] }\n\t\t},\n\t\tmeta: { strict: input.strict },\n\t\ttimings: { total: Date.now() - startTime }\n\t};\n}\n//#endregion\nexport { computeStorageTypeVerdict as a, extractCodecControlHooks as c, computeSqlDiffVerdict as i, classifyDiffSubjectGranularity as n, verifySqlSchemaByDiff as o, classifySqlDi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,QAAQ,EAAE;EAC/E;EACA,MAAM,EAAE,QAAQ,MAAM,OAAO;EAC7B,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;CAC1C;AACD"}
@@ -1,8 +1,8 @@
1
1
  import { m as parseNaming } from "./naming-DkG_OegU-DpENNdZX.mjs";
2
- import { o as SqlNode } from "./storage-table-CyL4CNMi-ByGZXmzd.mjs";
2
+ import { o as SqlNode } from "./storage-table-B7OSPl3G-EOodFPzq.mjs";
3
3
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
4
4
  import { freezeNode } from "@prisma/orm-framework/components/ir";
5
- //#region ../../../2-sql/1-core/contract/dist/serialized-index-QAYy0fjm.mjs
5
+ //#region ../../../2-sql/1-core/contract/dist/serialized-index-C26m_DWu.mjs
6
6
  /**
7
7
  * SQL Contract IR node for a value-set entry in a namespace's `valueSet`
8
8
  * map (`SqlNamespace.entries.valueSet`).
@@ -71,4 +71,4 @@ function indexInputFromSerialized(flat) {
71
71
  //#endregion
72
72
  export { isStorageValueSet as i, checkConstraintInputFromSerialized as n, indexInputFromSerialized as r, StorageValueSet as t };
73
73
 
74
- //# sourceMappingURL=serialized-index-QAYy0fjm-zxvK3RBa.mjs.map
74
+ //# sourceMappingURL=serialized-index-C26m_DWu-CnNi8WAI.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialized-index-QAYy0fjm-zxvK3RBa.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-QAYy0fjm.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-CyL4CNMi.mjs\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\n//#region src/ir/storage-value-set.ts\n/**\n* SQL Contract IR node for a value-set entry in a namespace's `valueSet`\n* map (`SqlNamespace.entries.valueSet`).\n*\n* A value-set records the ordered set of permitted codec-encoded values for\n* an enum-like column restriction. It does not carry a `codecId` — the\n* column that references it already holds the codec; the value-set holds\n* only the permitted values.\n*\n* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope\n* carries the discriminator and the serializer hydration walker can\n* dispatch on it. This follows the per-leaf enumerable-kind convention\n* established in the SQL-node comment (future polymorphic dispatch on\n* namespace entries needs the discriminator in JSON).\n*\n* The entry's name is not on the class — value-sets are keyed by name in\n* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.\n*/\nvar StorageValueSet = class extends SqlNode {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\nfunction isStorageValueSet(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn \"kind\" in value && value.kind === \"valueSet\" && \"values\" in value;\n}\n//#endregion\n//#region src/serialized-check-constraint.ts\n/**\n* Hydrates one stored check constraint into constructor input. `parseNaming`\n* is what rejects a hand-edited file whose `prefix` and `name` disagree.\n*/\nfunction checkConstraintInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\texpression: flat.expression\n\t};\n}\n//#endregion\n//#region src/serialized-index.ts\n/**\n* Hydrates one stored index into constructor input. The parameter is typed\n* but the values are whatever the file held, so each field the union depends\n* on is checked here rather than downstream — by the time `Index` sees the\n* data it is already a valid union.\n*/\nfunction indexInputFromSerialized(flat) {\n\tif (flat.name === void 0 || flat.name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\tif (flat.columns === void 0 === (flat.expression === void 0)) throw new ContractValidationError(`Index \"${flat.name}\": exactly one of columns or expression must be set.`, \"storage\");\n\tconst carried = {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\twhere: flat.where,\n\t\tunique: flat.unique,\n\t\ttype: flat.type,\n\t\toptions: flat.options\n\t};\n\treturn flat.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: flat.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: flat.columns ?? []\n\t};\n}\n//#endregion\nexport { isStorageValueSet as i, checkConstraintInputFromSerialized as n, StorageValueSet as r, indexInputFromSerialized as t };\n\n//# sourceMappingURL=serialized-index-QAYy0fjm.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,QAAQ;CAC3C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,UAAU,SAAS,MAAM,SAAS,cAAc,YAAY;AACpE;;;;;AAOA,SAAS,mCAAmC,MAAM;CACjD,OAAO;EACN,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,YAAY,KAAK;CAClB;AACD;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,IAAI,KAAK,SAAS,KAAK,KAAK,KAAK,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;CACvP,IAAI,KAAK,YAAY,KAAK,OAAO,KAAK,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,KAAK,uDAAuD,SAAS;CACpL,MAAM,UAAU;EACf,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,MAAM,KAAK;EACX,SAAS,KAAK;CACf;CACA,OAAO,KAAK,eAAe,KAAK,IAAI;EACnC,GAAG;EACH,YAAY,KAAK;CAClB,IAAI;EACH,GAAG;EACH,SAAS,KAAK,WAAW,CAAC;CAC3B;AACD"}
1
+ {"version":3,"file":"serialized-index-C26m_DWu-CnNi8WAI.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/serialized-index-C26m_DWu.mjs"],"sourcesContent":["import { l as SqlNode } from \"./storage-table-B7OSPl3G.mjs\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\n//#region src/ir/storage-value-set.ts\n/**\n* SQL Contract IR node for a value-set entry in a namespace's `valueSet`\n* map (`SqlNamespace.entries.valueSet`).\n*\n* A value-set records the ordered set of permitted codec-encoded values for\n* an enum-like column restriction. It does not carry a `codecId` — the\n* column that references it already holds the codec; the value-set holds\n* only the permitted values.\n*\n* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope\n* carries the discriminator and the serializer hydration walker can\n* dispatch on it. This follows the per-leaf enumerable-kind convention\n* established in the SQL-node comment (future polymorphic dispatch on\n* namespace entries needs the discriminator in JSON).\n*\n* The entry's name is not on the class — value-sets are keyed by name in\n* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.\n*/\nvar StorageValueSet = class extends SqlNode {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\nfunction isStorageValueSet(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn \"kind\" in value && value.kind === \"valueSet\" && \"values\" in value;\n}\n//#endregion\n//#region src/serialized-check-constraint.ts\n/**\n* Hydrates one stored check constraint into constructor input. `parseNaming`\n* is what rejects a hand-edited file whose `prefix` and `name` disagree.\n*/\nfunction checkConstraintInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\texpression: flat.expression\n\t};\n}\n//#endregion\n//#region src/serialized-index.ts\n/**\n* Hydrates one stored index into constructor input. The parameter is typed\n* but the values are whatever the file held, so each field the union depends\n* on is checked here rather than downstream — by the time `Index` sees the\n* data it is already a valid union.\n*/\nfunction indexInputFromSerialized(flat) {\n\tif (flat.name === void 0 || flat.name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\tif (flat.columns === void 0 === (flat.expression === void 0)) throw new ContractValidationError(`Index \"${flat.name}\": exactly one of columns or expression must be set.`, \"storage\");\n\tconst carried = {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\twhere: flat.where,\n\t\tunique: flat.unique,\n\t\ttype: flat.type,\n\t\toptions: flat.options\n\t};\n\treturn flat.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: flat.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: flat.columns ?? []\n\t};\n}\n//#endregion\nexport { isStorageValueSet as i, checkConstraintInputFromSerialized as n, StorageValueSet as r, indexInputFromSerialized as t };\n\n//# sourceMappingURL=serialized-index-C26m_DWu.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,QAAQ;CAC3C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,UAAU,SAAS,MAAM,SAAS,cAAc,YAAY;AACpE;;;;;AAOA,SAAS,mCAAmC,MAAM;CACjD,OAAO;EACN,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,YAAY,KAAK;CAClB;AACD;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,IAAI,KAAK,SAAS,KAAK,KAAK,KAAK,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;CACvP,IAAI,KAAK,YAAY,KAAK,OAAO,KAAK,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,KAAK,uDAAuD,SAAS;CACpL,MAAM,UAAU;EACf,QAAQ,YAAY,KAAK,MAAM,KAAK,MAAM;EAC1C,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,MAAM,KAAK;EACX,SAAS,KAAK;CACf;CACA,OAAO,KAAK,eAAe,KAAK,IAAI;EACnC,GAAG;EACH,YAAY,KAAK;CAClB,IAAI;EACH,GAAG;EACH,SAAS,KAAK,WAAW,CAAC;CAC3B;AACD"}
@@ -1,7 +1,7 @@
1
1
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
2
- import { f as composeSqlEntityKinds } from "./entity-kinds-JlqzyFoo-kIaAUFyK.mjs";
3
- import { c as isMaterializedSqlNamespace, o as SqlStorage } from "./types-DDHgx581.mjs";
4
- import { i as createSqlContractSchema, s as resolveSqlToOneRelationStorage, u as validateSqlContractFully } from "./validators-Xx-TKcx3.mjs";
2
+ import { f as composeSqlEntityKinds } from "./entity-kinds-O3V1K26U-B8TUrsX2.mjs";
3
+ import { c as isMaterializedSqlNamespace, o as SqlStorage } from "./types-C7oOtFcJ.mjs";
4
+ import { i as createSqlContractSchema, s as resolveSqlToOneRelationStorage, u as validateSqlContractFully } from "./validators-oyDG5mVX.mjs";
5
5
  import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
6
6
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
7
7
  import { hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
@@ -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-CLDkZLXO.mjs.map
191
+ //# sourceMappingURL=sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs.map