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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/dist/{ast-UfF480P2.d.mts → ast-DW-oFG2N.d.mts} +3 -3
  2. package/dist/{ast-UfF480P2.d.mts.map → ast-DW-oFG2N.d.mts.map} +1 -1
  3. package/dist/{authoring-type-constructors-Blqoa2Ua-DymjrX_a.mjs → authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs} +2 -2
  4. package/dist/{authoring-type-constructors-Blqoa2Ua-DymjrX_a.mjs.map → authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs.map} +1 -1
  5. package/dist/builder.d.mts +2 -2
  6. package/dist/builder__runtime.d.mts +9 -9
  7. package/dist/builder__runtime.mjs +1 -1
  8. package/dist/builder__types.d.mts +2 -2
  9. package/dist/{codec-descriptor-registry-BK_ZTP-3.mjs → codec-descriptor-registry-BQPj9q8O.mjs} +2 -2
  10. package/dist/{codec-descriptor-registry-BK_ZTP-3.mjs.map → codec-descriptor-registry-BQPj9q8O.mjs.map} +1 -1
  11. package/dist/{config-types-DuhCZxnc.d.mts → config-types-JLo8FI3b.d.mts} +4 -4
  12. package/dist/{config-types-DuhCZxnc.d.mts.map → config-types-JLo8FI3b.d.mts.map} +1 -1
  13. package/dist/{config-types-1lEI_abO.mjs → config-types-THGAJYUu.mjs} +2 -2
  14. package/dist/{config-types-1lEI_abO.mjs.map → config-types-THGAJYUu.mjs.map} +1 -1
  15. package/dist/{contract-builder-B5ztYYVI.d.mts → contract-builder-94EfE12M.d.mts} +25 -7
  16. package/dist/{contract-builder-B5ztYYVI.d.mts.map → contract-builder-94EfE12M.d.mts.map} +1 -1
  17. package/dist/{contract-builder-DQ02XiKy.mjs → contract-builder-bNftqD4M.mjs} +18 -3
  18. package/dist/contract-builder-bNftqD4M.mjs.map +1 -0
  19. package/dist/contract-psl.d.mts +2 -2
  20. package/dist/contract-psl.mjs +1 -1
  21. package/dist/contract-psl__provider.d.mts +2 -2
  22. package/dist/contract-psl__provider.mjs +2 -2
  23. package/dist/contract-psl__provider.mjs.map +1 -1
  24. package/dist/contract-ts.d.mts +5 -4
  25. package/dist/contract-ts.mjs +3 -3
  26. package/dist/contract-ts__config-types.d.mts +1 -1
  27. package/dist/contract-ts__config-types.mjs +1 -1
  28. package/dist/contract-ts__contract-builder.d.mts +4 -3
  29. package/dist/contract-ts__contract-builder.mjs +2 -2
  30. package/dist/{contract-view-DB7yHLAp.d.mts → contract-view-CX3RJUrm.d.mts} +2 -2
  31. package/dist/{contract-view-DB7yHLAp.d.mts.map → contract-view-CX3RJUrm.d.mts.map} +1 -1
  32. package/dist/contract.d.mts +14 -14
  33. package/dist/contract.mjs +8 -8
  34. package/dist/contract__contract-view.d.mts +1 -1
  35. package/dist/contract__entity-kinds.d.mts +1 -1
  36. package/dist/contract__entity-kinds.mjs +1 -1
  37. package/dist/contract__factories.d.mts +1 -1
  38. package/dist/contract__factories.mjs +1 -1
  39. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  40. package/dist/contract__foreign-key-materialization.mjs +1 -1
  41. package/dist/contract__index-naming.d.mts +1 -1
  42. package/dist/contract__index-naming.mjs +1 -1
  43. package/dist/contract__index-type-validation.d.mts +1 -1
  44. package/dist/contract__resolve-storage-table.d.mts +1 -1
  45. package/dist/contract__types.d.mts +6 -6
  46. package/dist/contract__types.mjs +3 -3
  47. package/dist/contract__validators.d.mts +1 -1
  48. package/dist/contract__validators.mjs +2 -2
  49. package/dist/{control-JKCfuZLF.d.mts → control-CiDHc3iC.d.mts} +14 -14
  50. package/dist/{control-JKCfuZLF.d.mts.map → control-CiDHc3iC.d.mts.map} +1 -1
  51. package/dist/{control-adapter-C99J7aEF-BvoknoRl.d.mts → control-adapter-C99J7aEF-DWH4HR8s.d.mts} +8 -8
  52. package/dist/{control-adapter-C99J7aEF-BvoknoRl.d.mts.map → control-adapter-C99J7aEF-DWH4HR8s.d.mts.map} +1 -1
  53. package/dist/control-adapter-DpCa7zm_.d.mts +1 -0
  54. package/dist/{control-Bj2zT_YF.mjs → control-jeE2ibQ5.mjs} +8 -8
  55. package/dist/{control-Bj2zT_YF.mjs.map → control-jeE2ibQ5.mjs.map} +1 -1
  56. package/dist/{db-B5PMfDDd-ZnA9Kuky.d.mts → db-B5PMfDDd-DcJie6Go.d.mts} +9 -9
  57. package/dist/{db-B5PMfDDd-ZnA9Kuky.d.mts.map → db-B5PMfDDd-DcJie6Go.d.mts.map} +1 -1
  58. package/dist/{ddl-types-h_3_pXmq-DzkUGplM.d.mts → ddl-types-h_3_pXmq-1i7p99aC.d.mts} +3 -3
  59. package/dist/{ddl-types-h_3_pXmq-DzkUGplM.d.mts.map → ddl-types-h_3_pXmq-1i7p99aC.d.mts.map} +1 -1
  60. package/dist/{derived-checks-BDG-r9XD-CrpFUaO7.mjs → derived-checks-CmJgg-N0-Dt3bpEKZ.mjs} +93 -43
  61. package/dist/derived-checks-CmJgg-N0-Dt3bpEKZ.mjs.map +1 -0
  62. package/dist/{derived-checks-DPdD01O0-CXFJD5al.d.mts → derived-checks-DPdD01O0-BusNrgPr.d.mts} +3 -3
  63. package/dist/{derived-checks-DPdD01O0-CXFJD5al.d.mts.map → derived-checks-DPdD01O0-BusNrgPr.d.mts.map} +1 -1
  64. package/dist/{diff-DDfez6HZ.d.mts → diff-CS3BDvZD.d.mts} +8 -8
  65. package/dist/{diff-DDfez6HZ.d.mts.map → diff-CS3BDvZD.d.mts.map} +1 -1
  66. package/dist/{entity-kinds-3IFQq7Ho-DB6IN-V6.mjs → entity-kinds-BP9JRPX9-oeJ-t1iG.mjs} +14 -5
  67. package/dist/entity-kinds-BP9JRPX9-oeJ-t1iG.mjs.map +1 -0
  68. package/dist/{entity-kinds-FB5fUkUH.d.mts → entity-kinds-CcRX_9l5.d.mts} +4 -4
  69. package/dist/{entity-kinds-FB5fUkUH.d.mts.map → entity-kinds-CcRX_9l5.d.mts.map} +1 -1
  70. package/dist/{expression-CBHseNtv.d.mts → expression-BUmcEWHx.d.mts} +5 -5
  71. package/dist/{expression-CBHseNtv.d.mts.map → expression-BUmcEWHx.d.mts.map} +1 -1
  72. package/dist/{factories-BPmhxoFd.d.mts → factories-DBqPbIcf.d.mts} +4 -4
  73. package/dist/{factories-BPmhxoFd.d.mts.map → factories-DBqPbIcf.d.mts.map} +1 -1
  74. package/dist/{factories-BtnISekg.mjs → factories-MZugewOe.mjs} +3 -3
  75. package/dist/{factories-BtnISekg.mjs.map → factories-MZugewOe.mjs.map} +1 -1
  76. package/dist/family.d.mts +11 -11
  77. package/dist/family.mjs +4 -4
  78. package/dist/family__control-adapter.d.mts +2 -2
  79. package/dist/family__control.d.mts +3 -3
  80. package/dist/family__control.mjs +2 -2
  81. package/dist/family__diff.d.mts +2 -2
  82. package/dist/family__diff.mjs +1 -1
  83. package/dist/family__ir.d.mts +1 -1
  84. package/dist/family__ir.mjs +1 -1
  85. package/dist/family__migration.d.mts +1 -1
  86. package/dist/family__pack.mjs +1 -1
  87. package/dist/family__psl-infer.d.mts +1 -1
  88. package/dist/family__psl-infer.mjs +1 -1
  89. package/dist/family__runtime.d.mts +2 -2
  90. package/dist/{foreign-key-materialization-CetaZvuu.d.mts → foreign-key-materialization-CS5yxHpq.d.mts} +2 -2
  91. package/dist/{foreign-key-materialization-CetaZvuu.d.mts.map → foreign-key-materialization-CS5yxHpq.d.mts.map} +1 -1
  92. package/dist/{foreign-key-materialization-fH6cObko.mjs → foreign-key-materialization-ziwobURR.mjs} +2 -2
  93. package/dist/{foreign-key-materialization-fH6cObko.mjs.map → foreign-key-materialization-ziwobURR.mjs.map} +1 -1
  94. package/dist/{index-COS9qF9d.d.mts → index-CYC083AG.d.mts} +16 -16
  95. package/dist/{index-COS9qF9d.d.mts.map → index-CYC083AG.d.mts.map} +1 -1
  96. package/dist/{index-avHHFCFT.d.mts → index-CwtBEMZr.d.mts} +3 -3
  97. package/dist/{index-avHHFCFT.d.mts.map → index-CwtBEMZr.d.mts.map} +1 -1
  98. package/dist/{index-naming-BfRyBZR4.d.mts → index-naming-BD2dqoTC.d.mts} +2 -2
  99. package/dist/{index-naming-BfRyBZR4.d.mts.map → index-naming-BD2dqoTC.d.mts.map} +1 -1
  100. package/dist/{index-naming-BoGBcMmI-DE0Eu71F.mjs → index-naming-BoGBcMmI-CoehgjMK.mjs} +2 -2
  101. package/dist/{index-naming-BoGBcMmI-DE0Eu71F.mjs.map → index-naming-BoGBcMmI-CoehgjMK.mjs.map} +1 -1
  102. package/dist/{index-type-validation-0NdkDB_n.d.mts → index-type-validation-ko-AixNA.d.mts} +3 -3
  103. package/dist/{index-type-validation-0NdkDB_n.d.mts.map → index-type-validation-ko-AixNA.d.mts.map} +1 -1
  104. package/dist/{interpreter-5WgpL-ax-BIbrd_Xv.mjs → interpreter-BDZ_Y5U--CWQ831IX.mjs} +88 -4
  105. package/dist/interpreter-BDZ_Y5U--CWQ831IX.mjs.map +1 -0
  106. package/dist/{ir-VWQX6aGP.d.mts → ir-DS7g_cyQ.d.mts} +3 -3
  107. package/dist/{ir-VWQX6aGP.d.mts.map → ir-DS7g_cyQ.d.mts.map} +1 -1
  108. package/dist/lane-query-builder.d.mts +4 -4
  109. package/dist/middleware-BDVd5Hbn.d.mts +1 -0
  110. package/dist/{middleware-eb7YwdD4-CiyaANOv.d.mts → middleware-eb7YwdD4-DPIUcY9j.d.mts} +2 -2
  111. package/dist/{middleware-eb7YwdD4-CiyaANOv.d.mts.map → middleware-eb7YwdD4-DPIUcY9j.d.mts.map} +1 -1
  112. package/dist/{migration-DvCs5-4I.d.mts → migration-hktwXU_H.d.mts} +4 -4
  113. package/dist/{migration-DvCs5-4I.d.mts.map → migration-hktwXU_H.d.mts.map} +1 -1
  114. package/dist/{naming-CEGRBbyW-BOa9Eun0.mjs → naming-BWkuWJJK-zuGIIJ49.mjs} +18 -3
  115. package/dist/naming-BWkuWJJK-zuGIIJ49.mjs.map +1 -0
  116. package/dist/{naming-DvlNocom-ClcApdiR.d.mts → naming-BsvzQPOq-qOWmknyp.d.mts} +17 -3
  117. package/dist/naming-BsvzQPOq-qOWmknyp.d.mts.map +1 -0
  118. package/dist/operations.d.mts +1 -1
  119. package/dist/orm-client.d.mts +11 -11
  120. package/dist/orm-client.mjs +1 -1
  121. package/dist/plan-Ba8TRfem.d.mts +2 -0
  122. package/dist/{plan-Bmp5R9sq-mVFXvLM7.d.mts → plan-Bmp5R9sq-BYkfwppR.d.mts} +4 -4
  123. package/dist/{plan-Bmp5R9sq-mVFXvLM7.d.mts.map → plan-Bmp5R9sq-BYkfwppR.d.mts.map} +1 -1
  124. package/dist/{psl-infer-f5BgyRKm.mjs → psl-infer-Z4wA2xpx.mjs} +2 -2
  125. package/dist/{psl-infer-f5BgyRKm.mjs.map → psl-infer-Z4wA2xpx.mjs.map} +1 -1
  126. package/dist/{psl-infer-Dp_hwubv.d.mts → psl-infer-zSNyTUPT.d.mts} +3 -3
  127. package/dist/{psl-infer-Dp_hwubv.d.mts.map → psl-infer-zSNyTUPT.d.mts.map} +1 -1
  128. package/dist/query-lane-context-CZEGLV1r.d.mts +1 -0
  129. package/dist/{query-lane-context-DjyAyYht-DdovdGjc.d.mts → query-lane-context-DjyAyYht-BWgx-nsP.d.mts} +5 -5
  130. package/dist/{query-lane-context-DjyAyYht-DdovdGjc.d.mts.map → query-lane-context-DjyAyYht-BWgx-nsP.d.mts.map} +1 -1
  131. package/dist/relational-core.d.mts +11 -11
  132. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  133. package/dist/relational-core__ast.d.mts +3 -3
  134. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  135. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  136. package/dist/relational-core__contract-free.d.mts +3 -3
  137. package/dist/relational-core__expression.d.mts +1 -1
  138. package/dist/relational-core__middleware.d.mts +2 -2
  139. package/dist/relational-core__plan.d.mts +3 -3
  140. package/dist/relational-core__query-lane-context.d.mts +2 -2
  141. package/dist/relational-core__types.d.mts +2 -2
  142. package/dist/{resolve-storage-table-BJYVl94P.d.mts → resolve-storage-table-CQsGt37y.d.mts} +3 -3
  143. package/dist/{resolve-storage-table-BJYVl94P.d.mts.map → resolve-storage-table-CQsGt37y.d.mts.map} +1 -1
  144. package/dist/{runtime-CiGC1spO.d.mts → runtime-Cl4WEBC7.d.mts} +3 -3
  145. package/dist/{runtime-CiGC1spO.d.mts.map → runtime-Cl4WEBC7.d.mts.map} +1 -1
  146. package/dist/runtime.d.mts +3 -3
  147. package/dist/runtime.mjs +1 -1
  148. package/dist/{schema-differ-DpG_gnur-BgbN2De2.d.mts → schema-differ-DpG_gnur-BYIE9qrd.d.mts} +5 -5
  149. package/dist/{schema-differ-DpG_gnur-BgbN2De2.d.mts.map → schema-differ-DpG_gnur-BYIE9qrd.d.mts.map} +1 -1
  150. package/dist/schema-ir.d.mts +1 -1
  151. package/dist/schema-ir.mjs +1 -1
  152. package/dist/schema-ir__naming.d.mts +2 -2
  153. package/dist/schema-ir__naming.mjs +2 -2
  154. package/dist/schema-ir__types.d.mts +2 -2
  155. package/dist/schema-ir__types.mjs +1 -1
  156. package/dist/{schema-verify-C_PEdlAr-JK3UgFWU.mjs → schema-verify-C_PEdlAr-CIgsqZ4M.mjs} +2 -2
  157. package/dist/{schema-verify-C_PEdlAr-JK3UgFWU.mjs.map → schema-verify-C_PEdlAr-CIgsqZ4M.mjs.map} +1 -1
  158. package/dist/{serialized-index-B6udRZV1-Ciet0tVA.mjs → serialized-index-BhiuLIBO-CRf7KRr_.mjs} +4 -4
  159. package/dist/{serialized-index-B6udRZV1-Ciet0tVA.mjs.map → serialized-index-BhiuLIBO-CRf7KRr_.mjs.map} +1 -1
  160. package/dist/{serialized-index-CvprUx-6-CX0DYGLe.d.mts → serialized-index-CEzaHjsj-DM-61QzZ.d.mts} +4 -4
  161. package/dist/serialized-index-CEzaHjsj-DM-61QzZ.d.mts.map +1 -0
  162. package/dist/{sql-contract-serializer-2oBWuxTe-Bp9QfUjI.mjs → sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs} +4 -4
  163. package/dist/{sql-contract-serializer-2oBWuxTe-Bp9QfUjI.mjs.map → sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map} +1 -1
  164. package/dist/{sql-execution-plan-Da_d82pz-g3khvnbo.d.mts → sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts} +2 -2
  165. package/dist/{sql-execution-plan-Da_d82pz-g3khvnbo.d.mts.map → sql-execution-plan-Da_d82pz-8mU4Fvvo.d.mts.map} +1 -1
  166. package/dist/{sql-index-DsI8HAeK-SazZYeA2.d.mts → sql-index-DsI8HAeK-DsSFxBGF.d.mts} +2 -2
  167. package/dist/{sql-index-DsI8HAeK-SazZYeA2.d.mts.map → sql-index-DsI8HAeK-DsSFxBGF.d.mts.map} +1 -1
  168. package/dist/{sql-storage-aEsH6Fnv-_bWH3uY3.d.mts → sql-storage-DCUlYs47-Cosit03s.d.mts} +3 -3
  169. package/dist/{sql-storage-aEsH6Fnv-_bWH3uY3.d.mts.map → sql-storage-DCUlYs47-Cosit03s.d.mts.map} +1 -1
  170. package/dist/{storage-table-BcDudZC5-DZNZhjf2.mjs → storage-table-BDY-lx9O-t7-IoZ2B.mjs} +4 -3
  171. package/dist/{storage-table-BcDudZC5-DZNZhjf2.mjs.map → storage-table-BDY-lx9O-t7-IoZ2B.mjs.map} +1 -1
  172. package/dist/{storage-table-BTVeIKBx-Ba6wCjG5.d.mts → storage-table-DBbCqpt7-PAuyeZA6.d.mts} +8 -4
  173. package/dist/storage-table-DBbCqpt7-PAuyeZA6.d.mts.map +1 -0
  174. package/dist/{types-UhDfY1iX-C5wOQ0D5.mjs → types-Bj2O1m67-BLTU_6HK.mjs} +3 -3
  175. package/dist/{types-UhDfY1iX-C5wOQ0D5.mjs.map → types-Bj2O1m67-BLTU_6HK.mjs.map} +1 -1
  176. package/dist/{types-BwePDa3m-CrVQ_8YI.d.mts → types-BwePDa3m-CMy7CB9N.d.mts} +2 -2
  177. package/dist/{types-BwePDa3m-CrVQ_8YI.d.mts.map → types-BwePDa3m-CMy7CB9N.d.mts.map} +1 -1
  178. package/dist/{types-BpPwiK2b-DCMVWQ_F.d.mts → types-CYq2Cbzw-xEntZSCk.d.mts} +6 -6
  179. package/dist/{types-BpPwiK2b-DCMVWQ_F.d.mts.map → types-CYq2Cbzw-xEntZSCk.d.mts.map} +1 -1
  180. package/dist/types-DEBm1lFa.d.mts +1 -0
  181. package/dist/{types-CuvwcWTE.mjs → types-DHzMt9jy.mjs} +2 -2
  182. package/dist/{types-CuvwcWTE.mjs.map → types-DHzMt9jy.mjs.map} +1 -1
  183. package/dist/{types-C1F8xk0m-7rMwgIR6.d.mts → types-DtDXwS0i-BjB1HLTY.d.mts} +3 -3
  184. package/dist/{types-C1F8xk0m-7rMwgIR6.d.mts.map → types-DtDXwS0i-BjB1HLTY.d.mts.map} +1 -1
  185. package/dist/{types-BL_h3id0.d.mts → types-DuriYH5B.d.mts} +6 -6
  186. package/dist/{types-BL_h3id0.d.mts.map → types-DuriYH5B.d.mts.map} +1 -1
  187. package/dist/{types-IqZMLrFC-CcORLTOK.d.mts → types-IqZMLrFC-BXR6F1nU.d.mts} +9 -9
  188. package/dist/{types-IqZMLrFC-CcORLTOK.d.mts.map → types-IqZMLrFC-BXR6F1nU.d.mts.map} +1 -1
  189. package/dist/types-KK31t3v0.d.mts +1 -0
  190. package/dist/{types-dD8JJfeD-CS9uMlzW.d.mts → types-dD8JJfeD-D8LDAPQW.d.mts} +10 -10
  191. package/dist/{types-dD8JJfeD-CS9uMlzW.d.mts.map → types-dD8JJfeD-D8LDAPQW.d.mts.map} +1 -1
  192. package/dist/{validators-w7IJlTcR.mjs → validators-Bgam9aM2.mjs} +0 -0
  193. package/dist/{validators-w7IJlTcR.mjs.map → validators-Bgam9aM2.mjs.map} +1 -1
  194. package/dist/{validators-Bl1TVj5n.d.mts → validators-CMi9UZNw.d.mts} +4 -3
  195. package/dist/validators-CMi9UZNw.d.mts.map +1 -0
  196. package/package.json +18 -18
  197. package/dist/contract-builder-DQ02XiKy.mjs.map +0 -1
  198. package/dist/control-adapter-BjSrEp2V.d.mts +0 -1
  199. package/dist/derived-checks-BDG-r9XD-CrpFUaO7.mjs.map +0 -1
  200. package/dist/entity-kinds-3IFQq7Ho-DB6IN-V6.mjs.map +0 -1
  201. package/dist/interpreter-5WgpL-ax-BIbrd_Xv.mjs.map +0 -1
  202. package/dist/middleware-B8QoWWIx.d.mts +0 -1
  203. package/dist/naming-CEGRBbyW-BOa9Eun0.mjs.map +0 -1
  204. package/dist/naming-DvlNocom-ClcApdiR.d.mts.map +0 -1
  205. package/dist/plan-Cl6aCuij.d.mts +0 -2
  206. package/dist/query-lane-context-BhDJZFMh.d.mts +0 -1
  207. package/dist/serialized-index-CvprUx-6-CX0DYGLe.d.mts.map +0 -1
  208. package/dist/storage-table-BTVeIKBx-Ba6wCjG5.d.mts.map +0 -1
  209. package/dist/types--gTlnnvl.d.mts +0 -1
  210. package/dist/types-C-KBovJY.d.mts +0 -1
  211. package/dist/validators-Bl1TVj5n.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"middleware-eb7YwdD4-CiyaANOv.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/middleware-eb7YwdD4.d.mts"],"mappings":";;;;;;;;;;;;;;cAac;;;;;;;;;;UAUJ,eAAe;YACb,sBAAsB;;;;;;;UAOxB,cAAc;WACb,KAAK,eAAe;WACpB;WACA,SAAS;;;;;;;;;;KAUf,mBAAmB,kBAAkB,8BAA8B,WAAW,qBAAqB,cAAc,YAAY,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;UAyB9I,mBAAmB,kBAAkB,0BAA0B,iCAAiC;;EAExG,WAAW,iBAAiB,mBAAmB;;;;;;;EAO/C,aAAa,uBAAuB,oBAAoB,KAAK,eAAe,WAAW,UAAU,UAAU;EAC3G,aAAa,KAAK,2BAA2B;;EAE7C,cAAc,SAAS;aACZ,KAAK,sBAAsB;aAC3B;;;;;;;;;;;;;UAaH,2BAA2B,kBAAkB,0BAA0B,iCAAiC,mBAAmB;EACnI;;;;;;;;;;;;;;;;;iBAiBe,yBAAyB,kBAAkB,0BAA0B,yBAAyB,MAAM,mBAAmB,2BAA2B"}
1
+ {"version":3,"file":"middleware-eb7YwdD4-DPIUcY9j.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/middleware-eb7YwdD4.d.mts"],"mappings":";;;;;;;;;;;;;;cAac;;;;;;;;;;UAUJ,eAAe;YACb,sBAAsB;;;;;;;UAOxB,cAAc;WACb,KAAK,eAAe;WACpB;WACA,SAAS;;;;;;;;;;KAUf,mBAAmB,kBAAkB,8BAA8B,WAAW,qBAAqB,cAAc,YAAY,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;UAyB9I,mBAAmB,kBAAkB,0BAA0B,iCAAiC;;EAExG,WAAW,iBAAiB,mBAAmB;;;;;;;EAO/C,aAAa,uBAAuB,oBAAoB,KAAK,eAAe,WAAW,UAAU,UAAU;EAC3G,aAAa,KAAK,2BAA2B;;EAE7C,cAAc,SAAS;aACZ,KAAK,sBAAsB;aAC3B;;;;;;;;;;;;;UAaH,2BAA2B,kBAAkB,0BAA0B,iCAAiC,mBAAmB;EACnI;;;;;;;;;;;;;;;;;iBAiBe,yBAAyB,kBAAkB,0BAA0B,yBAAyB,MAAM,mBAAmB,2BAA2B"}
@@ -1,6 +1,6 @@
1
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { f as SqlMigrationPlanOperation, w as SqlPlanTargetDetails } from "./types-IqZMLrFC-CcORLTOK.mjs";
1
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { f as SqlMigrationPlanOperation, w as SqlPlanTargetDetails } from "./types-IqZMLrFC-BXR6F1nU.mjs";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { Migration } from "@prisma/orm-toolchain/migration-tools/migration";
6
6
  //#region ../../../2-sql/9-family/dist/migration.d.mts
@@ -41,4 +41,4 @@ declare abstract class SqlMigration<TDetails extends SqlPlanTargetDetails, TTarg
41
41
  }
42
42
  //#endregion
43
43
  export { SqlMigration as t };
44
- //# sourceMappingURL=migration-DvCs5-4I.d.mts.map
44
+ //# sourceMappingURL=migration-hktwXU_H.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-DvCs5-4I.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0BuB,aAAa,iBAAiB,sBAAsB,mCAAmC,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,0BAA0B,kBAAkB,WAAW,OAAO;;;;;;;;;;;MAW5S"}
1
+ {"version":3,"file":"migration-hktwXU_H.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0BuB,aAAa,iBAAiB,sBAAsB,mCAAmC,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,0BAA0B,kBAAkB,WAAW,OAAO;;;;;;;;;;;MAW5S"}
@@ -1,7 +1,7 @@
1
1
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
2
2
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
3
3
  import { createHash } from "node:crypto";
4
- //#region ../../../2-sql/1-core/schema-ir/dist/naming-CEGRBbyW.mjs
4
+ //#region ../../../2-sql/1-core/schema-ir/dist/naming-BWkuWJJK.mjs
5
5
  function defaultIndexName(tableName, columns) {
6
6
  return `${tableName}_${columns.join("_")}_idx`;
7
7
  }
@@ -132,6 +132,21 @@ function computeCheckContentHash(expression) {
132
132
  const tuple = JSON.stringify([normalizeSqlBody(expression)]);
133
133
  return createHash("sha256").update(tuple).digest("hex").slice(0, 8);
134
134
  }
135
+ /** The trailing segment a check's wire-name prefix carries, per kind. */
136
+ const CHECK_KIND_SUFFIX = {
137
+ membership: "check",
138
+ elementNotNull: "elem_not_null"
139
+ };
140
+ /**
141
+ * Composes the wire-name prefix of a derived CHECK constraint:
142
+ * `${table}_${column}_${kindSuffix}`, capped at the wire-name byte budget.
143
+ * Shared by contract authoring (naming emitted checks) and `contract infer`
144
+ * (recomputing the name a derived check would carry), so truncated and
145
+ * multibyte prefixes match by construction.
146
+ */
147
+ function composeCheckWirePrefix(tableName, columnName, kind) {
148
+ return truncateToWireNamePrefixBytes(`${tableName}_${columnName}_${CHECK_KIND_SUFFIX[kind]}`);
149
+ }
135
150
  /**
136
151
  * Returns the first 8 lowercase hex characters of the SHA-256 digest over the
137
152
  * canonical content tuple for an index:
@@ -217,6 +232,6 @@ function truncateToWireNamePrefixBytes(prefix) {
217
232
  return out;
218
233
  }
219
234
  //#endregion
220
- export { defaultIndexName as a, namingOf as c, normalizeSqlBody as d, parseNaming as f, computeIndexContentHash as i, namingOfLiveName as l, truncateToWireNamePrefixBytes as m, assertWireNamePrefixLength as n, formatWireName as o, parseWireName as p, computeCheckContentHash as r, nameOf as s, WIRE_NAME_PREFIX_MAX_BYTES as t, normalizeIndexOptionValue as u };
235
+ export { computeIndexContentHash as a, nameOf as c, normalizeIndexOptionValue as d, normalizeSqlBody as f, truncateToWireNamePrefixBytes as h, computeCheckContentHash as i, namingOf as l, parseWireName as m, assertWireNamePrefixLength as n, defaultIndexName as o, parseNaming as p, composeCheckWirePrefix as r, formatWireName as s, WIRE_NAME_PREFIX_MAX_BYTES as t, namingOfLiveName as u };
221
236
 
222
- //# sourceMappingURL=naming-CEGRBbyW-BOa9Eun0.mjs.map
237
+ //# sourceMappingURL=naming-BWkuWJJK-zuGIIJ49.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"naming-BWkuWJJK-zuGIIJ49.mjs","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/naming-BWkuWJJK.mjs"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/naming.ts\nfunction defaultIndexName(tableName, columns) {\n\treturn `${tableName}_${columns.join(\"_\")}_idx`;\n}\n/** The flat name the union describes. Inverse of {@link namingOf}. */\nfunction nameOf(naming) {\n\treturn naming.kind === \"wire\" ? formatWireName(naming.prefix, naming.hash) : naming.name;\n}\n/**\n* The naming a name-identified node was built with, read back off the flat\n* pair it stores. Inverse of {@link nameOf}, and total for that\n* reason: the constructor derived `name` from the union, so the two agree.\n* Flat data arriving from outside the process goes through\n* {@link parseNaming} instead.\n*/\nfunction namingOf(name, prefix) {\n\tif (prefix === void 0) return {\n\t\tkind: \"exact\",\n\t\tname\n\t};\n\treturn {\n\t\tkind: \"wire\",\n\t\tprefix,\n\t\thash: name.slice(prefix.length + 1)\n\t};\n}\n/**\n* Reads naming out of flat stored data — deserialized contract JSON and the\n* literals a user may hand-edit, the one place a name and a prefix can still\n* disagree. Throws when a declared prefix does not parse back out of the name.\n*/\nfunction parseNaming(name, prefix) {\n\tif (prefix === void 0) return {\n\t\tkind: \"exact\",\n\t\tname\n\t};\n\tconst parsed = parseWireName(name);\n\tif (parsed === void 0 || parsed.prefix !== prefix) throw new ContractValidationError(`\"${name}\": prefix \"${prefix}\" does not match the wire name (expected \"${formatWireName(prefix, \"<8hex>\")}\").`, \"storage\");\n\treturn {\n\t\tkind: \"wire\",\n\t\tprefix: parsed.prefix,\n\t\thash: parsed.hash\n\t};\n}\n/**\n* The naming an object read out of a live catalog has: a wire-shaped name\n* gets the wire arm so the rename pass can pair it by prefix, and every\n* other name is exact.\n*\n* The wire answer is a claim about the name's SHAPE only — the hash is\n* deliberately not recomputed from the object's content here. Nothing\n* downstream reads it as more than that: the differ always asks the\n* contract-derived side to choose the comparison, so a shape-only wire\n* claim on the introspected side never suppresses a body comparison, and\n* `contract infer` recomputes the hash independently before it will emit an\n* index as wire-named.\n*/\nfunction namingOfLiveName(name) {\n\tconst wire = parseWireName(name);\n\treturn wire === void 0 ? {\n\t\tkind: \"exact\",\n\t\tname\n\t} : {\n\t\tkind: \"wire\",\n\t\tprefix: wire.prefix,\n\t\thash: wire.hash\n\t};\n}\nconst WIRE_NAME_PATTERN = /^(.+)_([0-9a-f]{8})$/;\n/**\n* Assembles a wire name from its user-supplied prefix and its 8-hex\n* content-hash suffix. This module owns the `<prefix>_<hash>` format on both\n* sides — construction here and parsing in {@link parseWireName} — so the two\n* never drift.\n*/\nfunction formatWireName(prefix, hash) {\n\treturn `${prefix}_${hash}`;\n}\n/**\n* Splits a wire name (`<prefix>_<8hex>`) into its prefix and content-hash\n* suffix. Returns `undefined` when the name does not follow the wire-name\n* shape (e.g. an object created outside the toolchain) — callers treat such\n* names as all-prefix. Consumed by introspection (prefix extraction) and by\n* rename pairing (same hash, different prefix).\n*/\nfunction parseWireName(name) {\n\tconst match = WIRE_NAME_PATTERN.exec(name);\n\tconst prefix = match?.[1];\n\tconst hash = match?.[2];\n\tif (prefix === void 0 || hash === void 0) return void 0;\n\treturn {\n\t\tprefix,\n\t\thash\n\t};\n}\n/**\n* Stabilizes an authored SQL body (index expression, partial-index predicate,\n* RLS policy predicate) for hashing: trim, and collapse runs of internal\n* whitespace to a single space.\n*\n* This is deliberately minimal. The content hash is the equivalence relation\n* for a wire-named object, and the wire name (prefix + hash) is the only\n* thing ever compared — the hash is never recomputed from an introspected\n* body, so there is no need to match the database's reprinted form. Minimal\n* normalization also protects the no-collision property: aggressive rewriting\n* (lowercasing, paren-stripping, cast-alias folding) risks collapsing two\n* distinct bodies onto one hash.\n*\n* The normalizer is a stability commitment: any change re-suffixes all wire names.\n*/\nfunction normalizeSqlBody(sql) {\n\treturn sql.replace(/\\s+/g, \" \").trim();\n}\n/**\n* Returns the first 8 lowercase hex characters of the SHA-256 digest over the\n* canonical content tuple for a check constraint:\n*\n* [normalizeSqlBody(expression)]\n*\n* The predicate is the whole of a check's content — the constraint name,\n* schema, and table are orthogonal to its equivalence. The one-element tuple\n* keeps the encoding in the same shape as the index and RLS tuples so a member\n* can be added later without re-reading which encoding a kind uses.\n*\n* The tuple order and encoding are a stability commitment: any change\n* re-suffixes every wire name.\n*/\nfunction computeCheckContentHash(expression) {\n\tconst tuple = JSON.stringify([normalizeSqlBody(expression)]);\n\treturn createHash(\"sha256\").update(tuple).digest(\"hex\").slice(0, 8);\n}\n/** The trailing segment a check's wire-name prefix carries, per kind. */\nconst CHECK_KIND_SUFFIX = {\n\tmembership: \"check\",\n\telementNotNull: \"elem_not_null\"\n};\n/**\n* Composes the wire-name prefix of a derived CHECK constraint:\n* `${table}_${column}_${kindSuffix}`, capped at the wire-name byte budget.\n* Shared by contract authoring (naming emitted checks) and `contract infer`\n* (recomputing the name a derived check would carry), so truncated and\n* multibyte prefixes match by construction.\n*/\nfunction composeCheckWirePrefix(tableName, columnName, kind) {\n\treturn truncateToWireNamePrefixBytes(`${tableName}_${columnName}_${CHECK_KIND_SUFFIX[kind]}`);\n}\n/**\n* Returns the first 8 lowercase hex characters of the SHA-256 digest over the\n* canonical content tuple for an index:\n*\n* [normalizeSqlBody(expression), normalizeSqlBody(where), columns, unique, type, sortedOptions]\n*\n* Columns hash in authored order — column order is semantic in an index.\n* Option values are `String()`-coerced (matching the loose option equality\n* used for diffing) so a hash computed from typed contract values agrees with\n* one recomputed from introspected reloptions strings. The prefix, schema,\n* and table are excluded (they are orthogonal to index equivalence).\n*\n* The tuple order and encoding are a stability commitment with the same\n* status as the RLS tuple: any change re-suffixes every wire name.\n*/\n/**\n* Canonicalizes one index option VALUE to the `on`/`off` boolean spelling:\n* JS booleans and the common catalog spellings (`pg_class.reloptions`\n* stores whatever spelling the DDL used, so a live index may carry\n* `'true'`/`'false'` or `'on'`/`'off'`) all map to one form; everything\n* else via `String()` (fully specified for numbers, so no platform\n* variance). Shared by the wire-name hash tuple, the node's option\n* equality, and the DDL renderer, so an authored `{ fastupdate: true }`\n* agrees with a live index created under any boolean spelling.\n*/\nfunction normalizeIndexOptionValue(value) {\n\tif (value === true || value === \"true\" || value === \"on\") return \"on\";\n\tif (value === false || value === \"false\" || value === \"off\") return \"off\";\n\treturn String(value);\n}\nfunction computeIndexContentHash(parts) {\n\tconst sortedOptions = Object.entries(parts.options ?? {}).map(([key, value]) => [key, normalizeIndexOptionValue(value)]).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);\n\tconst tuple = JSON.stringify([\n\t\tnormalizeSqlBody(parts.expression ?? \"\"),\n\t\tnormalizeSqlBody(parts.where ?? \"\"),\n\t\tparts.columns ?? [],\n\t\tparts.unique,\n\t\tparts.type ?? \"\",\n\t\tsortedOptions\n\t]);\n\treturn createHash(\"sha256\").update(tuple).digest(\"hex\").slice(0, 8);\n}\n/**\n* Postgres truncates identifiers at `NAMEDATALEN - 1` = 63 **bytes**, not\n* characters, and the wire name appends a 9-byte `_<8hex>` suffix — so a\n* prefix is bounded at 54 bytes. A prefix of non-ASCII characters can sit well\n* under 54 characters and still overrun: the database would silently truncate\n* the name, leaving the declared object permanently unmatchable against the\n* live one.\n*/\nconst WIRE_NAME_PREFIX_MAX_BYTES = 54;\nconst utf8 = new TextEncoder();\n/** UTF-8 byte length — the unit Postgres measures identifiers in. */\nfunction byteLength(value) {\n\treturn utf8.encode(value).length;\n}\n/**\n* Rejects a wire-name prefix over {@link WIRE_NAME_PREFIX_MAX_BYTES}.\n* `subject` opens the error message (e.g. `defineContract: policy prefix`).\n*/\nfunction assertWireNamePrefixLength(prefix, subject) {\n\tif (byteLength(prefix) > 54) throw structuredError(\"CONTRACT.WIRE_NAME_PREFIX_TOO_LONG\", `${subject} \"${prefix}\" exceeds the 54-byte maximum (Postgres identifiers cap at 63 bytes and the wire name appends a 9-byte hash suffix).`, { meta: {\n\t\tprefix,\n\t\tmaxBytes: 54\n\t} });\n}\n/**\n* Shortens a DERIVED wire-name prefix to {@link WIRE_NAME_PREFIX_MAX_BYTES},\n* cutting on a code-point boundary so a multibyte character is never split.\n* Only derived prefixes truncate — an authored one throws\n* ({@link assertWireNamePrefixLength}), because its author can shorten it.\n*/\nfunction truncateToWireNamePrefixBytes(prefix) {\n\tif (byteLength(prefix) <= 54) return prefix;\n\tlet out = \"\";\n\tlet bytes = 0;\n\tfor (const character of prefix) {\n\t\tconst size = byteLength(character);\n\t\tif (bytes + size > 54) break;\n\t\tout += character;\n\t\tbytes += size;\n\t}\n\treturn out;\n}\n//#endregion\nexport { computeIndexContentHash as a, nameOf as c, normalizeIndexOptionValue as d, normalizeSqlBody as f, truncateToWireNamePrefixBytes as h, computeCheckContentHash as i, namingOf as l, parseWireName as m, assertWireNamePrefixLength as n, defaultIndexName as o, parseNaming as p, composeCheckWirePrefix as r, formatWireName as s, WIRE_NAME_PREFIX_MAX_BYTES as t, namingOfLiveName as u };\n\n//# sourceMappingURL=naming-BWkuWJJK.mjs.map"],"mappings":";;;;AAIA,SAAS,iBAAiB,WAAW,SAAS;CAC7C,OAAO,GAAG,UAAU,GAAG,QAAQ,KAAK,GAAG,EAAE;AAC1C;;AAEA,SAAS,OAAO,QAAQ;CACvB,OAAO,OAAO,SAAS,SAAS,eAAe,OAAO,QAAQ,OAAO,IAAI,IAAI,OAAO;AACrF;;;;;;;;AAQA,SAAS,SAAS,MAAM,QAAQ;CAC/B,IAAI,WAAW,KAAK,GAAG,OAAO;EAC7B,MAAM;EACN;CACD;CACA,OAAO;EACN,MAAM;EACN;EACA,MAAM,KAAK,MAAM,OAAO,SAAS,CAAC;CACnC;AACD;;;;;;AAMA,SAAS,YAAY,MAAM,QAAQ;CAClC,IAAI,WAAW,KAAK,GAAG,OAAO;EAC7B,MAAM;EACN;CACD;CACA,MAAM,SAAS,cAAc,IAAI;CACjC,IAAI,WAAW,KAAK,KAAK,OAAO,WAAW,QAAQ,MAAM,IAAI,wBAAwB,IAA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1-core/schema-ir/dist/naming-DvlNocom.d.mts
1
+ //#region ../../../2-sql/1-core/schema-ir/dist/naming-BsvzQPOq.d.mts
2
2
  //#region src/naming.d.ts
3
3
  declare function defaultIndexName(tableName: string, columns: readonly string[]): string;
4
4
  interface WireName {
@@ -98,6 +98,20 @@ declare function normalizeSqlBody(sql: string): string;
98
98
  * re-suffixes every wire name.
99
99
  */
100
100
  declare function computeCheckContentHash(expression: string): string;
101
+ /**
102
+ * The kinds of generated CHECK constraint authoring can derive for a column.
103
+ * The canonical spelling of this union — every layer that can depend on this
104
+ * module imports it rather than re-spelling the literals.
105
+ */
106
+ type CheckKind = 'membership' | 'elementNotNull';
107
+ /**
108
+ * Composes the wire-name prefix of a derived CHECK constraint:
109
+ * `${table}_${column}_${kindSuffix}`, capped at the wire-name byte budget.
110
+ * Shared by contract authoring (naming emitted checks) and `contract infer`
111
+ * (recomputing the name a derived check would carry), so truncated and
112
+ * multibyte prefixes match by construction.
113
+ */
114
+ declare function composeCheckWirePrefix(tableName: string, columnName: string, kind: CheckKind): string;
101
115
  interface IndexContentHashParts {
102
116
  readonly expression?: string;
103
117
  readonly where?: string;
@@ -155,5 +169,5 @@ declare function assertWireNamePrefixLength(prefix: string, subject: string): vo
155
169
  */
156
170
  declare function truncateToWireNamePrefixBytes(prefix: string): string;
157
171
  //#endregion
158
- export { truncateToWireNamePrefixBytes as _, assertWireNamePrefixLength as a, defaultIndexName as c, namingOf as d, namingOfLiveName as f, parseWireName as g, parseNaming as h, WireName as i, formatWireName as l, normalizeSqlBody as m, SqlObjectNaming as n, computeCheckContentHash as o, normalizeIndexOptionValue as p, WIRE_NAME_PREFIX_MAX_BYTES as r, computeIndexContentHash as s, IndexContentHashParts as t, nameOf as u };
159
- //# sourceMappingURL=naming-DvlNocom-ClcApdiR.d.mts.map
172
+ export { parseNaming as _, WireName as a, computeCheckContentHash as c, formatWireName as d, nameOf as f, normalizeSqlBody as g, normalizeIndexOptionValue as h, WIRE_NAME_PREFIX_MAX_BYTES as i, computeIndexContentHash as l, namingOfLiveName as m, IndexContentHashParts as n, assertWireNamePrefixLength as o, namingOf as p, SqlObjectNaming as r, composeCheckWirePrefix as s, CheckKind as t, defaultIndexName as u, parseWireName as v, truncateToWireNamePrefixBytes as y };
173
+ //# sourceMappingURL=naming-BsvzQPOq-qOWmknyp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"naming-BsvzQPOq-qOWmknyp.d.mts","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/naming-BsvzQPOq.d.mts"],"mappings":";;iBACiB,iBAAiB,mBAAmB;UAC3C;;WAEC;;WAEA;;;;;;;;;;;KAWN;WACM;WACA;;WAEA;IACP;;iBAEa,OAAO,QAAQ;;;;;;;;iBAQf,SAAS,cAAc,6BAA6B;;;;;;iBAMpD,YAAY,cAAc,6BAA6B;;;;;;;;;;;;;;iBAcvD,iBAAiB,eAAe;;;;;;;iBAOhC,eAAe,gBAAgB;;;;;;;;iBAQ/B,cAAc,eAAe;;;;;;;;;;;;;;;;iBAgB7B,iBAAiB;;;;;;;;;;;;;;;iBAejB,wBAAwB;;;;;;KAMpC;;;;;;;;iBAQY,uBAAuB,mBAAmB,oBAAoB,MAAM;UAC3E;WACC;WACA;WACA;WACA;WACA;WACA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BJ,0BAA0B;iBAC1B,wBAAwB,OAAO;;;;;;;;;cASlC;;;;;iBAKG,2BAA2B,gBAAgB;;;;;;;iBAO3C,8BAA8B"}
@@ -1,2 +1,2 @@
1
- import { a as SqlOperationRegistry, i as SqlOperationEntry, n as SqlOperationDescriptor, o as createSqlOperationRegistry, r as SqlOperationDescriptors, t as SqlLoweringSpec } from "./index-avHHFCFT.mjs";
1
+ import { a as SqlOperationRegistry, i as SqlOperationEntry, n as SqlOperationDescriptor, o as createSqlOperationRegistry, r as SqlOperationDescriptors, t as SqlLoweringSpec } from "./index-CwtBEMZr.mjs";
2
2
  export { SqlLoweringSpec, SqlOperationDescriptor, SqlOperationDescriptors, SqlOperationEntry, SqlOperationRegistry, createSqlOperationRegistry };
@@ -1,14 +1,14 @@
1
- import { a as StorageTable, r as StorageColumn } from "./storage-table-BTVeIKBx-Ba6wCjG5.mjs";
2
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
3
- import { f as ExtractFieldOutputTypes, l as ExtractAggregateTypes, p as ExtractQueryOperationTypes, u as ExtractCodecTypes } from "./types-BpPwiK2b-DCMVWQ_F.mjs";
4
- import "./types-BL_h3id0.mjs";
5
- import { Pt as WhereArg, T as CodecRef$1, a as AndExpr, g as BinaryExpr, gt as OrderByItem, ht as OrExpr, pt as NullCheckExpr, s as AnyExpression } from "./types-BwePDa3m-CrVQ_8YI.mjs";
6
- import "./ast-UfF480P2.mjs";
7
- import { a as Expression } from "./expression-CBHseNtv.mjs";
8
- import { r as ExecutionContext } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
9
- import "./query-lane-context-BhDJZFMh.mjs";
10
- import { o as ComputeColumnJsType, y as RuntimeScope } from "./types-dD8JJfeD-CS9uMlzW.mjs";
11
- import "./types--gTlnnvl.mjs";
1
+ import { a as StorageTable, r as StorageColumn } from "./storage-table-DBbCqpt7-PAuyeZA6.mjs";
2
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
3
+ import { f as ExtractFieldOutputTypes, l as ExtractAggregateTypes, p as ExtractQueryOperationTypes, u as ExtractCodecTypes } from "./types-CYq2Cbzw-xEntZSCk.mjs";
4
+ import "./types-DuriYH5B.mjs";
5
+ import { Pt as WhereArg, T as CodecRef$1, a as AndExpr, g as BinaryExpr, gt as OrderByItem, ht as OrExpr, pt as NullCheckExpr, s as AnyExpression } from "./types-BwePDa3m-CMy7CB9N.mjs";
6
+ import "./ast-DW-oFG2N.mjs";
7
+ import { a as Expression } from "./expression-BUmcEWHx.mjs";
8
+ import { r as ExecutionContext } from "./query-lane-context-DjyAyYht-BWgx-nsP.mjs";
9
+ import "./query-lane-context-CZEGLV1r.mjs";
10
+ import { o as ComputeColumnJsType, y as RuntimeScope } from "./types-dD8JJfeD-D8LDAPQW.mjs";
11
+ import "./types-KK31t3v0.mjs";
12
12
  import { Contract } from "@prisma/orm-framework/contract/types";
13
13
  import { AnnotationValue, AsyncIterableResult, MetaBuilder, OperationKind } from "@prisma/orm-framework/components/runtime";
14
14
  import { SimplifyDeep } from "@prisma/orm-framework/utils/simplify-deep";
@@ -3,7 +3,7 @@ import { i as isUniqueConstraintViolation } from "./dist-x6jvtkKM.mjs";
3
3
  import { B as isWhereExpr, C as LiteralExpr, D as OrExpr, F as SubqueryExpr, I as TableSource, L as UpdateAst, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, _ as InsertAst, b as JsonArrayAggExpr, c as DeleteAst, f as EqColJoinOn, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst } from "./types-D-_2ZCos-9q6j1gKx.mjs";
4
4
  import { t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
5
5
  import { n as JsonDocumentProjection, r as NativeJsonValueProjection, t as CodecJsonValueProjection } from "./ast-DDAyIKdt.mjs";
6
- import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-BK_ZTP-3.mjs";
6
+ import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-BQPj9q8O.mjs";
7
7
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
8
8
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
9
9
  import { domainModelsAtDefaultNamespace } from "@prisma/orm-framework/contract/types";
@@ -0,0 +1,2 @@
1
+ import "./sql-execution-plan-Da_d82pz-8mU4Fvvo.mjs";
2
+ import "./plan-Bmp5R9sq-BYkfwppR.mjs";
@@ -1,6 +1,6 @@
1
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { m as AnyQueryAst } from "./types-BwePDa3m-CrVQ_8YI.mjs";
1
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { m as AnyQueryAst } from "./types-BwePDa3m-CMy7CB9N.mjs";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { QueryPlan } from "@prisma/orm-framework/components/runtime";
6
6
  //#region ../../../2-sql/4-lanes/relational-core/dist/plan-Bmp5R9sq.d.mts
@@ -42,4 +42,4 @@ interface SqlQueryPlan<Row = unknown> extends QueryPlan<Row> {
42
42
  declare function planFromAst<Row = unknown>(ast: AnyQueryAst, contract: Contract<SqlStorage>, laneId?: string): SqlQueryPlan<Row>;
43
43
  //#endregion
44
44
  export { planFromAst as n, SqlQueryPlan as t };
45
- //# sourceMappingURL=plan-Bmp5R9sq-mVFXvLM7.d.mts.map
45
+ //# sourceMappingURL=plan-Bmp5R9sq-BYkfwppR.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-Bmp5R9sq-mVFXvLM7.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/plan-Bmp5R9sq.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;;;;;;;;;;;;;;;;;;iBAmBM,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
1
+ {"version":3,"file":"plan-Bmp5R9sq-BYkfwppR.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/plan-Bmp5R9sq.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;;;;;;;;;;;;;;;;;;iBAmBM,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
@@ -1,4 +1,4 @@
1
- import { n as isBackedByColumnKeys, t as backingIndexColumnKeys } from "./foreign-key-materialization-fH6cObko.mjs";
1
+ import { n as isBackedByColumnKeys, t as backingIndexColumnKeys } from "./foreign-key-materialization-ziwobURR.mjs";
2
2
  import pluralizeLib from "pluralize";
3
3
  //#region ../../../2-sql/9-family/dist/psl-infer.mjs
4
4
  const DEFAULT_FUNCTION_ATTRIBUTES = {
@@ -359,4 +359,4 @@ function addRelationField(map, tableName, field) {
359
359
  //#endregion
360
360
  export { mapDefault as a, toEnumMemberName as c, toModelName as d, inferRelations as i, toEnumName as l, deriveBackRelationFieldName as n, parseRawDefault as o, deriveRelationFieldName as r, pluralize as s, buildChildRelationField as t, toFieldName as u };
361
361
 
362
- //# sourceMappingURL=psl-infer-f5BgyRKm.mjs.map
362
+ //# sourceMappingURL=psl-infer-Z4wA2xpx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"psl-infer-f5BgyRKm.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.mjs"],"sourcesContent":["import pluralizeLib from \"pluralize\";\nimport { backingIndexColumnKeys, isBackedByColumnKeys } from \"@internal/sql-contract/foreign-key-materialization\";\n//#region src/core/psl-contract-infer/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\nfunction mapDefault(columnDefault, options) {\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return { attribute: `@default(${formatLiteralValue(columnDefault.value)})` };\n\t\tcase \"function\": {\n\t\t\tconst attribute = options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? options?.fallbackFunctionAttribute?.(columnDefault.expression);\n\t\t\treturn attribute ? { attribute } : { comment: `// Raw default: ${columnDefault.expression.replace(/[\\r\\n]+/g, \" \")}` };\n\t\t}\n\t}\n}\nfunction formatLiteralValue(value) {\n\tif (value === null) return \"null\";\n\tswitch (typeof value) {\n\t\tcase \"boolean\":\n\t\tcase \"number\": return String(value);\n\t\tcase \"string\": return quoteString(value);\n\t\tdefault: return quoteString(JSON.stringify(value));\n\t}\n}\nfunction quoteString(str) {\n\treturn `\"${escapeString(str)}\"`;\n}\nfunction escapeString(str) {\n\treturn JSON.stringify(str).slice(1, -1);\n}\n//#endregion\n//#region src/core/psl-contract-infer/name-transforms.ts\nconst PSL_RESERVED_WORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"enum\",\n\t\"types\",\n\t\"type\",\n\t\"generator\",\n\t\"datasource\"\n]);\nconst IDENTIFIER_PART_PATTERN = /[A-Za-z0-9]+/g;\nfunction hasSeparators(input) {\n\treturn /[^A-Za-z0-9]/.test(input);\n}\nfunction extractIdentifierParts(input) {\n\treturn input.match(IDENTIFIER_PART_PATTERN) ?? [];\n}\nfunction createSyntheticIdentifier(input) {\n\tlet hash = 2166136261;\n\tfor (const char of input) {\n\t\thash ^= char.codePointAt(0) ?? 0;\n\t\thash = Math.imul(hash, 16777619);\n\t}\n\treturn `x${(hash >>> 0).toString(16)}`;\n}\nfunction sanitizeIdentifierCharacters(input) {\n\tconst sanitized = input.replace(/[^\\w]/g, \"\");\n\treturn sanitized.length > 0 ? sanitized : createSyntheticIdentifier(input);\n}\nfunction capitalize(word) {\n\treturn word.charAt(0).toUpperCase() + word.slice(1);\n}\nfunction snakeToPascalCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return capitalize(sanitizeIdentifierCharacters(input));\n\treturn parts.map(capitalize).join(\"\");\n}\nfunction snakeToCamelCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return sanitizeIdentifierCharacters(input);\n\tconst [firstPart = input, ...rest] = parts;\n\treturn firstPart.charAt(0).toLowerCase() + firstPart.slice(1) + rest.map(capitalize).join(\"\");\n}\nfunction needsEscaping(name) {\n\treturn PSL_RESERVED_WORDS.has(name.toLowerCase()) || /^\\d/.test(name);\n}\nfunction escapeName(name) {\n\treturn `_${name}`;\n}\nfunction escapeIfNeeded(name) {\n\treturn needsEscaping(name) ? escapeName(name) : name;\n}\nfunction toModelName(tableName) {\n\tlet name;\n\tif (hasSeparators(tableName)) name = snakeToPascalCase(tableName);\n\telse name = tableName.charAt(0).toUpperCase() + tableName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: tableName\n\t};\n\tif (name !== tableName) return {\n\t\tname,\n\t\tmap: tableName\n\t};\n\treturn { name };\n}\nfunction toFieldName(columnName) {\n\tlet name;\n\tif (hasSeparators(columnName)) name = snakeToCamelCase(columnName);\n\telse name = columnName.charAt(0).toLowerCase() + columnName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: columnName\n\t};\n\tif (name !== columnName) return {\n\t\tname,\n\t\tmap: columnName\n\t};\n\treturn { name };\n}\nfunction toEnumName(pgTypeName) {\n\tlet name;\n\tif (hasSeparators(pgTypeName)) name = snakeToPascalCase(pgTypeName);\n\telse name = pgTypeName.charAt(0).toUpperCase() + pgTypeName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: pgTypeName\n\t};\n\tif (name !== pgTypeName) return {\n\t\tname,\n\t\tmap: pgTypeName\n\t};\n\treturn { name };\n}\nconst VALID_IDENTIFIER_PATTERN = /^[A-Za-z_]\\w*$/;\n/**\n* PSL member name for a native-enum value. The value itself always prints\n* explicitly (`member = \"value\"`), so the returned name never needs a map:\n* a value that already is a valid, non-reserved identifier is kept verbatim\n* (case included); anything else is camelCased/escaped like a field name.\n*/\nfunction toEnumMemberName(value) {\n\tif (VALID_IDENTIFIER_PATTERN.test(value) && !needsEscaping(value)) return value;\n\treturn escapeIfNeeded(snakeToCamelCase(value));\n}\nfunction pluralize(word) {\n\treturn pluralizeLib.plural(word);\n}\nfunction deriveRelationFieldName(fkColumns, referencedTableName) {\n\tif (fkColumns.length === 1) {\n\t\tconst [col = referencedTableName] = fkColumns;\n\t\tconst stripped = col.replace(/_id$/i, \"\").replace(/Id$/, \"\");\n\t\tif (stripped.length > 0 && stripped !== col) return escapeIfNeeded(snakeToCamelCase(stripped));\n\t\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n\t}\n\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n}\nfunction deriveBackRelationFieldName(childModelName, isOneToOne) {\n\tconst base = childModelName.charAt(0).toLowerCase() + childModelName.slice(1);\n\treturn isOneToOne ? base : pluralize(base);\n}\n//#endregion\n//#region src/core/psl-contract-infer/raw-default-parser.ts\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\nconst NUMERIC_PATTERN = /^-?\\d+(\\.\\d+)?$/;\nconst JSON_CAST_SUFFIX = /::jsonb?$/i;\nconst STRING_LITERAL_PATTERN = /^'((?:[^']|'')*)'(?:::(?:\"[^\"]+\"|[\\w\\s]+)(?:\\(\\d+\\))?)?$/;\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\nfunction parseRawDefault(rawDefault, nativeType) {\n\tconst trimmed = rawDefault.trim();\n\tconst normalizedType = nativeType?.toLowerCase();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"autoincrement()\"\n\t};\n\tconst canonicalTimestamp = canonicalizeTimestampDefault(trimmed);\n\tif (canonicalTimestamp) return {\n\t\tkind: \"function\",\n\t\texpression: canonicalTimestamp\n\t};\n\tif (UUID_PATTERN.test(trimmed) || UUID_OSSP_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: null\n\t};\n\tif (TRUE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: true\n\t};\n\tif (FALSE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: false\n\t};\n\tif (NUMERIC_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: Number(trimmed)\n\t};\n\tconst stringMatch = trimmed.match(STRING_LITERAL_PATTERN);\n\tif (stringMatch?.[1] !== void 0) {\n\t\tconst unescaped = stringMatch[1].replace(/''/g, \"'\");\n\t\tif (normalizedType === \"json\" || normalizedType === \"jsonb\") {\n\t\t\tif (JSON_CAST_SUFFIX.test(trimmed)) return {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: trimmed\n\t\t\t};\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"literal\",\n\t\t\t\t\tvalue: JSON.parse(unescaped)\n\t\t\t\t};\n\t\t\t} catch {}\n\t\t}\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: unescaped\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n}\n//#endregion\n//#region src/core/psl-contract-infer/relation-inference.ts\nconst DEFAULT_ON_DELETE = \"noAction\";\nconst DEFAULT_ON_UPDATE = \"noAction\";\nconst REFERENTIAL_ACTION_PSL = {\n\tnoAction: \"NoAction\",\n\trestrict: \"Restrict\",\n\tcascade: \"Cascade\",\n\tsetNull: \"SetNull\",\n\tsetDefault: \"SetDefault\"\n};\nfunction inferRelations(tables, modelNameMap) {\n\tconst relationsByTable = /* @__PURE__ */ new Map();\n\tconst fkCountByPair = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst pairKey = `${table.name}→${fk.referencedTable}`;\n\t\tfkCountByPair.set(pairKey, (fkCountByPair.get(pairKey) ?? 0) + 1);\n\t}\n\tconst usedFieldNames = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) {\n\t\tconst names = /* @__PURE__ */ new Set();\n\t\tfor (const col of Object.values(table.columns)) names.add(col.name);\n\t\tusedFieldNames.set(table.name, names);\n\t}\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst childTableName = table.name;\n\t\tconst parentTableName = fk.referencedTable;\n\t\tconst childUsed = usedFieldNames.get(childTableName);\n\t\tconst childModelName = modelNameMap.get(childTableName) ?? childTableName;\n\t\tconst parentModelName = modelNameMap.get(parentTableName) ?? parentTableName;\n\t\tconst pairKey = `${childTableName}→${parentTableName}`;\n\t\tconst isSelfRelation = childTableName === parentTableName;\n\t\tconst needsRelationName = fkCountByPair.get(pairKey) > 1 || isSelfRelation;\n\t\tconst isOneToOne = detectOneToOne(fk, table);\n\t\tconst childRelFieldName = resolveUniqueFieldName(deriveRelationFieldName(fk.columns, parentTableName), childUsed, parentModelName);\n\t\tconst relationName = needsRelationName ? deriveRelationName(fk, childRelFieldName, parentModelName, isSelfRelation) : void 0;\n\t\taddRelationField(relationsByTable, childTableName, buildChildRelationField(childRelFieldName, parentModelName, fk, fk.columns.some((columnName) => table.columns[columnName]?.nullable ?? false), relationName, table));\n\t\tchildUsed.add(childRelFieldName);\n\t\tconst parentUsed = usedFieldNames.get(parentTableName) ?? /* @__PURE__ */ new Set();\n\t\tusedFieldNames.set(parentTableName, parentUsed);\n\t\tconst backRelFieldName = resolveUniqueFieldName(deriveBackRelationFieldName(childModelName, isOneToOne), parentUsed, childModelName);\n\t\taddRelationField(relationsByTable, parentTableName, {\n\t\t\tfieldName: backRelFieldName,\n\t\t\ttypeName: childModelName,\n\t\t\toptional: isOneToOne,\n\t\t\tlist: !isOneToOne,\n\t\t\trelationName\n\t\t});\n\t\tparentUsed.add(backRelFieldName);\n\t}\n\treturn { relationsByTable };\n}\nfunction detectOneToOne(fk, table) {\n\tconst fkCols = [...fk.columns].sort();\n\tif (table.primaryKey) {\n\t\tconst pkCols = [...table.primaryKey.columns].sort();\n\t\tif (pkCols.length === fkCols.length && pkCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const unique of table.uniques) {\n\t\tconst uniqueCols = [...unique.columns].sort();\n\t\tif (uniqueCols.length === fkCols.length && uniqueCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const index of table.indexes) {\n\t\tif (!index.unique || index.partial || index.columns === void 0) continue;\n\t\tconst indexCols = [...index.columns].sort();\n\t\tif (indexCols.length === fkCols.length && indexCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\treturn false;\n}\nfunction deriveRelationName(fk, childRelationFieldName, parentModelName, isSelfRelation) {\n\tif (fk.name) return fk.name;\n\tif (isSelfRelation) return `${childRelationFieldName.charAt(0).toUpperCase() + childRelationFieldName.slice(1)}${pluralize(parentModelName)}`;\n\treturn fk.columns.join(\"_\");\n}\n/**\n* Builds the child-side {@link RelationField} for a single foreign key:\n* `typeName` is the parent model name, `fields`/`references` are the FK's raw\n* columns, and `onDelete`/`onUpdate` are normalized to their PSL spelling.\n* Exported so a caller resolving a foreign key against a model outside\n* `tables` (e.g. a cross-space reference into another contract) can reuse the\n* same normalization instead of duplicating it.\n*\n* `hostTable` is the table the FK is declared on (i.e. `table`, not the\n* referenced parent) — its own indexes/uniques/primary key are what a\n* backing index for this FK would be. When none of them exactly match the\n* FK's source columns (in order), `index: false` is stamped so the emitted\n* `@relation` opts out of the framework's default derived backing-index\n* expectation, matching what `db verify` will find live. Passing the table\n* is optional so existing single-FK callers (e.g. cross-space resolution\n* before a host table reference is threaded through) can omit it and keep\n* the framework default.\n*/\nfunction buildChildRelationField(fieldName, parentModelName, fk, optional, relationName, hostTable) {\n\tconst onDelete = fk.onDelete && fk.onDelete !== DEFAULT_ON_DELETE ? fk.onDelete : void 0;\n\tconst onUpdate = fk.onUpdate && fk.onUpdate !== DEFAULT_ON_UPDATE ? fk.onUpdate : void 0;\n\tconst index = hostTable && !isBackedByColumnKeys(fk.columns, backingIndexColumnKeys({\n\t\tindexes: hostTable.indexes.filter((i) => i.where === void 0),\n\t\tuniques: hostTable.uniques,\n\t\tprimaryKey: hostTable.primaryKey\n\t})) ? false : void 0;\n\treturn {\n\t\tfieldName,\n\t\ttypeName: parentModelName,\n\t\treferencedTableName: fk.referencedTable,\n\t\toptional,\n\t\tlist: false,\n\t\trelationName,\n\t\tfkName: fk.name,\n\t\tfields: fk.columns,\n\t\treferences: fk.referencedColumns,\n\t\tonDelete: onDelete ? REFERENTIAL_ACTION_PSL[onDelete] : void 0,\n\t\tonUpdate: onUpdate ? REFERENTIAL_ACTION_PSL[onUpdate] : void 0,\n\t\tindex\n\t};\n}\nfunction resolveUniqueFieldName(desired, usedNames, fallbackSuffix) {\n\tif (!usedNames.has(desired)) return desired;\n\tconst withSuffix = `${desired}${fallbackSuffix}`;\n\tif (!usedNames.has(withSuffix)) return withSuffix;\n\tlet counter = 2;\n\twhile (usedNames.has(`${desired}${counter}`)) counter++;\n\treturn `${desired}${counter}`;\n}\nfunction addRelationField(map, tableName, field) {\n\tconst existing = map.get(tableName);\n\tif (existing) existing.push(field);\n\telse map.set(tableName, [field]);\n}\n//#endregion\nexport { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, mapDefault, parseRawDefault, pluralize, toEnumMemberName, toEnumName, toFieldName, toModelName };\n\n//# sourceMappingURL=psl-infer.mjs.map"],"mappings":";;;AAGA,MAAM,8BAA8B;CACnC,mBAAmB;CACnB,SAAS;AACV;AACA,SAAS,WAAW,eAAe,SAAS;CAC3C,QAAQ,cAAc,MAAtB;EACC,KAAK,WAAW,OAAO,EAAE,WAAW,YAAY,mBAAmB,cAAc,KAAK,EAAE,GAAG;EAC3F,KAAK,YAAY;GAChB,MAAM,YAAY,SAAS,qBAAqB,cAAc,eAAe,4BAA4B,cAAc,eAAe,SAAS,4BAA4B,cAAc,UAAU;GACnM,OAAO,YAAY,EAAE,UAAU,IAAI,EAAE,SAAS,mBAAmB,cAAc,WAAW,QAAQ,YAAY,GAAG,IAAI;EACtH;CACD;AACD;AACA,SAAS,mBAAmB,OAAO;CAClC,IAAI,UAAU,MAAM,OAAO;CAC3B,QAAQ,OAAO,OAAf;EACC,KAAK;EACL,KAAK,UAAU,OAAO,OAAO,KAAK;EAClC,KAAK,UAAU,OAAO,YAAY,KAAK;EACvC,SAAS,OAAO,YAAY,KAAK,UAAU,KAAK,CAAC;CAClD;AACD;AACA,SAAS,YAAY,KAAK;CACzB,OAAO,IAAI,aAAa,GAAG,EAAE;AAC9B;AACA,SAAS,aAAa,KAAK;CAC1B,OAAO,KAAK,UAAU,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE;AACvC;AAGA,MAAM,qCAAqC,IAAI,IAAI;CAClD;CACA;CACA;CACA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AAC,KAAK,CAAC;AAChC"}
1
+ {"version":3,"file":"psl-infer-Z4wA2xpx.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.mjs"],"sourcesContent":["import pluralizeLib from \"pluralize\";\nimport { backingIndexColumnKeys, isBackedByColumnKeys } from \"@internal/sql-contract/foreign-key-materialization\";\n//#region src/core/psl-contract-infer/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\nfunction mapDefault(columnDefault, options) {\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return { attribute: `@default(${formatLiteralValue(columnDefault.value)})` };\n\t\tcase \"function\": {\n\t\t\tconst attribute = options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? options?.fallbackFunctionAttribute?.(columnDefault.expression);\n\t\t\treturn attribute ? { attribute } : { comment: `// Raw default: ${columnDefault.expression.replace(/[\\r\\n]+/g, \" \")}` };\n\t\t}\n\t}\n}\nfunction formatLiteralValue(value) {\n\tif (value === null) return \"null\";\n\tswitch (typeof value) {\n\t\tcase \"boolean\":\n\t\tcase \"number\": return String(value);\n\t\tcase \"string\": return quoteString(value);\n\t\tdefault: return quoteString(JSON.stringify(value));\n\t}\n}\nfunction quoteString(str) {\n\treturn `\"${escapeString(str)}\"`;\n}\nfunction escapeString(str) {\n\treturn JSON.stringify(str).slice(1, -1);\n}\n//#endregion\n//#region src/core/psl-contract-infer/name-transforms.ts\nconst PSL_RESERVED_WORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"enum\",\n\t\"types\",\n\t\"type\",\n\t\"generator\",\n\t\"datasource\"\n]);\nconst IDENTIFIER_PART_PATTERN = /[A-Za-z0-9]+/g;\nfunction hasSeparators(input) {\n\treturn /[^A-Za-z0-9]/.test(input);\n}\nfunction extractIdentifierParts(input) {\n\treturn input.match(IDENTIFIER_PART_PATTERN) ?? [];\n}\nfunction createSyntheticIdentifier(input) {\n\tlet hash = 2166136261;\n\tfor (const char of input) {\n\t\thash ^= char.codePointAt(0) ?? 0;\n\t\thash = Math.imul(hash, 16777619);\n\t}\n\treturn `x${(hash >>> 0).toString(16)}`;\n}\nfunction sanitizeIdentifierCharacters(input) {\n\tconst sanitized = input.replace(/[^\\w]/g, \"\");\n\treturn sanitized.length > 0 ? sanitized : createSyntheticIdentifier(input);\n}\nfunction capitalize(word) {\n\treturn word.charAt(0).toUpperCase() + word.slice(1);\n}\nfunction snakeToPascalCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return capitalize(sanitizeIdentifierCharacters(input));\n\treturn parts.map(capitalize).join(\"\");\n}\nfunction snakeToCamelCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return sanitizeIdentifierCharacters(input);\n\tconst [firstPart = input, ...rest] = parts;\n\treturn firstPart.charAt(0).toLowerCase() + firstPart.slice(1) + rest.map(capitalize).join(\"\");\n}\nfunction needsEscaping(name) {\n\treturn PSL_RESERVED_WORDS.has(name.toLowerCase()) || /^\\d/.test(name);\n}\nfunction escapeName(name) {\n\treturn `_${name}`;\n}\nfunction escapeIfNeeded(name) {\n\treturn needsEscaping(name) ? escapeName(name) : name;\n}\nfunction toModelName(tableName) {\n\tlet name;\n\tif (hasSeparators(tableName)) name = snakeToPascalCase(tableName);\n\telse name = tableName.charAt(0).toUpperCase() + tableName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: tableName\n\t};\n\tif (name !== tableName) return {\n\t\tname,\n\t\tmap: tableName\n\t};\n\treturn { name };\n}\nfunction toFieldName(columnName) {\n\tlet name;\n\tif (hasSeparators(columnName)) name = snakeToCamelCase(columnName);\n\telse name = columnName.charAt(0).toLowerCase() + columnName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: columnName\n\t};\n\tif (name !== columnName) return {\n\t\tname,\n\t\tmap: columnName\n\t};\n\treturn { name };\n}\nfunction toEnumName(pgTypeName) {\n\tlet name;\n\tif (hasSeparators(pgTypeName)) name = snakeToPascalCase(pgTypeName);\n\telse name = pgTypeName.charAt(0).toUpperCase() + pgTypeName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: pgTypeName\n\t};\n\tif (name !== pgTypeName) return {\n\t\tname,\n\t\tmap: pgTypeName\n\t};\n\treturn { name };\n}\nconst VALID_IDENTIFIER_PATTERN = /^[A-Za-z_]\\w*$/;\n/**\n* PSL member name for a native-enum value. The value itself always prints\n* explicitly (`member = \"value\"`), so the returned name never needs a map:\n* a value that already is a valid, non-reserved identifier is kept verbatim\n* (case included); anything else is camelCased/escaped like a field name.\n*/\nfunction toEnumMemberName(value) {\n\tif (VALID_IDENTIFIER_PATTERN.test(value) && !needsEscaping(value)) return value;\n\treturn escapeIfNeeded(snakeToCamelCase(value));\n}\nfunction pluralize(word) {\n\treturn pluralizeLib.plural(word);\n}\nfunction deriveRelationFieldName(fkColumns, referencedTableName) {\n\tif (fkColumns.length === 1) {\n\t\tconst [col = referencedTableName] = fkColumns;\n\t\tconst stripped = col.replace(/_id$/i, \"\").replace(/Id$/, \"\");\n\t\tif (stripped.length > 0 && stripped !== col) return escapeIfNeeded(snakeToCamelCase(stripped));\n\t\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n\t}\n\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n}\nfunction deriveBackRelationFieldName(childModelName, isOneToOne) {\n\tconst base = childModelName.charAt(0).toLowerCase() + childModelName.slice(1);\n\treturn isOneToOne ? base : pluralize(base);\n}\n//#endregion\n//#region src/core/psl-contract-infer/raw-default-parser.ts\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\nconst NUMERIC_PATTERN = /^-?\\d+(\\.\\d+)?$/;\nconst JSON_CAST_SUFFIX = /::jsonb?$/i;\nconst STRING_LITERAL_PATTERN = /^'((?:[^']|'')*)'(?:::(?:\"[^\"]+\"|[\\w\\s]+)(?:\\(\\d+\\))?)?$/;\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\nfunction parseRawDefault(rawDefault, nativeType) {\n\tconst trimmed = rawDefault.trim();\n\tconst normalizedType = nativeType?.toLowerCase();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"autoincrement()\"\n\t};\n\tconst canonicalTimestamp = canonicalizeTimestampDefault(trimmed);\n\tif (canonicalTimestamp) return {\n\t\tkind: \"function\",\n\t\texpression: canonicalTimestamp\n\t};\n\tif (UUID_PATTERN.test(trimmed) || UUID_OSSP_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: null\n\t};\n\tif (TRUE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: true\n\t};\n\tif (FALSE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: false\n\t};\n\tif (NUMERIC_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: Number(trimmed)\n\t};\n\tconst stringMatch = trimmed.match(STRING_LITERAL_PATTERN);\n\tif (stringMatch?.[1] !== void 0) {\n\t\tconst unescaped = stringMatch[1].replace(/''/g, \"'\");\n\t\tif (normalizedType === \"json\" || normalizedType === \"jsonb\") {\n\t\t\tif (JSON_CAST_SUFFIX.test(trimmed)) return {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: trimmed\n\t\t\t};\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"literal\",\n\t\t\t\t\tvalue: JSON.parse(unescaped)\n\t\t\t\t};\n\t\t\t} catch {}\n\t\t}\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: unescaped\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n}\n//#endregion\n//#region src/core/psl-contract-infer/relation-inference.ts\nconst DEFAULT_ON_DELETE = \"noAction\";\nconst DEFAULT_ON_UPDATE = \"noAction\";\nconst REFERENTIAL_ACTION_PSL = {\n\tnoAction: \"NoAction\",\n\trestrict: \"Restrict\",\n\tcascade: \"Cascade\",\n\tsetNull: \"SetNull\",\n\tsetDefault: \"SetDefault\"\n};\nfunction inferRelations(tables, modelNameMap) {\n\tconst relationsByTable = /* @__PURE__ */ new Map();\n\tconst fkCountByPair = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst pairKey = `${table.name}→${fk.referencedTable}`;\n\t\tfkCountByPair.set(pairKey, (fkCountByPair.get(pairKey) ?? 0) + 1);\n\t}\n\tconst usedFieldNames = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) {\n\t\tconst names = /* @__PURE__ */ new Set();\n\t\tfor (const col of Object.values(table.columns)) names.add(col.name);\n\t\tusedFieldNames.set(table.name, names);\n\t}\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst childTableName = table.name;\n\t\tconst parentTableName = fk.referencedTable;\n\t\tconst childUsed = usedFieldNames.get(childTableName);\n\t\tconst childModelName = modelNameMap.get(childTableName) ?? childTableName;\n\t\tconst parentModelName = modelNameMap.get(parentTableName) ?? parentTableName;\n\t\tconst pairKey = `${childTableName}→${parentTableName}`;\n\t\tconst isSelfRelation = childTableName === parentTableName;\n\t\tconst needsRelationName = fkCountByPair.get(pairKey) > 1 || isSelfRelation;\n\t\tconst isOneToOne = detectOneToOne(fk, table);\n\t\tconst childRelFieldName = resolveUniqueFieldName(deriveRelationFieldName(fk.columns, parentTableName), childUsed, parentModelName);\n\t\tconst relationName = needsRelationName ? deriveRelationName(fk, childRelFieldName, parentModelName, isSelfRelation) : void 0;\n\t\taddRelationField(relationsByTable, childTableName, buildChildRelationField(childRelFieldName, parentModelName, fk, fk.columns.some((columnName) => table.columns[columnName]?.nullable ?? false), relationName, table));\n\t\tchildUsed.add(childRelFieldName);\n\t\tconst parentUsed = usedFieldNames.get(parentTableName) ?? /* @__PURE__ */ new Set();\n\t\tusedFieldNames.set(parentTableName, parentUsed);\n\t\tconst backRelFieldName = resolveUniqueFieldName(deriveBackRelationFieldName(childModelName, isOneToOne), parentUsed, childModelName);\n\t\taddRelationField(relationsByTable, parentTableName, {\n\t\t\tfieldName: backRelFieldName,\n\t\t\ttypeName: childModelName,\n\t\t\toptional: isOneToOne,\n\t\t\tlist: !isOneToOne,\n\t\t\trelationName\n\t\t});\n\t\tparentUsed.add(backRelFieldName);\n\t}\n\treturn { relationsByTable };\n}\nfunction detectOneToOne(fk, table) {\n\tconst fkCols = [...fk.columns].sort();\n\tif (table.primaryKey) {\n\t\tconst pkCols = [...table.primaryKey.columns].sort();\n\t\tif (pkCols.length === fkCols.length && pkCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const unique of table.uniques) {\n\t\tconst uniqueCols = [...unique.columns].sort();\n\t\tif (uniqueCols.length === fkCols.length && uniqueCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const index of table.indexes) {\n\t\tif (!index.unique || index.partial || index.columns === void 0) continue;\n\t\tconst indexCols = [...index.columns].sort();\n\t\tif (indexCols.length === fkCols.length && indexCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\treturn false;\n}\nfunction deriveRelationName(fk, childRelationFieldName, parentModelName, isSelfRelation) {\n\tif (fk.name) return fk.name;\n\tif (isSelfRelation) return `${childRelationFieldName.charAt(0).toUpperCase() + childRelationFieldName.slice(1)}${pluralize(parentModelName)}`;\n\treturn fk.columns.join(\"_\");\n}\n/**\n* Builds the child-side {@link RelationField} for a single foreign key:\n* `typeName` is the parent model name, `fields`/`references` are the FK's raw\n* columns, and `onDelete`/`onUpdate` are normalized to their PSL spelling.\n* Exported so a caller resolving a foreign key against a model outside\n* `tables` (e.g. a cross-space reference into another contract) can reuse the\n* same normalization instead of duplicating it.\n*\n* `hostTable` is the table the FK is declared on (i.e. `table`, not the\n* referenced parent) — its own indexes/uniques/primary key are what a\n* backing index for this FK would be. When none of them exactly match the\n* FK's source columns (in order), `index: false` is stamped so the emitted\n* `@relation` opts out of the framework's default derived backing-index\n* expectation, matching what `db verify` will find live. Passing the table\n* is optional so existing single-FK callers (e.g. cross-space resolution\n* before a host table reference is threaded through) can omit it and keep\n* the framework default.\n*/\nfunction buildChildRelationField(fieldName, parentModelName, fk, optional, relationName, hostTable) {\n\tconst onDelete = fk.onDelete && fk.onDelete !== DEFAULT_ON_DELETE ? fk.onDelete : void 0;\n\tconst onUpdate = fk.onUpdate && fk.onUpdate !== DEFAULT_ON_UPDATE ? fk.onUpdate : void 0;\n\tconst index = hostTable && !isBackedByColumnKeys(fk.columns, backingIndexColumnKeys({\n\t\tindexes: hostTable.indexes.filter((i) => i.where === void 0),\n\t\tuniques: hostTable.uniques,\n\t\tprimaryKey: hostTable.primaryKey\n\t})) ? false : void 0;\n\treturn {\n\t\tfieldName,\n\t\ttypeName: parentModelName,\n\t\treferencedTableName: fk.referencedTable,\n\t\toptional,\n\t\tlist: false,\n\t\trelationName,\n\t\tfkName: fk.name,\n\t\tfields: fk.columns,\n\t\treferences: fk.referencedColumns,\n\t\tonDelete: onDelete ? REFERENTIAL_ACTION_PSL[onDelete] : void 0,\n\t\tonUpdate: onUpdate ? REFERENTIAL_ACTION_PSL[onUpdate] : void 0,\n\t\tindex\n\t};\n}\nfunction resolveUniqueFieldName(desired, usedNames, fallbackSuffix) {\n\tif (!usedNames.has(desired)) return desired;\n\tconst withSuffix = `${desired}${fallbackSuffix}`;\n\tif (!usedNames.has(withSuffix)) return withSuffix;\n\tlet counter = 2;\n\twhile (usedNames.has(`${desired}${counter}`)) counter++;\n\treturn `${desired}${counter}`;\n}\nfunction addRelationField(map, tableName, field) {\n\tconst existing = map.get(tableName);\n\tif (existing) existing.push(field);\n\telse map.set(tableName, [field]);\n}\n//#endregion\nexport { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, mapDefault, parseRawDefault, pluralize, toEnumMemberName, toEnumName, toFieldName, toModelName };\n\n//# sourceMappingURL=psl-infer.mjs.map"],"mappings":";;;AAGA,MAAM,8BAA8B;CACnC,mBAAmB;CACnB,SAAS;AACV;AACA,SAAS,WAAW,eAAe,SAAS;CAC3C,QAAQ,cAAc,MAAtB;EACC,KAAK,WAAW,OAAO,EAAE,WAAW,YAAY,mBAAmB,cAAc,K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ACnB,YAAY,UAAU;CACvB,CAAC,CAAC,IAAI,QAAQ,KAAK;CACnB,OAAO;EACN;EACA,UAAU;EACV,qBAAqB,GAAG;EACxB;EACA,MAAM;EACN;EACA,QAAQ,GAAG;EACX,QAAQ,GAAG;EACX,YAAY,GAAG;EACf,UAAU,WAAW,uBAAuB,YAAY,KAAK;EAC7D,UAAU,WAAW,uBAAuB,YAAY,KAAK;EAC7D;CACD;AACD;AACA,SAAS,uBAAuB,SAAS,WAAW,gBAAgB;CACnE,IAAI,CAAC,UAAU,IAAI,OAAO,GAAG,OAAO;CACpC,MAAM,aAAa,GAAG,UAAU;CAChC,IAAI,CAAC,UAAU,IAAI,UAAU,GAAG,OAAO;CACvC,IAAI,UAAU;CACd,OAAO,UAAU,IAAI,GAAG,UAAU,SAAS,GAAG;CAC9C,OAAO,GAAG,UAAU;AACrB;AACA,SAAS,iBAAiB,KAAK,WAAW,OAAO;CAChD,MAAM,WAAW,IAAI,IAAI,SAAS;CAClC,IAAI,UAAU,SAAS,KAAK,KAAK;MAC5B,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC;AAChC"}
@@ -1,5 +1,5 @@
1
- import { d as SqlForeignKeyIR, y as SqlTableIR } from "./types-C1F8xk0m-7rMwgIR6.mjs";
2
- import "./types-C-KBovJY.mjs";
1
+ import { d as SqlForeignKeyIR, y as SqlTableIR } from "./types-DtDXwS0i-BjB1HLTY.mjs";
2
+ import "./types-DEBm1lFa.mjs";
3
3
  import { ColumnDefault } from "@prisma/orm-framework/contract/types";
4
4
  //#region ../../../2-sql/9-family/dist/psl-infer.d.mts
5
5
  //#region src/core/psl-contract-infer/default-mapping.d.ts
@@ -116,4 +116,4 @@ declare function inferRelations(tables: Record<string, SqlTableIR>, modelNameMap
116
116
  declare function buildChildRelationField(fieldName: string, parentModelName: string, fk: SqlForeignKeyIR, optional: boolean, relationName?: string, hostTable?: SqlTableIR): RelationField;
117
117
  //#endregion
118
118
  export { toEnumMemberName as _, PslPrinterOptions as a, toModelName as b, PslTypeResolution as c, deriveBackRelationFieldName as d, deriveRelationFieldName as f, pluralize as g, parseRawDefault as h, InferredRelations as i, RelationField as l, mapDefault as m, DefaultMappingResult as n, PslTypeMap as o, inferRelations as p, EnumInfo as r, PslTypeReference as s, DefaultMappingOptions as t, buildChildRelationField as u, toEnumName as v, toFieldName as y };
119
- //# sourceMappingURL=psl-infer-Dp_hwubv.d.mts.map
119
+ //# sourceMappingURL=psl-infer-zSNyTUPT.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"psl-infer-Dp_hwubv.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.d.mts"],"mappings":";;;;;UAGU;WACC,qBAAqB,SAAS;WAC9B,8BAA8B;;KAEpC;WACM;;WAEA;;iBAEM,WAAW,eAAe,eAAe,UAAU,wBAAwB;;;KAGvF;WACM;WACA;;iBAEM,YAAY,oBAAoB;iBAChC,YAAY,qBAAqB;iBACjC,WAAW,qBAAqB;;;;;;;iBAOhC,iBAAiB;iBACjB,UAAU;iBACV,wBAAwB,8BAA8B;iBACtD,4BAA4B,wBAAwB;;;KAGhE;WACM;WACA;;KAEN;WACM,SAAS;WACT;WACA,aAAa;;WAEb;WACA;;UAED;EACR,QAAQ,oBAAoB,cAAc,0BAA0B;;UAE5D;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;;;;iBAIM,gBAAgB,oBAAoB,sBAAsB;;;KAGtE;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-zSNyTUPT.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.d.mts"],"mappings":";;;;;UAGU;WACC,qBAAqB,SAAS;WAC9B,8BAA8B;;KAEpC;WACM;;WAEA;;iBAEM,WAAW,eAAe,eAAe,UAAU,wBAAwB;;;KAGvF;WACM;WACA;;iBAEM,YAAY,oBAAoB;iBAChC,YAAY,qBAAqB;iBACjC,WAAW,qBAAqB;;;;;;;iBAOhC,iBAAiB;iBACjB,UAAU;iBACV,wBAAwB,8BAA8B;iBACtD,4BAA4B,wBAAwB;;;KAGhE;WACM;WACA;;KAEN;WACM,SAAS;WACT;WACA,aAAa;;WAEb;WACA;;UAED;EACR,QAAQ,oBAAoB,cAAc,0BAA0B;;UAE5D;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;;;;iBAIM,gBAAgB,oBAAoB,sBAAsB;;;KAGtE;WACM,kBAAkB,6BAA6B;;iBAEzC,eAAe,QAAQ,eAAe,aAAa,cAAc,8BAA8B;;;;;;;;;;;;;;;;;;;iBAmB/F,wBAAwB,mBAAmB,yBAAyB,IAAI,iBAAiB,mBAAmB,uBAAuB,YAAY,aAAa"}
@@ -0,0 +1 @@
1
+ import "./query-lane-context-DjyAyYht-BWgx-nsP.mjs";
@@ -1,7 +1,7 @@
1
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { a as SqlOperationRegistry } from "./index-avHHFCFT.mjs";
4
- import { O as ContractCodecRegistry, s as AnyExpression } from "./types-BwePDa3m-CrVQ_8YI.mjs";
1
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { a as SqlOperationRegistry } from "./index-CwtBEMZr.mjs";
4
+ import { O as ContractCodecRegistry, s as AnyExpression } from "./types-BwePDa3m-CMy7CB9N.mjs";
5
5
  import { Contract } from "@prisma/orm-framework/contract/types";
6
6
  import { AggregateDescriptor } from "@prisma/orm-framework/components/components";
7
7
  import { CodecDescriptor, CodecRef } from "@prisma/orm-framework/components/codec";
@@ -147,4 +147,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
147
147
  }
148
148
  //#endregion
149
149
  export { MutationDefaultsOptions as a, SqlAggregateDescriptorRegistry as c, TypeHelperRegistry as d, isSqlAggregateDescriptor as f, MutationDefaultsOp as i, SqlAggregateLowering as l, CodecDescriptorRegistry as n, ResolvedSqlAggregate as o, ExecutionContext as r, SqlAggregateDescriptor as s, AppliedMutationDefault as t, SqlAggregateLoweringContext as u };
150
- //# sourceMappingURL=query-lane-context-DjyAyYht-DdovdGjc.d.mts.map
150
+ //# sourceMappingURL=query-lane-context-DjyAyYht-BWgx-nsP.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-lane-context-DjyAyYht-DdovdGjc.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-DjyAyYht.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;KAMjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;UAOnC;WACC;WACA,QAAQ;WACR;WACA,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
1
+ {"version":3,"file":"query-lane-context-DjyAyYht-BWgx-nsP.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-DjyAyYht.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;KAMjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;UAOnC;WACC;WACA,QAAQ;WACR;WACA,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
@@ -1,12 +1,12 @@
1
- import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as queryAstKinds, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as frozenCodecRef, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as isQueryAst, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, V as ExprVisitor, Vt as whereExprKinds, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isWhereExpr } from "./types-BwePDa3m-CrVQ_8YI.mjs";
2
- import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-DzkUGplM.mjs";
3
- import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-UfF480P2.mjs";
4
- import { a as Expression, c as RawSqlTag, d as TraitExpression, f as buildOperation, g as toExpr, h as param, i as CodecValue, l as ScalarListExpression, m as createRawSql, n as CodecExpression, o as RawCodecInferer, p as codecOf, r as CodecTypesBase, s as RawSqlBuilder, t as BuildOperationSpec, u as ScopeField } from "./expression-CBHseNtv.mjs";
5
- import { t as SqlExecutionPlan } from "./sql-execution-plan-Da_d82pz-g3khvnbo.mjs";
6
- import { n as planFromAst, t as SqlQueryPlan } from "./plan-Bmp5R9sq-mVFXvLM7.mjs";
7
- import "./plan-Cl6aCuij.mjs";
8
- import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
9
- import "./query-lane-context-BhDJZFMh.mjs";
10
- import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-eb7YwdD4-CiyaANOv.mjs";
11
- import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, 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 RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-dD8JJfeD-CS9uMlzW.mjs";
1
+ import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as queryAstKinds, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as frozenCodecRef, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as isQueryAst, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, V as ExprVisitor, Vt as whereExprKinds, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isWhereExpr } from "./types-BwePDa3m-CMy7CB9N.mjs";
2
+ import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-1i7p99aC.mjs";
3
+ import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-DW-oFG2N.mjs";
4
+ import { a as Expression, c as RawSqlTag, d as TraitExpression, f as buildOperation, g as toExpr, h as param, i as CodecValue, l as ScalarListExpression, m as createRawSql, n as CodecExpression, o as RawCodecInferer, p as codecOf, r as CodecTypesBase, s as RawSqlBuilder, t as BuildOperationSpec, u as ScopeField } from "./expression-BUmcEWHx.mjs";
5
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-Da_d82pz-8mU4Fvvo.mjs";
6
+ import { n as planFromAst, t as SqlQueryPlan } from "./plan-Bmp5R9sq-BYkfwppR.mjs";
7
+ import "./plan-Ba8TRfem.mjs";
8
+ import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DjyAyYht-BWgx-nsP.mjs";
9
+ import "./query-lane-context-CZEGLV1r.mjs";
10
+ import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-eb7YwdD4-DPIUcY9j.mjs";
11
+ import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, 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 RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-dD8JJfeD-D8LDAPQW.mjs";
12
12
  export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, 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, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, 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, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, ParamRef, type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawCodecInferer, RawExpr, RawFactory, RawFunctionOptions, RawSqlBuilder, RawSqlExpr, RawSqlLiteral, RawSqlTag, RawTemplateFactory, RawTemplateOptions, ResolvedSqlAggregate, type RuntimeScope, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_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, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, buildOperation, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, frozenCodecRef, isDdlNode, isQueryAst, isWhereExpr, param, planFromAst, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
@@ -1,4 +1,4 @@
1
- import { c as SqlAggregateDescriptorRegistry, f as isSqlAggregateDescriptor, l as SqlAggregateLowering, n as CodecDescriptorRegistry, s as SqlAggregateDescriptor, u as SqlAggregateLoweringContext } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
1
+ import { c as SqlAggregateDescriptorRegistry, f as isSqlAggregateDescriptor, l as SqlAggregateLowering, n as CodecDescriptorRegistry, s as SqlAggregateDescriptor, u as SqlAggregateLoweringContext } from "./query-lane-context-DjyAyYht-BWgx-nsP.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,4 +1,4 @@
1
- import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as queryAstKinds, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as frozenCodecRef, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as isQueryAst, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, V as ExprVisitor, Vt as whereExprKinds, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isWhereExpr } from "./types-BwePDa3m-CrVQ_8YI.mjs";
2
- import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-DzkUGplM.mjs";
3
- import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-UfF480P2.mjs";
1
+ import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as queryAstKinds, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as frozenCodecRef, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as isQueryAst, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, V as ExprVisitor, Vt as whereExprKinds, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isWhereExpr } from "./types-BwePDa3m-CMy7CB9N.mjs";
2
+ import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-1i7p99aC.mjs";
3
+ import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-DW-oFG2N.mjs";
4
4
  export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, 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, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, 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, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, MarkerReadResult, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawExpr, RawSqlExpr, RawSqlLiteral, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_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, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, collectOrderedParamRefs, compact, frozenCodecRef, isDdlNode, isQueryAst, isWhereExpr, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };
@@ -1,7 +1,7 @@
1
- import { c as SqlStorage } from "./sql-storage-aEsH6Fnv-_bWH3uY3.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { o as AnyCodecDescriptor$1 } from "./types-BwePDa3m-CrVQ_8YI.mjs";
4
- import { n as CodecDescriptorRegistry } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
1
+ import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { o as AnyCodecDescriptor$1 } from "./types-BwePDa3m-CMy7CB9N.mjs";
4
+ import { n as CodecDescriptorRegistry } from "./query-lane-context-DjyAyYht-BWgx-nsP.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-BK_ZTP-3.mjs";
1
+ import { n as codecRefForStorageColumn, t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-BQPj9q8O.mjs";
2
2
  export { buildCodecDescriptorRegistry, codecRefForStorageColumn };
@@ -1,7 +1,7 @@
1
1
  import { a as ReferentialAction } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
2
- import "./types-BL_h3id0.mjs";
3
- import { $ as JoinAst, D as ColumnRef, Nt as UpdateAst, T as CodecRef$1, X as InsertAst, bt as ProjectionItem, c as AnyFromSource, gt as OrderByItem, jt as TableSource, s as AnyExpression, wt as SelectAst } from "./types-BwePDa3m-CrVQ_8YI.mjs";
4
- import { d as LiteralColumnDefault, f as PrimaryKeyConstraint, l as ForeignKeyConstraint, n as CheckExpressionConstraint, p as UniqueConstraint, r as DdlColumn, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-DzkUGplM.mjs";
2
+ import "./types-DuriYH5B.mjs";
3
+ import { $ as JoinAst, D as ColumnRef, Nt as UpdateAst, T as CodecRef$1, X as InsertAst, bt as ProjectionItem, c as AnyFromSource, gt as OrderByItem, jt as TableSource, s as AnyExpression, wt as SelectAst } from "./types-BwePDa3m-CMy7CB9N.mjs";
4
+ import { d as LiteralColumnDefault, f as PrimaryKeyConstraint, l as ForeignKeyConstraint, n as CheckExpressionConstraint, p as UniqueConstraint, r as DdlColumn, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-h_3_pXmq-1i7p99aC.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 { a as Expression, c as RawSqlTag, d as TraitExpression, f as buildOperation, g as toExpr, h as param, i as CodecValue, l as ScalarListExpression, m as createRawSql, n as CodecExpression, o as RawCodecInferer, p as codecOf, r as CodecTypesBase, s as RawSqlBuilder, t as BuildOperationSpec, u as ScopeField } from "./expression-CBHseNtv.mjs";
1
+ import { a as Expression, c as RawSqlTag, d as TraitExpression, f as buildOperation, g as toExpr, h as param, i as CodecValue, l as ScalarListExpression, m as createRawSql, n as CodecExpression, o as RawCodecInferer, p as codecOf, r as CodecTypesBase, s as RawSqlBuilder, t as BuildOperationSpec, u as ScopeField } from "./expression-BUmcEWHx.mjs";
2
2
  export { BuildOperationSpec, CodecExpression, CodecTypesBase, CodecValue, Expression, RawCodecInferer, RawSqlBuilder, RawSqlTag, ScalarListExpression, ScopeField, TraitExpression, buildOperation, codecOf, createRawSql, 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-eb7YwdD4-CiyaANOv.mjs";
2
- import "./middleware-B8QoWWIx.mjs";
1
+ import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-eb7YwdD4-DPIUcY9j.mjs";
2
+ import "./middleware-BDVd5Hbn.mjs";
3
3
  export { type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, type SqlParamRefMutator, type SqlParamRefMutatorInternal, createSqlParamRefMutator };
@@ -1,4 +1,4 @@
1
- import { t as SqlExecutionPlan } from "./sql-execution-plan-Da_d82pz-g3khvnbo.mjs";
2
- import { n as planFromAst, t as SqlQueryPlan } from "./plan-Bmp5R9sq-mVFXvLM7.mjs";
3
- import "./plan-Cl6aCuij.mjs";
1
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-Da_d82pz-8mU4Fvvo.mjs";
2
+ import { n as planFromAst, t as SqlQueryPlan } from "./plan-Bmp5R9sq-BYkfwppR.mjs";
3
+ import "./plan-Ba8TRfem.mjs";
4
4
  export { type SqlExecutionPlan, SqlQueryPlan, planFromAst };
@@ -1,3 +1,3 @@
1
- import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DjyAyYht-DdovdGjc.mjs";
2
- import "./query-lane-context-BhDJZFMh.mjs";
1
+ import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DjyAyYht-BWgx-nsP.mjs";
2
+ import "./query-lane-context-CZEGLV1r.mjs";
3
3
  export { AppliedMutationDefault, CodecDescriptorRegistry, ExecutionContext, MutationDefaultsOp, MutationDefaultsOptions, ResolvedSqlAggregate, SqlAggregateDescriptorRegistry, TypeHelperRegistry };
@@ -1,3 +1,3 @@
1
- import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, 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 RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-dD8JJfeD-CS9uMlzW.mjs";
2
- import "./types--gTlnnvl.mjs";
1
+ import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, 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 RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-dD8JJfeD-D8LDAPQW.mjs";
2
+ import "./types-KK31t3v0.mjs";
3
3
  export { BuildOptions, BuildParamsMap, CodecTypes, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, Expr, META, Meta, ModelDef, ModelMetadata, OperationTypeSignature, OperationTypes, OperationsForTypeId, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, type RuntimeScope, SqlBuilderOptions, type SqlOrmPlan, SqlPlan, TableDef, TableKey, TableMetadata, TablesOf };