@prisma/orm-family-sql 8.0.0-rc.2-dev.2 → 8.0.0-rc.20

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 (564) hide show
  1. package/README.md +2 -6
  2. package/dist/{aggregate-descriptor-registry-C7hel5O7.mjs → aggregate-descriptor-registry-ZrKjxwQe.mjs} +5 -5
  3. package/dist/aggregate-descriptor-registry-ZrKjxwQe.mjs.map +1 -0
  4. package/dist/ast-D0miQ1B6.mjs +372 -0
  5. package/dist/ast-D0miQ1B6.mjs.map +1 -0
  6. package/dist/ast-YEMe_B8z.d.mts +292 -0
  7. package/dist/ast-YEMe_B8z.d.mts.map +1 -0
  8. package/dist/attribute-specs-DA_RwQFB.d.mts +114 -0
  9. package/dist/attribute-specs-DA_RwQFB.d.mts.map +1 -0
  10. package/dist/{authored-check-naming-Hf9990DV.mjs → authored-check-naming-BHGJhjqn.mjs} +5 -5
  11. package/dist/authored-check-naming-BHGJhjqn.mjs.map +1 -0
  12. package/dist/{authored-check-naming-BWBe-PVE.d.mts → authored-check-naming-D-o196ry.d.mts} +3 -3
  13. package/dist/authored-check-naming-D-o196ry.d.mts.map +1 -0
  14. package/dist/authoring-entity-types-CgKIgWq5-pEdfjam5.d.mts +9 -0
  15. package/dist/authoring-entity-types-CgKIgWq5-pEdfjam5.d.mts.map +1 -0
  16. package/dist/builder.d.mts +4 -3
  17. package/dist/builder__runtime.d.mts +29 -31
  18. package/dist/builder__runtime.d.mts.map +1 -1
  19. package/dist/builder__runtime.mjs +261 -191
  20. package/dist/builder__runtime.mjs.map +1 -1
  21. package/dist/builder__types.d.mts +6 -3
  22. package/dist/{canonicalization-hooks-dmXkOR4a.mjs → canonicalization-hooks-Ce1v_TDl.mjs} +2 -2
  23. package/dist/canonicalization-hooks-Ce1v_TDl.mjs.map +1 -0
  24. package/dist/{canonicalization-hooks-CYnW_sGn.d.mts → canonicalization-hooks-DyapQ0my.d.mts} +2 -2
  25. package/dist/canonicalization-hooks-DyapQ0my.d.mts.map +1 -0
  26. package/dist/{check-constraint-B7qGu6rc-HvQjjX82.d.mts → check-constraint-B7qGu6rc-Bk2ezWXu.d.mts} +4 -4
  27. package/dist/check-constraint-B7qGu6rc-Bk2ezWXu.d.mts.map +1 -0
  28. package/dist/{codec-descriptor-registry-N0dhtKaH.mjs → codec-descriptor-registry-CiiFzMtb.mjs} +13 -40
  29. package/dist/codec-descriptor-registry-CiiFzMtb.mjs.map +1 -0
  30. package/dist/collection-methods-BB8YH69u.d.mts +1 -0
  31. package/dist/collection-methods-D2UnCS0S-DOy2qHYS.d.mts +77 -0
  32. package/dist/collection-methods-D2UnCS0S-DOy2qHYS.d.mts.map +1 -0
  33. package/dist/{config-types-D9fdKG3g.d.mts → config-types-C-1mIiJO.d.mts} +5 -5
  34. package/dist/config-types-C-1mIiJO.d.mts.map +1 -0
  35. package/dist/{config-types-gAm54C_v.mjs → config-types-DkEeq_qq.mjs} +10 -6
  36. package/dist/config-types-DkEeq_qq.mjs.map +1 -0
  37. package/dist/{contract-builder-D4a5dT7j.mjs → contract-builder-50lF0kz1.mjs} +431 -226
  38. package/dist/contract-builder-50lF0kz1.mjs.map +1 -0
  39. package/dist/contract-builder-C_Zi57iD.d.mts +1967 -0
  40. package/dist/contract-builder-C_Zi57iD.d.mts.map +1 -0
  41. package/dist/contract-emitter.d.mts +4 -7
  42. package/dist/contract-emitter.d.mts.map +1 -1
  43. package/dist/contract-emitter.mjs +1 -1
  44. package/dist/{contract-errors-BCN6RVI5-5IHBF_lg.mjs → contract-errors-BCN6RVI5-DoH6b_KZ.mjs} +2 -2
  45. package/dist/contract-errors-BCN6RVI5-DoH6b_KZ.mjs.map +1 -0
  46. package/dist/contract-prisma7__provider.d.mts +97 -0
  47. package/dist/contract-prisma7__provider.d.mts.map +1 -0
  48. package/dist/contract-prisma7__provider.mjs +2011 -0
  49. package/dist/contract-prisma7__provider.mjs.map +1 -0
  50. package/dist/contract-psl.d.mts +18 -29
  51. package/dist/contract-psl.d.mts.map +1 -1
  52. package/dist/contract-psl.mjs +1 -1
  53. package/dist/contract-psl__attribute-specs.d.mts +2 -0
  54. package/dist/contract-psl__attribute-specs.mjs +2 -0
  55. package/dist/contract-psl__default-table-name.d.mts +7 -0
  56. package/dist/contract-psl__default-table-name.d.mts.map +1 -0
  57. package/dist/contract-psl__default-table-name.mjs +2 -0
  58. package/dist/contract-psl__diagnostics.d.mts +12 -0
  59. package/dist/contract-psl__diagnostics.d.mts.map +1 -0
  60. package/dist/contract-psl__diagnostics.mjs +2 -0
  61. package/dist/contract-psl__map-names.d.mts +16 -0
  62. package/dist/contract-psl__map-names.d.mts.map +1 -0
  63. package/dist/contract-psl__map-names.mjs +21 -0
  64. package/dist/contract-psl__map-names.mjs.map +1 -0
  65. package/dist/contract-psl__provider.d.mts +3 -3
  66. package/dist/contract-psl__provider.d.mts.map +1 -1
  67. package/dist/contract-psl__provider.mjs +95 -46
  68. package/dist/contract-psl__provider.mjs.map +1 -1
  69. package/dist/contract-ts.d.mts +5 -5
  70. package/dist/contract-ts.mjs +5 -4
  71. package/dist/contract-ts__config-types.d.mts +1 -1
  72. package/dist/contract-ts__config-types.mjs +1 -1
  73. package/dist/contract-ts__contract-builder.d.mts +4 -4
  74. package/dist/contract-ts__contract-builder.mjs +4 -3
  75. package/dist/{contract-view-BMR5IWk4.mjs → contract-view-DqpzeYeE.mjs} +2 -2
  76. package/dist/contract-view-DqpzeYeE.mjs.map +1 -0
  77. package/dist/{contract-view-CPHxoAEX.d.mts → contract-view-DuB35or0.d.mts} +3 -3
  78. package/dist/contract-view-DuB35or0.d.mts.map +1 -0
  79. package/dist/contract.d.mts +30 -28
  80. package/dist/contract.mjs +23 -18
  81. package/dist/contract__authored-check-naming.d.mts +1 -1
  82. package/dist/contract__authored-check-naming.mjs +1 -1
  83. package/dist/contract__canonicalization-hooks.d.mts +1 -1
  84. package/dist/contract__canonicalization-hooks.mjs +1 -1
  85. package/dist/contract__contract-view.d.mts +1 -1
  86. package/dist/contract__contract-view.mjs +1 -1
  87. package/dist/contract__data-type-support.d.mts +2 -0
  88. package/dist/contract__data-type-support.mjs +2 -0
  89. package/dist/contract__data-type.d.mts +2 -0
  90. package/dist/contract__data-type.mjs +3 -0
  91. package/dist/contract__entity-handle-lowering-hook.d.mts +2 -2
  92. package/dist/contract__entity-handle-lowering-hook.mjs +2 -2
  93. package/dist/contract__entity-kinds.d.mts +1 -1
  94. package/dist/contract__entity-kinds.mjs +1 -1
  95. package/dist/contract__factories.d.mts +1 -1
  96. package/dist/contract__factories.mjs +1 -1
  97. package/dist/contract__foreign-key-materialization.d.mts +2 -2
  98. package/dist/contract__foreign-key-materialization.mjs +3 -2
  99. package/dist/contract__index-naming.d.mts +2 -2
  100. package/dist/contract__index-naming.mjs +2 -2
  101. package/dist/contract__index-type-validation.d.mts +2 -2
  102. package/dist/contract__index-type-validation.mjs +1 -1
  103. package/dist/contract__index-types.d.mts +3 -3
  104. package/dist/contract__index-types.mjs +2 -2
  105. package/dist/contract__referential-action-sql.d.mts +1 -1
  106. package/dist/contract__referential-action-sql.mjs +1 -1
  107. package/dist/contract__resolve-storage-table.d.mts +1 -1
  108. package/dist/contract__resolve-storage-table.mjs +1 -1
  109. package/dist/contract__sql-expression.d.mts +2 -0
  110. package/dist/contract__sql-expression.mjs +2 -0
  111. package/dist/contract__types.d.mts +12 -12
  112. package/dist/contract__types.mjs +4 -4
  113. package/dist/contract__validators.d.mts +2 -2
  114. package/dist/contract__validators.mjs +3 -3
  115. package/dist/contract__value-set-derivation-hook.d.mts +1 -1
  116. package/dist/contract__value-set-derivation-hook.mjs +1 -1
  117. package/dist/control-BK50zF6c.mjs +2721 -0
  118. package/dist/control-BK50zF6c.mjs.map +1 -0
  119. package/dist/control-ChAUdOOu.d.mts +1416 -0
  120. package/dist/control-ChAUdOOu.d.mts.map +1 -0
  121. package/dist/{control-adapter-C99J7aEF-B7eQd7vD.d.mts → control-adapter-Bn0uhplA-BzP2uPqJ.d.mts} +27 -44
  122. package/dist/control-adapter-Bn0uhplA-BzP2uPqJ.d.mts.map +1 -0
  123. package/dist/control-adapter-NZ2kKc4x.d.mts +13 -0
  124. package/dist/control-adapter-NZ2kKc4x.d.mts.map +1 -0
  125. package/dist/control-adapter-SlQkTEwT.mjs +16 -0
  126. package/dist/control-adapter-SlQkTEwT.mjs.map +1 -0
  127. package/dist/data-type-BFSpaotu.mjs +52 -0
  128. package/dist/data-type-BFSpaotu.mjs.map +1 -0
  129. package/dist/data-type-DJIvKQHf.d.mts +158 -0
  130. package/dist/data-type-DJIvKQHf.d.mts.map +1 -0
  131. package/dist/data-type-support-BhSoPUFj.mjs +9 -0
  132. package/dist/data-type-support-BhSoPUFj.mjs.map +1 -0
  133. package/dist/data-type-support-CXpA0ex-.d.mts +7 -0
  134. package/dist/data-type-support-CXpA0ex-.d.mts.map +1 -0
  135. package/dist/{db-D18PrXKW-DvTv4JFn.d.mts → db-D1d75IvM-D4mRDC6w.d.mts} +123 -128
  136. package/dist/db-D1d75IvM-D4mRDC6w.d.mts.map +1 -0
  137. package/dist/{ddl-types-CXx4vPz6-BsgrnSUY.d.mts → ddl-types-By5mT2_S-CdaaFvsX.d.mts} +24 -29
  138. package/dist/ddl-types-By5mT2_S-CdaaFvsX.d.mts.map +1 -0
  139. package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts +39 -0
  140. package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts.map +1 -0
  141. package/dist/default-table-name-BfFY8qYR-CWZFDX6v.mjs +9 -0
  142. package/dist/default-table-name-BfFY8qYR-CWZFDX6v.mjs.map +1 -0
  143. package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs +1508 -0
  144. package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +1 -0
  145. package/dist/{derived-checks-DPdD01O0-DGqOFjs6.d.mts → derived-checks-DpPkO6Dt-9U9UJZOo.d.mts} +4 -4
  146. package/dist/derived-checks-DpPkO6Dt-9U9UJZOo.d.mts.map +1 -0
  147. package/dist/diagnostics-RHJxoiIk.mjs +23 -0
  148. package/dist/diagnostics-RHJxoiIk.mjs.map +1 -0
  149. package/dist/{diff-DbTNVm2f.d.mts → diff-1qHOLoUB.d.mts} +23 -10
  150. package/dist/diff-1qHOLoUB.d.mts.map +1 -0
  151. package/dist/diff-C1rFOhek.mjs +21 -0
  152. package/dist/diff-C1rFOhek.mjs.map +1 -0
  153. package/dist/{dist-ZK6oeI5e.mjs → dist-C8Y-PPuE.mjs} +36 -212
  154. package/dist/dist-C8Y-PPuE.mjs.map +1 -0
  155. package/dist/{dist-C_q1_QR9.mjs → dist-CHz1hF8M.mjs} +2 -2
  156. package/dist/dist-CHz1hF8M.mjs.map +1 -0
  157. package/dist/{dist-x6jvtkKM.mjs → dist-CMDXybwm.mjs} +2 -2
  158. package/dist/dist-CMDXybwm.mjs.map +1 -0
  159. package/dist/{driver-types-BQtRkOJ0-Bv2RPSfr.d.mts → driver-types-DRsYeq3j-BimeCnUk.d.mts} +11 -2
  160. package/dist/driver-types-DRsYeq3j-BimeCnUk.d.mts.map +1 -0
  161. package/dist/entity-handle-lowering-hook-BJZSlVVF.mjs +16 -0
  162. package/dist/entity-handle-lowering-hook-BJZSlVVF.mjs.map +1 -0
  163. package/dist/{entity-handle-lowering-hook-CIvRKBfa.d.mts → entity-handle-lowering-hook-BuvLtgFi.d.mts} +8 -11
  164. package/dist/entity-handle-lowering-hook-BuvLtgFi.d.mts.map +1 -0
  165. package/dist/{entity-kinds-B5cUFU22.d.mts → entity-kinds-BPG2xCZV.d.mts} +7 -7
  166. package/dist/entity-kinds-BPG2xCZV.d.mts.map +1 -0
  167. package/dist/{entity-kinds-D7vwoN_T-CCBwFJy0.mjs → entity-kinds-JR5SAm5h-DOH6VUtL.mjs} +31 -28
  168. package/dist/entity-kinds-JR5SAm5h-DOH6VUtL.mjs.map +1 -0
  169. package/dist/{errors-B5g0xWro-mWH2C07F.mjs → errors-B5g0xWro-C8plbqga.mjs} +2 -2
  170. package/dist/errors-B5g0xWro-C8plbqga.mjs.map +1 -0
  171. package/dist/errors.d.mts +1 -1
  172. package/dist/errors.d.mts.map +1 -1
  173. package/dist/errors.mjs +1 -1
  174. package/dist/exports-C3wGYtID-D65DEUTC.mjs +2389 -0
  175. package/dist/exports-C3wGYtID-D65DEUTC.mjs.map +1 -0
  176. package/dist/{expression-FJK6Ar-d.d.mts → expression-6ld_ZQL6-fOuazzzm.d.mts} +37 -16
  177. package/dist/expression-6ld_ZQL6-fOuazzzm.d.mts.map +1 -0
  178. package/dist/expression-CieaNuRM-B1uVqxwd.d.mts +22 -0
  179. package/dist/expression-CieaNuRM-B1uVqxwd.d.mts.map +1 -0
  180. package/dist/expression-D8HstQiB.d.mts +2 -0
  181. package/dist/{expression-CX5mTA-z.mjs → expression-impl-B-XNINxr-BhN2sysZ.mjs} +41 -18
  182. package/dist/expression-impl-B-XNINxr-BhN2sysZ.mjs.map +1 -0
  183. package/dist/{factories-SVor5xIT.mjs → factories-Crobuxwn.mjs} +27 -20
  184. package/dist/factories-Crobuxwn.mjs.map +1 -0
  185. package/dist/{factories-P3qBQhO-.d.mts → factories-DbNP9qfs.d.mts} +16 -10
  186. package/dist/factories-DbNP9qfs.d.mts.map +1 -0
  187. package/dist/family.d.mts +17 -13
  188. package/dist/family.mjs +17 -12
  189. package/dist/family__control-adapter.d.mts +3 -3
  190. package/dist/family__control-adapter.mjs +2 -1
  191. package/dist/family__control.d.mts +5 -4
  192. package/dist/family__control.mjs +4 -4
  193. package/dist/family__diff.d.mts +2 -3
  194. package/dist/family__diff.mjs +2 -2
  195. package/dist/family__ir.d.mts +1 -1
  196. package/dist/family__ir.mjs +2 -2
  197. package/dist/family__migration.d.mts +1 -1
  198. package/dist/family__migration.mjs +1 -1
  199. package/dist/family__pack.d.mts +2 -249
  200. package/dist/family__pack.mjs +3 -18
  201. package/dist/family__psl-build.d.mts +3 -0
  202. package/dist/family__psl-build.mjs +3 -0
  203. package/dist/family__psl-infer.d.mts +2 -2
  204. package/dist/family__psl-infer.mjs +2 -2
  205. package/dist/family__runtime.d.mts +2 -2
  206. package/dist/family__runtime.mjs +2 -2
  207. package/dist/family__verify.d.mts +1 -1
  208. package/dist/family__verify.mjs +1 -1
  209. package/dist/foreign-key-materialization-48P2V8on.d.mts +98 -0
  210. package/dist/foreign-key-materialization-48P2V8on.d.mts.map +1 -0
  211. package/dist/foreign-key-materialization-BM59w_Xg.mjs +287 -0
  212. package/dist/foreign-key-materialization-BM59w_Xg.mjs.map +1 -0
  213. package/dist/{foreign-key-C-iTPuRT-C9ip8zFx.d.mts → foreign-key-qkDFfG8t-TaK_GYWR.d.mts} +21 -5
  214. package/dist/foreign-key-qkDFfG8t-TaK_GYWR.d.mts.map +1 -0
  215. package/dist/functions-CsOoN7I3.mjs +88 -0
  216. package/dist/functions-CsOoN7I3.mjs.map +1 -0
  217. package/dist/functions-EW-RrRn3.d.mts +73 -0
  218. package/dist/functions-EW-RrRn3.d.mts.map +1 -0
  219. package/dist/generator-functions-D_qdqBV--Bq296cED.mjs +544 -0
  220. package/dist/generator-functions-D_qdqBV--Bq296cED.mjs.map +1 -0
  221. package/dist/index-7nHHQsAj.d.mts +606 -0
  222. package/dist/index-7nHHQsAj.d.mts.map +1 -0
  223. package/dist/{index-C5I8D-MB.d.mts → index-Nqc3OHR_.d.mts} +4 -5
  224. package/dist/index-Nqc3OHR_.d.mts.map +1 -0
  225. package/dist/index-equivalence-DswCiq5l-CGsyPP9B.mjs +109 -0
  226. package/dist/index-equivalence-DswCiq5l-CGsyPP9B.mjs.map +1 -0
  227. package/dist/{index-naming-DREt6js7-CRH27yUv.mjs → index-naming-BOcJT1B3-mG8Fd6KN.mjs} +35 -9
  228. package/dist/index-naming-BOcJT1B3-mG8Fd6KN.mjs.map +1 -0
  229. package/dist/{index-naming-Ct65z5Xk.d.mts → index-naming-Cs6wwia3.d.mts} +15 -5
  230. package/dist/index-naming-Cs6wwia3.d.mts.map +1 -0
  231. package/dist/index-reference-4wsdeB7v-DCwswK-q.d.mts +67 -0
  232. package/dist/index-reference-4wsdeB7v-DCwswK-q.d.mts.map +1 -0
  233. package/dist/index-reference-BQSrkRfT.mjs +55 -0
  234. package/dist/index-reference-BQSrkRfT.mjs.map +1 -0
  235. package/dist/index-reference-D8ewQRJr.d.mts +1 -0
  236. package/dist/index-type-validation-DJEMmmw0.mjs +42 -0
  237. package/dist/index-type-validation-DJEMmmw0.mjs.map +1 -0
  238. package/dist/index-type-validation-fGGwAHWc.d.mts +16 -0
  239. package/dist/index-type-validation-fGGwAHWc.d.mts.map +1 -0
  240. package/dist/index-types-H1O43iYT-BD0VwPqV.d.mts +66 -0
  241. package/dist/index-types-H1O43iYT-BD0VwPqV.d.mts.map +1 -0
  242. package/dist/index-types-pC_5vADQ-BOOBi14R.mjs +95 -0
  243. package/dist/index-types-pC_5vADQ-BOOBi14R.mjs.map +1 -0
  244. package/dist/index-types-snhtt_Fo.d.mts +1 -0
  245. package/dist/interpreter-D5qk4B---CG0C7kdx.mjs +2280 -0
  246. package/dist/interpreter-D5qk4B---CG0C7kdx.mjs.map +1 -0
  247. package/dist/{ir-Bghjt-FG.d.mts → ir-BvptQsFW.d.mts} +11 -5
  248. package/dist/ir-BvptQsFW.d.mts.map +1 -0
  249. package/dist/{ir-I-xciGUH.mjs → ir-DzsUDO8e.mjs} +2 -2
  250. package/dist/ir-DzsUDO8e.mjs.map +1 -0
  251. package/dist/{middleware-AhTz1BOW-th-Suxuf.d.mts → middleware-DHkW6pRr-DM6hd9iZ.d.mts} +5 -5
  252. package/dist/middleware-DHkW6pRr-DM6hd9iZ.d.mts.map +1 -0
  253. package/dist/middleware-gqy3l13N.d.mts +1 -0
  254. package/dist/{middleware-CMr4CHNz-DHIUdxlm.mjs → middleware-yBAfiVWn-DZO0vCRQ.mjs} +3 -3
  255. package/dist/middleware-yBAfiVWn-DZO0vCRQ.mjs.map +1 -0
  256. package/dist/{migration-CK4oePIo.mjs → migration-BJQjkqFz.mjs} +4 -4
  257. package/dist/migration-BJQjkqFz.mjs.map +1 -0
  258. package/dist/{migration-CjDRZNep.d.mts → migration-Cxmpzaz0.d.mts} +6 -6
  259. package/dist/migration-Cxmpzaz0.d.mts.map +1 -0
  260. package/dist/{naming-CV9j2pXl-KARaDReS.d.mts → naming-BcD36g9T-Mfe_xGGL.d.mts} +9 -14
  261. package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +1 -0
  262. package/dist/{naming-DKr4TJd7-Cszhq9RV.mjs → naming-bM5qm5PY-jOg3JFMb.mjs} +20 -31
  263. package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +1 -0
  264. package/dist/{ddl-types-BGdnAbXo-DKPHPUGx.mjs → opaque-sql-Dset3kln-CtsPDTXn.mjs} +24 -11
  265. package/dist/opaque-sql-Dset3kln-CtsPDTXn.mjs.map +1 -0
  266. package/dist/operations.d.mts +1 -1
  267. package/dist/operations.mjs +1 -1
  268. package/dist/orm-client.d.mts +817 -267
  269. package/dist/orm-client.d.mts.map +1 -1
  270. package/dist/orm-client.mjs +4719 -2942
  271. package/dist/orm-client.mjs.map +1 -1
  272. package/dist/pack-DA8HZ2mo.d.mts +535 -0
  273. package/dist/pack-DA8HZ2mo.d.mts.map +1 -0
  274. package/dist/pack-gSvGQWqs.mjs +80 -0
  275. package/dist/pack-gSvGQWqs.mjs.map +1 -0
  276. package/dist/{plan-CDxduYaN-pLIyyJaB.d.mts → plan-Cr4azjnG-CuL8FqXC.d.mts} +12 -8
  277. package/dist/plan-Cr4azjnG-CuL8FqXC.d.mts.map +1 -0
  278. package/dist/{plan-Dh0LbYIv-Crx5-ThG.mjs → plan-Dh0LbYIv-ubBSdUgl.mjs} +2 -2
  279. package/dist/plan-Dh0LbYIv-ubBSdUgl.mjs.map +1 -0
  280. package/dist/plan-Di6Gs2JD.d.mts +2 -0
  281. package/dist/psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs +42 -0
  282. package/dist/psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs.map +1 -0
  283. package/dist/psl-build-DFBG6vhz.mjs +426 -0
  284. package/dist/psl-build-DFBG6vhz.mjs.map +1 -0
  285. package/dist/psl-build-RelubU2E.d.mts +112 -0
  286. package/dist/psl-build-RelubU2E.d.mts.map +1 -0
  287. package/dist/psl-column-resolution-ChZqioOc-BREg4J7d.d.mts +24 -0
  288. package/dist/psl-column-resolution-ChZqioOc-BREg4J7d.d.mts.map +1 -0
  289. package/dist/psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs +1960 -0
  290. package/dist/psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs.map +1 -0
  291. package/dist/psl-infer--g4i84Go.mjs +201 -0
  292. package/dist/psl-infer--g4i84Go.mjs.map +1 -0
  293. package/dist/psl-infer-DzoxPZGd.d.mts +80 -0
  294. package/dist/psl-infer-DzoxPZGd.d.mts.map +1 -0
  295. package/dist/psl-names-C3cwe0rg-D1CTmC3a.mjs +66 -0
  296. package/dist/psl-names-C3cwe0rg-D1CTmC3a.mjs.map +1 -0
  297. package/dist/{query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts → query-lane-context-BCEoKy0_-CzmyavC9.d.mts} +20 -49
  298. package/dist/query-lane-context-BCEoKy0_-CzmyavC9.d.mts.map +1 -0
  299. package/dist/query-lane-context-VqH0mS9B.d.mts +1 -0
  300. package/dist/{referential-action-sql-DJ9ps6-S.d.mts → referential-action-sql-B2vKoUK6.d.mts} +3 -3
  301. package/dist/referential-action-sql-B2vKoUK6.d.mts.map +1 -0
  302. package/dist/{referential-action-sql-DSqkrySN.mjs → referential-action-sql-BLzCtTi8.mjs} +2 -2
  303. package/dist/referential-action-sql-BLzCtTi8.mjs.map +1 -0
  304. package/dist/relational-core.d.mts +14 -13
  305. package/dist/relational-core.mjs +8 -8
  306. package/dist/relational-core__aggregate-descriptor-registry.d.mts +2 -2
  307. package/dist/relational-core__aggregate-descriptor-registry.d.mts.map +1 -1
  308. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  309. package/dist/relational-core__ast.d.mts +5 -5
  310. package/dist/relational-core__ast.mjs +5 -5
  311. package/dist/relational-core__codec-descriptor-registry.d.mts +7 -8
  312. package/dist/relational-core__codec-descriptor-registry.d.mts.map +1 -1
  313. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  314. package/dist/relational-core__collection-methods.d.mts +3 -0
  315. package/dist/relational-core__contract-free.d.mts +18 -8
  316. package/dist/relational-core__contract-free.d.mts.map +1 -1
  317. package/dist/relational-core__contract-free.mjs +26 -10
  318. package/dist/relational-core__contract-free.mjs.map +1 -1
  319. package/dist/relational-core__expression.d.mts +4 -2
  320. package/dist/relational-core__expression.mjs +2 -2
  321. package/dist/relational-core__functions.d.mts +2 -0
  322. package/dist/relational-core__functions.mjs +2 -0
  323. package/dist/relational-core__index-reference.d.mts +3 -0
  324. package/dist/relational-core__index-reference.mjs +2 -0
  325. package/dist/relational-core__middleware.d.mts +2 -2
  326. package/dist/relational-core__middleware.mjs +1 -1
  327. package/dist/relational-core__plan.d.mts +4 -4
  328. package/dist/relational-core__plan.mjs +1 -1
  329. package/dist/relational-core__query-lane-context.d.mts +3 -3
  330. package/dist/relational-core__types.d.mts +2 -2
  331. package/dist/{resolve-storage-table-DZsfnzeW.mjs → resolve-storage-table-BHLQsOza.mjs} +3 -3
  332. package/dist/resolve-storage-table-BHLQsOza.mjs.map +1 -0
  333. package/dist/{resolve-storage-table-Nyrgk4h8.d.mts → resolve-storage-table-DCqtmnSU.d.mts} +4 -4
  334. package/dist/resolve-storage-table-DCqtmnSU.d.mts.map +1 -0
  335. package/dist/{runtime-tIHpGCcG.mjs → runtime-6tH1yOxK.mjs} +6 -6
  336. package/dist/runtime-6tH1yOxK.mjs.map +1 -0
  337. package/dist/{runtime-DpKF2Yu2.d.mts → runtime-CF6rAlE5.d.mts} +7 -8
  338. package/dist/runtime-CF6rAlE5.d.mts.map +1 -0
  339. package/dist/runtime.d.mts +5 -5
  340. package/dist/runtime.mjs +2 -1799
  341. package/dist/runtime__internal__prepared-query.d.mts +2 -2
  342. package/dist/runtime__internal__prepared-query.mjs +2 -2
  343. package/dist/{schema-differ-DpG_gnur-DFAtGezx.d.mts → schema-differ-DmP74bB8-tqHKiJ88.d.mts} +6 -6
  344. package/dist/schema-differ-DmP74bB8-tqHKiJ88.d.mts.map +1 -0
  345. package/dist/schema-ir.d.mts +2 -2
  346. package/dist/schema-ir.mjs +2 -2
  347. package/dist/schema-ir__naming.d.mts +1 -1
  348. package/dist/schema-ir__naming.mjs +1 -1
  349. package/dist/schema-ir__types.d.mts +3 -3
  350. package/dist/schema-ir__types.mjs +2 -2
  351. package/dist/{schema-verify-C_PEdlAr-Dxxjm6EM.mjs → schema-verify-C3wbdviw-DMjIubOr.mjs} +50 -8
  352. package/dist/schema-verify-C3wbdviw-DMjIubOr.mjs.map +1 -0
  353. package/dist/{serialized-index-CrgG8ct1-DG3JpHc7.d.mts → serialized-index-CrgG8ct1-DKVJ7TDX.d.mts} +4 -4
  354. package/dist/serialized-index-CrgG8ct1-DKVJ7TDX.d.mts.map +1 -0
  355. package/dist/{serialized-index-nBTwanKy-_ddEK4tk.mjs → serialized-index-DjCCnXB1-DMA7BtO2.mjs} +4 -4
  356. package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +1 -0
  357. package/dist/{sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs → sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs} +41 -16
  358. package/dist/sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map +1 -0
  359. package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs +400 -0
  360. package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +1 -0
  361. package/dist/{sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts → sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts} +3 -3
  362. package/dist/sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts.map +1 -0
  363. package/dist/sql-expression-B4BrhGPi.d.mts +62 -0
  364. package/dist/sql-expression-B4BrhGPi.d.mts.map +1 -0
  365. package/dist/sql-expression-CKgKznXS.mjs +137 -0
  366. package/dist/sql-expression-CKgKznXS.mjs.map +1 -0
  367. package/dist/{sql-index-ByAAE7K8-DKj2V86p.d.mts → sql-index-ByAAE7K8-Dqtn_vUL.d.mts} +4 -4
  368. package/dist/sql-index-ByAAE7K8-Dqtn_vUL.d.mts.map +1 -0
  369. package/dist/{sql-node-kEz6YFZo-v2F7delx.d.mts → sql-node-kEz6YFZo-1ogT6Cxt.d.mts} +2 -2
  370. package/dist/sql-node-kEz6YFZo-1ogT6Cxt.d.mts.map +1 -0
  371. package/dist/{sql-storage-8LqxeLAY-DH4DdUXx.d.mts → sql-storage-DeCAh5Hi-CEM-m8cs.d.mts} +19 -22
  372. package/dist/sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map +1 -0
  373. package/dist/{storage-table-DSeWszOL-CI-cItEK.d.mts → storage-table-Bf1ZjnxO-pUj6pyP0.d.mts} +17 -24
  374. package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +1 -0
  375. package/dist/{storage-table-ZzbR-xzQ-BRoTQE_2.mjs → storage-table-DDvN83mw-DkbBFmK9.mjs} +12 -9
  376. package/dist/storage-table-DDvN83mw-DkbBFmK9.mjs.map +1 -0
  377. package/dist/{storage-value-set-BGlj5Uus-CvZD--GG.d.mts → storage-value-set-BGlj5Uus-ny2k-0PA.d.mts} +3 -3
  378. package/dist/storage-value-set-BGlj5Uus-ny2k-0PA.d.mts.map +1 -0
  379. package/dist/transaction-state-BfXhs7D7-DhmbySW9.mjs +45 -0
  380. package/dist/transaction-state-BfXhs7D7-DhmbySW9.mjs.map +1 -0
  381. package/dist/transaction-state-DR3nKTmH-D29jmVE-.d.mts +115 -0
  382. package/dist/transaction-state-DR3nKTmH-D29jmVE-.d.mts.map +1 -0
  383. package/dist/types-B9wSEUsV.d.mts +1 -0
  384. package/dist/{types-CUsJrvEl.mjs → types-CTdSkl0s.mjs} +13 -6
  385. package/dist/types-CTdSkl0s.mjs.map +1 -0
  386. package/dist/types-CkAd8SWm.d.mts +57 -0
  387. package/dist/types-CkAd8SWm.d.mts.map +1 -0
  388. package/dist/{types-IqZMLrFC-DcH8v_u3.d.mts → types-Cq6ImLAB-RlU4jJAX.d.mts} +27 -41
  389. package/dist/types-Cq6ImLAB-RlU4jJAX.d.mts.map +1 -0
  390. package/dist/{types-YStFFkKs-D9UAmnON.d.mts → types-CuCxAQat-Dz8P4xyt.d.mts} +141 -86
  391. package/dist/types-CuCxAQat-Dz8P4xyt.d.mts.map +1 -0
  392. package/dist/types-DfKvtJwS-CrpWTGBJ.d.mts +273 -0
  393. package/dist/types-DfKvtJwS-CrpWTGBJ.d.mts.map +1 -0
  394. package/dist/{types-4YenawkP-CwaaZSid.mjs → types-DoyiTsjg-2YMhMJDA.mjs} +181 -80
  395. package/dist/types-DoyiTsjg-2YMhMJDA.mjs.map +1 -0
  396. package/dist/{types-v3qxLLxo-DCeKv7yY.d.mts → types-DriMIMNQ-BkbsW7w3.d.mts} +68 -34
  397. package/dist/types-DriMIMNQ-BkbsW7w3.d.mts.map +1 -0
  398. package/dist/{types-Dt4e_jC--COeP8xzN.mjs → types-NTQsD2MS-xcLtvKO9.mjs} +83 -17
  399. package/dist/types-NTQsD2MS-xcLtvKO9.mjs.map +1 -0
  400. package/dist/{types-CyxGtOOh-BggSa6Fe.d.mts → types-TXO7x1BA-CYYIY8NI.d.mts} +14 -14
  401. package/dist/types-TXO7x1BA-CYYIY8NI.d.mts.map +1 -0
  402. package/dist/types-ljUNyiWe.d.mts +1 -0
  403. package/dist/{unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts → unique-constraint-M5TlQnJQ-qX-maNUV.d.mts} +3 -3
  404. package/dist/unique-constraint-M5TlQnJQ-qX-maNUV.d.mts.map +1 -0
  405. package/dist/{util-DQQgv2j1-D6INZaRG.mjs → util-BBgcP3gI-CpL-0VuC.mjs} +12 -3
  406. package/dist/util-BBgcP3gI-CpL-0VuC.mjs.map +1 -0
  407. package/dist/{validators-CrWD6bSP.mjs → validators-BwA7ttZM.mjs} +0 -0
  408. package/dist/validators-BwA7ttZM.mjs.map +1 -0
  409. package/dist/{validators-Belo8QqM.d.mts → validators-FJs8HvFr.d.mts} +54 -16
  410. package/dist/validators-FJs8HvFr.d.mts.map +1 -0
  411. package/dist/{value-set-derivation-hook-BhgGVtw0.d.mts → value-set-derivation-hook-3E437jPU.d.mts} +3 -3
  412. package/dist/value-set-derivation-hook-3E437jPU.d.mts.map +1 -0
  413. package/dist/{value-set-derivation-hook-Di9JZ0X7.mjs → value-set-derivation-hook-HVaxhALD.mjs} +2 -2
  414. package/dist/value-set-derivation-hook-HVaxhALD.mjs.map +1 -0
  415. package/dist/{verify-u0UTdZgD-DSAaz9rW.mjs → verify-BVk5bjdH-DhKm6hB3.mjs} +8 -7
  416. package/dist/verify-BVk5bjdH-DhKm6hB3.mjs.map +1 -0
  417. package/dist/{verify-zDRnw0Rn.d.mts → verify-DHXbuZPB.d.mts} +2 -2
  418. package/dist/verify-DHXbuZPB.d.mts.map +1 -0
  419. package/package.json +33 -22
  420. package/dist/aggregate-descriptor-registry-C7hel5O7.mjs.map +0 -1
  421. package/dist/ast-HFcfQZr-.d.mts +0 -206
  422. package/dist/ast-HFcfQZr-.d.mts.map +0 -1
  423. package/dist/ast-Lbl4VwqP.mjs +0 -325
  424. package/dist/ast-Lbl4VwqP.mjs.map +0 -1
  425. package/dist/authored-check-naming-BWBe-PVE.d.mts.map +0 -1
  426. package/dist/authored-check-naming-Hf9990DV.mjs.map +0 -1
  427. package/dist/authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs +0 -316
  428. package/dist/authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs.map +0 -1
  429. package/dist/canonicalization-hooks-CYnW_sGn.d.mts.map +0 -1
  430. package/dist/canonicalization-hooks-dmXkOR4a.mjs.map +0 -1
  431. package/dist/check-constraint-B7qGu6rc-HvQjjX82.d.mts.map +0 -1
  432. package/dist/codec-descriptor-registry-N0dhtKaH.mjs.map +0 -1
  433. package/dist/config-types-D9fdKG3g.d.mts.map +0 -1
  434. package/dist/config-types-gAm54C_v.mjs.map +0 -1
  435. package/dist/contract-builder-CG_tGDbB.d.mts +0 -1360
  436. package/dist/contract-builder-CG_tGDbB.d.mts.map +0 -1
  437. package/dist/contract-builder-D4a5dT7j.mjs.map +0 -1
  438. package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs.map +0 -1
  439. package/dist/contract-view-BMR5IWk4.mjs.map +0 -1
  440. package/dist/contract-view-CPHxoAEX.d.mts.map +0 -1
  441. package/dist/contract__pack-types.d.mts +0 -2
  442. package/dist/control-D3cB5YQp.mjs +0 -1267
  443. package/dist/control-D3cB5YQp.mjs.map +0 -1
  444. package/dist/control-DTLJ1WtZ.d.mts +0 -945
  445. package/dist/control-DTLJ1WtZ.d.mts.map +0 -1
  446. package/dist/control-adapter-C99J7aEF-B7eQd7vD.d.mts.map +0 -1
  447. package/dist/control-adapter-MZJQiwcE.d.mts +0 -1
  448. package/dist/db-D18PrXKW-DvTv4JFn.d.mts.map +0 -1
  449. package/dist/ddl-types-BGdnAbXo-DKPHPUGx.mjs.map +0 -1
  450. package/dist/ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map +0 -1
  451. package/dist/derived-checks-DFMRmiAu-DGfB8aS4.mjs +0 -1057
  452. package/dist/derived-checks-DFMRmiAu-DGfB8aS4.mjs.map +0 -1
  453. package/dist/derived-checks-DPdD01O0-DGqOFjs6.d.mts.map +0 -1
  454. package/dist/diff-B16bL_IR.mjs +0 -13
  455. package/dist/diff-B16bL_IR.mjs.map +0 -1
  456. package/dist/diff-DbTNVm2f.d.mts.map +0 -1
  457. package/dist/dist-C_q1_QR9.mjs.map +0 -1
  458. package/dist/dist-ZK6oeI5e.mjs.map +0 -1
  459. package/dist/dist-x6jvtkKM.mjs.map +0 -1
  460. package/dist/driver-types-BQtRkOJ0-Bv2RPSfr.d.mts.map +0 -1
  461. package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts.map +0 -1
  462. package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs +0 -11
  463. package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs.map +0 -1
  464. package/dist/entity-kinds-B5cUFU22.d.mts.map +0 -1
  465. package/dist/entity-kinds-D7vwoN_T-CCBwFJy0.mjs.map +0 -1
  466. package/dist/errors-B5g0xWro-mWH2C07F.mjs.map +0 -1
  467. package/dist/expression-CX5mTA-z.mjs.map +0 -1
  468. package/dist/expression-FJK6Ar-d.d.mts.map +0 -1
  469. package/dist/factories-P3qBQhO-.d.mts.map +0 -1
  470. package/dist/factories-SVor5xIT.mjs.map +0 -1
  471. package/dist/family__pack.d.mts.map +0 -1
  472. package/dist/family__pack.mjs.map +0 -1
  473. package/dist/foreign-key-C-iTPuRT-C9ip8zFx.d.mts.map +0 -1
  474. package/dist/foreign-key-materialization-CkvOzJWy.d.mts +0 -65
  475. package/dist/foreign-key-materialization-CkvOzJWy.d.mts.map +0 -1
  476. package/dist/foreign-key-materialization-Cu7-7LHl.mjs +0 -73
  477. package/dist/foreign-key-materialization-Cu7-7LHl.mjs.map +0 -1
  478. package/dist/index-C-vQOMY_.d.mts +0 -84
  479. package/dist/index-C-vQOMY_.d.mts.map +0 -1
  480. package/dist/index-C5I8D-MB.d.mts.map +0 -1
  481. package/dist/index-naming-Ct65z5Xk.d.mts.map +0 -1
  482. package/dist/index-naming-DREt6js7-CRH27yUv.mjs.map +0 -1
  483. package/dist/index-type-validation-COH4d78M.mjs +0 -17
  484. package/dist/index-type-validation-COH4d78M.mjs.map +0 -1
  485. package/dist/index-type-validation-CZ5L2lli.d.mts +0 -10
  486. package/dist/index-type-validation-CZ5L2lli.d.mts.map +0 -1
  487. package/dist/index-types-CNhHgKHi.d.mts +0 -1
  488. package/dist/index-types-DJQ_xwaE.mjs +0 -40
  489. package/dist/index-types-DJQ_xwaE.mjs.map +0 -1
  490. package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +0 -31
  491. package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +0 -1
  492. package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs +0 -3680
  493. package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs.map +0 -1
  494. package/dist/ir-Bghjt-FG.d.mts.map +0 -1
  495. package/dist/ir-I-xciGUH.mjs.map +0 -1
  496. package/dist/lane-query-builder.d.mts +0 -236
  497. package/dist/lane-query-builder.d.mts.map +0 -1
  498. package/dist/lane-query-builder.mjs +0 -67
  499. package/dist/lane-query-builder.mjs.map +0 -1
  500. package/dist/middleware--TtoxUiW.d.mts +0 -1
  501. package/dist/middleware-AhTz1BOW-th-Suxuf.d.mts.map +0 -1
  502. package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs.map +0 -1
  503. package/dist/migration-CK4oePIo.mjs.map +0 -1
  504. package/dist/migration-CjDRZNep.d.mts.map +0 -1
  505. package/dist/naming-CV9j2pXl-KARaDReS.d.mts.map +0 -1
  506. package/dist/naming-DKr4TJd7-Cszhq9RV.mjs.map +0 -1
  507. package/dist/pack-types-BcLTpwbv.d.mts +0 -14
  508. package/dist/pack-types-BcLTpwbv.d.mts.map +0 -1
  509. package/dist/plan-BHLdb0Z7.d.mts +0 -2
  510. package/dist/plan-CDxduYaN-pLIyyJaB.d.mts.map +0 -1
  511. package/dist/plan-Dh0LbYIv-Crx5-ThG.mjs.map +0 -1
  512. package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs +0 -22
  513. package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs.map +0 -1
  514. package/dist/prepared-statement-9QpkE6JG-C430V3MO.d.mts +0 -529
  515. package/dist/prepared-statement-9QpkE6JG-C430V3MO.d.mts.map +0 -1
  516. package/dist/psl-infer-CCAD6FWA.d.mts +0 -119
  517. package/dist/psl-infer-CCAD6FWA.d.mts.map +0 -1
  518. package/dist/psl-infer-Dk5kgKre.mjs +0 -362
  519. package/dist/psl-infer-Dk5kgKre.mjs.map +0 -1
  520. package/dist/query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts.map +0 -1
  521. package/dist/query-lane-context-XMvk7fmY.d.mts +0 -1
  522. package/dist/referential-action-sql-DJ9ps6-S.d.mts.map +0 -1
  523. package/dist/referential-action-sql-DSqkrySN.mjs.map +0 -1
  524. package/dist/resolve-storage-table-DZsfnzeW.mjs.map +0 -1
  525. package/dist/resolve-storage-table-Nyrgk4h8.d.mts.map +0 -1
  526. package/dist/runtime-DpKF2Yu2.d.mts.map +0 -1
  527. package/dist/runtime-tIHpGCcG.mjs.map +0 -1
  528. package/dist/runtime.mjs.map +0 -1
  529. package/dist/schema-differ-DpG_gnur-DFAtGezx.d.mts.map +0 -1
  530. package/dist/schema-verify-C_PEdlAr-Dxxjm6EM.mjs.map +0 -1
  531. package/dist/serialized-index-CrgG8ct1-DG3JpHc7.d.mts.map +0 -1
  532. package/dist/serialized-index-nBTwanKy-_ddEK4tk.mjs.map +0 -1
  533. package/dist/sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs.map +0 -1
  534. package/dist/sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts.map +0 -1
  535. package/dist/sql-index-ByAAE7K8-DKj2V86p.d.mts.map +0 -1
  536. package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts.map +0 -1
  537. package/dist/sql-storage-8LqxeLAY-DH4DdUXx.d.mts.map +0 -1
  538. package/dist/storage-table-DSeWszOL-CI-cItEK.d.mts.map +0 -1
  539. package/dist/storage-table-ZzbR-xzQ-BRoTQE_2.mjs.map +0 -1
  540. package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts.map +0 -1
  541. package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs +0 -173
  542. package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs.map +0 -1
  543. package/dist/types-4YenawkP-CwaaZSid.mjs.map +0 -1
  544. package/dist/types-B0msOnBM.d.mts +0 -1
  545. package/dist/types-BDUG29Df-LE85dIXP.d.mts +0 -161
  546. package/dist/types-BDUG29Df-LE85dIXP.d.mts.map +0 -1
  547. package/dist/types-CUsJrvEl.mjs.map +0 -1
  548. package/dist/types-CyxGtOOh-BggSa6Fe.d.mts.map +0 -1
  549. package/dist/types-Dt4e_jC--COeP8xzN.mjs.map +0 -1
  550. package/dist/types-Dwcw0F8X.d.mts +0 -1
  551. package/dist/types-IqZMLrFC-DcH8v_u3.d.mts.map +0 -1
  552. package/dist/types-UcHa2cTe.d.mts +0 -17
  553. package/dist/types-UcHa2cTe.d.mts.map +0 -1
  554. package/dist/types-YStFFkKs-D9UAmnON.d.mts.map +0 -1
  555. package/dist/types-v3qxLLxo-DCeKv7yY.d.mts.map +0 -1
  556. package/dist/unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts.map +0 -1
  557. package/dist/util-DQQgv2j1-D6INZaRG.mjs.map +0 -1
  558. package/dist/validators-Belo8QqM.d.mts.map +0 -1
  559. package/dist/validators-CrWD6bSP.mjs.map +0 -1
  560. package/dist/value-set-derivation-hook-BhgGVtw0.d.mts.map +0 -1
  561. package/dist/value-set-derivation-hook-Di9JZ0X7.mjs.map +0 -1
  562. package/dist/verify-u0UTdZgD-DSAaz9rW.mjs.map +0 -1
  563. package/dist/verify-zDRnw0Rn.d.mts.map +0 -1
  564. /package/dist/{contract__pack-types.mjs → relational-core__collection-methods.mjs} +0 -0
@@ -0,0 +1,400 @@
1
+ import { t as contractError } from "./contract-errors-BCN6RVI5-DoH6b_KZ.mjs";
2
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
+ import { assertDataTypeParams, dataType, dataTypeParams, objectSchemaKeys, schemaKeysAllowing } from "@prisma/orm-framework/components/codec";
4
+ import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
5
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
6
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
7
+ import { type } from "arktype";
8
+ //#region ../../../2-sql-family/1-core/contract/dist/sql-data-type-D7M-YTTY.mjs
9
+ const PLACEHOLDER = /\{([A-Za-z][A-Za-z0-9]*)\}/g;
10
+ const LITERAL_CHARACTERS = /^[a-z0-9_ (),.]*$/;
11
+ const REGEXP_SPECIAL = /[.*+?^${}()|[\]\\]/g;
12
+ function paramKeysOf(id, schema) {
13
+ if (schema === void 0) return [];
14
+ const keys = objectSchemaKeys(schema);
15
+ if (keys === void 0) refuseDeclaration(id, "its parameter schema must be an arktype object schema.");
16
+ return keys;
17
+ }
18
+ function placeholdersOf(text) {
19
+ return [...text.matchAll(PLACEHOLDER)].map((match) => match[1] ?? "");
20
+ }
21
+ function placeholderSetOf(text) {
22
+ return [...placeholdersOf(text)].sort().join(",");
23
+ }
24
+ function patternOf(text, signedKeys = []) {
25
+ const placeholders = text.replace(REGEXP_SPECIAL, "\\$&").replace(/\\\{([A-Za-z][A-Za-z0-9]*)\\\}/g, (_, name) => signedKeys.includes(name) ? "(-?\\d+)" : "(\\d+)");
26
+ return new RegExp(`^${placeholders}$`);
27
+ }
28
+ function refuseDeclaration(id, why) {
29
+ throw new InternalError(`Data type ${id}: ${why}`);
30
+ }
31
+ function checkText(id, text, paramKeys) {
32
+ const quoted = JSON.stringify(text.text);
33
+ const refuse = (why) => refuseDeclaration(id, `the text ${quoted} ${why}.`);
34
+ if (text.text === "") refuse("is empty");
35
+ if (text.text !== text.text.trim()) refuse("starts or ends with a space");
36
+ if (text.text.includes(" ")) refuse("has two spaces in a row");
37
+ const literal = text.text.replace(PLACEHOLDER, "");
38
+ if (literal.includes("{") || literal.includes("}")) refuse("has a placeholder that is not written {name}");
39
+ if (!LITERAL_CHARACTERS.test(literal)) refuse("must be lower case and contain only letters, digits, spaces, brackets, commas, dots, underscores and placeholders");
40
+ for (const name of placeholdersOf(text.text)) if (!paramKeys.includes(name)) refuse(`names the parameter {${name}}, which the type does not declare`);
41
+ if (text.display === void 0) return;
42
+ const display = JSON.stringify(text.display);
43
+ if (text.display.toLowerCase() !== text.text.toLowerCase()) refuse(`has the display ${display}, which differs from it beyond letter case`);
44
+ if (placeholdersOf(text.display).join(",") !== placeholdersOf(text.text).join(",")) refuse(`has the display ${display}, which writes a placeholder differently`);
45
+ }
46
+ function checkMarks(id, texts) {
47
+ const marked = /* @__PURE__ */ new Map();
48
+ for (const text of texts) {
49
+ const key = placeholderSetOf(text.text);
50
+ const entry = marked.get(key) ?? {};
51
+ for (const mark of ["written", "catalog"]) {
52
+ if (text[mark] !== true) continue;
53
+ const other = entry[mark];
54
+ if (other !== void 0) refuseDeclaration(id, `the texts ${JSON.stringify(other)} and ${JSON.stringify(text.text)} have the same placeholders and are both ${mark}.`);
55
+ entry[mark] = text.text;
56
+ }
57
+ marked.set(key, entry);
58
+ }
59
+ }
60
+ function checkKindClaim(id, spec) {
61
+ if (spec.nameIsCatalogText === true) {
62
+ if (spec.render === void 0) refuseDeclaration(id, "a type whose name is its catalog text declares render.");
63
+ if (spec.texts !== void 0 || spec.claimsKind !== void 0) refuseDeclaration(id, "a type whose name is its catalog text declares no texts and claims no kind.");
64
+ }
65
+ if (spec.claimsKind === void 0) {
66
+ if (spec.render !== void 0 && spec.nameIsCatalogText !== true) refuseDeclaration(id, "render is allowed only together with claimsKind or nameIsCatalogText.");
67
+ if (spec.fromReported !== void 0) refuseDeclaration(id, "fromReported is allowed only together with claimsKind.");
68
+ return;
69
+ }
70
+ if (spec.texts !== void 0) refuseDeclaration(id, "a type that claims a kind declares no texts.");
71
+ }
72
+ function checkStoredAs(id, spec) {
73
+ if (spec.storedAs === void 0) return;
74
+ if (spec.texts !== void 0) refuseDeclaration(id, "a type stored as another declares no texts; its name is the name of the type it is stored as.");
75
+ if (spec.claimsKind !== void 0) refuseDeclaration(id, "a type stored as another claims no kind.");
76
+ }
77
+ const identity = (params) => params;
78
+ function isParamsOf(schema, params) {
79
+ return schema === void 0 || !(schema(params) instanceof type.errors);
80
+ }
81
+ function checkNormalFormsWritten(type) {
82
+ const written = new Set(type.sql.texts.filter((text) => text.written === true).map((text) => placeholderSetOf(text.text)));
83
+ if (written.size === 0) return;
84
+ const probes = [{}, ...type.sql.texts.map((text) => Object.fromEntries(placeholdersOf(text.text).map((name) => [name, 1])))];
85
+ for (const probe of probes) {
86
+ if (!isParamsOf(type.params, probe)) continue;
87
+ const normalKeys = presentKeys(type.sql.normalize(probe));
88
+ if (!written.has([...normalKeys].sort().join(","))) refuseDeclaration(type.id, `the parameters ${formatKeys(Object.keys(probe))} have the normal form ${formatKeys(normalKeys)}, which no written text takes.`);
89
+ }
90
+ }
91
+ /** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */
92
+ function sqlDataType(id, spec) {
93
+ const declaredNormalize = spec.normalize ?? identity;
94
+ const normalize = (params) => isParamsOf(spec.params, params) ? declaredNormalize(params) : params;
95
+ const { params: _untypedParams, ...declared } = dataType(id, {
96
+ ...spec,
97
+ normalize
98
+ });
99
+ const texts = spec.texts ?? [];
100
+ const paramKeys = paramKeysOf(declared.id, spec.params);
101
+ for (const text of texts) checkText(declared.id, text, paramKeys);
102
+ checkMarks(declared.id, texts);
103
+ checkKindClaim(declared.id, spec);
104
+ checkStoredAs(declared.id, spec);
105
+ const type = {
106
+ ...declared,
107
+ ...ifDefined("params", spec.params),
108
+ sql: {
109
+ texts,
110
+ claimsKind: spec.claimsKind,
111
+ storedAs: spec.storedAs,
112
+ normalize,
113
+ render: spec.render,
114
+ fromReported: spec.fromReported,
115
+ nameIsCatalogText: spec.nameIsCatalogText === true
116
+ }
117
+ };
118
+ checkNormalFormsWritten(type);
119
+ return type;
120
+ }
121
+ /** Whether the name of `type` is the text the database catalog prints, as declared by {@link SqlDataTypeSpec.nameIsCatalogText}. */
122
+ function nameIsCatalogText(type) {
123
+ return type.sql.nameIsCatalogText;
124
+ }
125
+ /** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */
126
+ function isSqlDataType(type) {
127
+ return "sql" in type;
128
+ }
129
+ function presentKeys(params) {
130
+ return Object.keys(params).filter((key) => params[key] !== void 0);
131
+ }
132
+ function formatKeys(keys) {
133
+ return `[${[...keys].sort().join(", ")}]`;
134
+ }
135
+ /** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter it refuses. */
136
+ function validateSqlTypeParams(type, params) {
137
+ assertDataTypeParams(type, params);
138
+ return blindCast(params);
139
+ }
140
+ function pickText(type, mark, keys) {
141
+ const candidates = type.sql.texts.filter((text) => text[mark] === true);
142
+ const wanted = [...keys].sort().join(",");
143
+ const found = candidates.find((text) => placeholderSetOf(text.text) === wanted);
144
+ if (found !== void 0) return found;
145
+ const verb = mark === "written" ? "written" : "reported";
146
+ const takes = candidates.length === 0 ? `it is never ${verb}` : `it is ${verb} with ${candidates.map((text) => formatKeys(placeholdersOf(text.text))).join(", ")}`;
147
+ throw contractError("CONTRACT.TYPE_PARAMS_INVALID", `${type.id} cannot be ${verb} with parameters ${formatKeys(keys)}; ${takes}`, { meta: {
148
+ dataType: type.id,
149
+ parameters: [...keys]
150
+ } });
151
+ }
152
+ function substitute(type, text, params) {
153
+ return (text.display ?? text.text).replace(PLACEHOLDER, (_, name) => {
154
+ const value = params[name];
155
+ if (!Number.isSafeInteger(value)) throw contractError("CONTRACT.TYPE_PARAMS_INVALID", `${type.id}: the parameter ${name} is written into the type name and must be an integer`, { meta: {
156
+ dataType: type.id,
157
+ parameters: [name]
158
+ } });
159
+ return String(value);
160
+ });
161
+ }
162
+ /**
163
+ * The name of `type` with no parameters, for places where parameters must not appear, such as a
164
+ * cast. A type whose name is its catalog text has none: its parameters cannot be separated from its
165
+ * name, so it is refused.
166
+ */
167
+ function sqlBaseName(type, params) {
168
+ if (type.sql.nameIsCatalogText) throw new InternalError(`Data type ${type.id} names its type by its catalog text, so it has no base name.`);
169
+ if (type.sql.render !== void 0) return type.sql.render(validateSqlTypeParams(type, params));
170
+ const fewest = type.sql.texts.filter((text) => text.written === true).reduce((best, text) => best === void 0 || placeholdersOf(text.text).length < placeholdersOf(best.text).length ? text : best, void 0);
171
+ if (fewest === void 0) throw new InternalError(`Data type ${type.id} has no written text and no render, so it has no base name.`);
172
+ const name = fewest.display ?? fewest.text;
173
+ if (placeholdersOf(fewest.text).length === 0) return name;
174
+ const bracket = name.indexOf("(");
175
+ return bracket === -1 ? name : name.slice(0, bracket);
176
+ }
177
+ /**
178
+ * The base name of `type` with `params`, unquoted, for display. It differs from {@link sqlBaseName}
179
+ * for a type that claims a kind, where it is the `typeName` parameter as written (`app.status`)
180
+ * while `sqlBaseName` gives the quoted name `render` writes into SQL (`"app"."status"`), and for a
181
+ * type whose name is its catalog text, where it is that whole text.
182
+ */
183
+ function unquotedSqlBaseName(type, params) {
184
+ if (type.sql.nameIsCatalogText) return renderSqlTypeName(type, params);
185
+ if (type.sql.claimsKind === void 0) return sqlBaseName(type, params);
186
+ const { typeName } = validateSqlTypeParams(type, params);
187
+ if (typeof typeName !== "string") throw new InternalError(`Data type ${type.id} claims the kind "${type.sql.claimsKind}" but declares no string typeName parameter.`);
188
+ return typeName;
189
+ }
190
+ const ADD_THE_CODEC_PACK = "Add the pack that provides the codec, and so declares its data type, to the configuration: to `extensions` in prisma.config or in defineContract.";
191
+ /** The SQL data type the codec `codecId` represents. */
192
+ function sqlDataTypeOfCodec(codecId, lookups) {
193
+ const descriptor = lookups.codecLookup.descriptorFor(codecId);
194
+ if (descriptor === void 0) throw contractError("CONTRACT.CODEC_DESCRIPTOR_MISSING", `No codec "${codecId}" is registered, so its column type cannot be named.`, {
195
+ fix: ADD_THE_CODEC_PACK,
196
+ meta: { codecId }
197
+ });
198
+ const type = lookups.dataTypeLookup.get(descriptor.dataType);
199
+ if (type === void 0) throw contractError("CONTRACT.DATA_TYPE_UNREGISTERED", `Codec "${codecId}" represents data type "${descriptor.dataType}", which no component registers.`, {
200
+ fix: ADD_THE_CODEC_PACK,
201
+ meta: {
202
+ codecId,
203
+ dataType: descriptor.dataType
204
+ }
205
+ });
206
+ if (!isSqlDataType(type)) throw new InternalError(`Data type ${type.id} is not a SQL data type, so it has no type name.`);
207
+ return type;
208
+ }
209
+ /**
210
+ * The length of a column of data type `type` with `typeParams`, in the type's normal form, as verify compares it: a bare Postgres `character` holds 1. `undefined` when the column has no length, or when its data type drops the length because the database does not limit it, as SQLite's text types do.
211
+ */
212
+ function sqlColumnLength(type, typeParams) {
213
+ if (type === void 0 || !isSqlDataType(type)) return void 0;
214
+ const length = type.sql.normalize(dataTypeParams(type, typeParams ?? {}))["length"];
215
+ return typeof length === "number" ? length : void 0;
216
+ }
217
+ /** The length of a column of `codecId` in its data type's normal form, or `undefined` for a column with no length or one whose database does not limit it. */
218
+ function sqlCodecColumnLength(dataTypes, codecId, typeParams) {
219
+ const dataTypeId = dataTypes.dataTypeOfCodec(codecId);
220
+ return sqlColumnLength(dataTypeId === void 0 ? void 0 : dataTypes.lookup.get(dataTypeId), typeParams);
221
+ }
222
+ /** The type a column of `type` is stored as, whose name DDL writes and the database reports: `type` itself unless it names another. */
223
+ function sqlStorageType(type, lookup) {
224
+ if (type.sql.storedAs === void 0) return type;
225
+ const storage = lookup.get(type.sql.storedAs);
226
+ if (storage === void 0 || !isSqlDataType(storage)) throw contractError("CONTRACT.DATA_TYPE_UNREGISTERED", `Data type "${type.id}" is stored as "${type.sql.storedAs}", which no component registers as a SQL data type.`, { meta: {
227
+ dataType: type.sql.storedAs,
228
+ storedBy: type.id
229
+ } });
230
+ return storage;
231
+ }
232
+ /** The id of the type a column of the data type `dataTypeId` is stored as: {@link sqlStorageType} of it, which refuses a storage type the lookup does not register, or `dataTypeId` itself when the lookup does not know it as a SQL data type. */
233
+ function sqlStorageTypeId(dataTypeId, lookup) {
234
+ const type = lookup.get(dataTypeId);
235
+ return type !== void 0 && isSqlDataType(type) ? sqlStorageType(type, lookup).id : dataTypeId;
236
+ }
237
+ /** The type a column is stored as, with its parameters in normal form, or the column's own id and parameters as written when the lookup does not know its data type as a SQL data type. */
238
+ function storedColumnType(column, lookup) {
239
+ const type = lookup.get(column.dataType);
240
+ if (type === void 0 || !isSqlDataType(type)) return {
241
+ id: column.dataType,
242
+ params: column.typeParams ?? {}
243
+ };
244
+ const storage = sqlStorageType(type, lookup);
245
+ return {
246
+ id: storage.id,
247
+ params: storage.sql.normalize(dataTypeParams(storage, column.typeParams ?? {}))
248
+ };
249
+ }
250
+ /**
251
+ * Whether two contract columns have the same type: the types their data types are stored as are one type, those types' parameters are equal in normal form, and both or neither are lists. ADR 254.
252
+ */
253
+ function sameSqlColumnType(a, b, lookup) {
254
+ const isList = (column) => column.many !== void 0 && column.many !== false;
255
+ const left = storedColumnType(a, lookup);
256
+ const right = storedColumnType(b, lookup);
257
+ return left.id === right.id && canonicalizeJson(left.params) === canonicalizeJson(right.params) && isList(a) === isList(b);
258
+ }
259
+ /** The type a column of the codec `codecId` is stored as: {@link sqlStorageType} of the data type it represents. */
260
+ function sqlStorageTypeOfCodec(codecId, lookups) {
261
+ return sqlStorageType(sqlDataTypeOfCodec(codecId, lookups), lookups.dataTypeLookup);
262
+ }
263
+ /** {@link unquotedSqlBaseName} of the type a column of the codec `codecId` is stored as. */
264
+ function unquotedSqlBaseNameOfCodec(codecId, typeParams, lookups) {
265
+ const type = sqlStorageTypeOfCodec(codecId, lookups);
266
+ return unquotedSqlBaseName(type, dataTypeParams(type, typeParams));
267
+ }
268
+ /** The text a migration writes for `type` with the raw `params`. */
269
+ function renderSqlTypeName(type, params) {
270
+ const validated = validateSqlTypeParams(type, params);
271
+ if (type.sql.render !== void 0) return type.sql.render(validated);
272
+ const normalized = type.sql.normalize(validated);
273
+ return substitute(type, pickText(type, "written", presentKeys(params).filter((key) => Object.hasOwn(normalized, key))), params);
274
+ }
275
+ /** The text the database catalog prints for `type` with `params`, in their normal form. */
276
+ function renderSqlCatalogText(type, params) {
277
+ const validated = validateSqlTypeParams(type, params);
278
+ if (type.sql.claimsKind !== void 0) throw new InternalError(`Data type ${type.id} claims the kind "${type.sql.claimsKind}" and has no catalog text.`);
279
+ if (type.sql.render !== void 0) return type.sql.render(validated);
280
+ const normalized = type.sql.normalize(validated);
281
+ return substitute(type, pickText(type, "catalog", presentKeys(normalized)), normalized);
282
+ }
283
+ function prepareReportedText(text) {
284
+ let prepared = "";
285
+ let quoted = false;
286
+ let spacePending = false;
287
+ for (const character of text.trim()) {
288
+ if (!quoted && /\s/.test(character)) {
289
+ spacePending = true;
290
+ continue;
291
+ }
292
+ if (spacePending && !/[(,]$/.test(prepared) && character !== ")") prepared += " ";
293
+ spacePending = false;
294
+ if (character === "\"") quoted = !quoted;
295
+ prepared += quoted ? character : character.toLowerCase();
296
+ }
297
+ return prepared;
298
+ }
299
+ function claims(text) {
300
+ return text.catalog === true || text.written !== true;
301
+ }
302
+ function claimingTexts(type) {
303
+ return type.sql.texts.filter(claims).map((text) => text.text);
304
+ }
305
+ function textsCollide(a, b) {
306
+ const withOnes = (text) => text.replace(PLACEHOLDER, "1");
307
+ return patternOf(a).test(withOnes(b)) || patternOf(b).test(withOnes(a));
308
+ }
309
+ function collisionBetween(first, second) {
310
+ const kind = first.sql.claimsKind;
311
+ if (kind !== void 0 && kind === second.sql.claimsKind) return {
312
+ by: "kind",
313
+ kind
314
+ };
315
+ for (const a of claimingTexts(first)) {
316
+ const b = claimingTexts(second).find((text) => textsCollide(a, text));
317
+ if (b !== void 0) return {
318
+ by: "text",
319
+ first: a,
320
+ second: b
321
+ };
322
+ }
323
+ }
324
+ /**
325
+ * The first two SQL data types in `types` that would both recognise one reported type: a claiming
326
+ * text of each collides, or both claim the same kind. Two texts collide when either one's pattern
327
+ * matches the other with each placeholder written as 1.
328
+ */
329
+ function findSqlDataTypeCollision(types) {
330
+ const sqlTypes = types.filter(isSqlDataType);
331
+ for (const [index, first] of sqlTypes.entries()) for (const second of sqlTypes.slice(index + 1)) {
332
+ const claims = collisionBetween(first, second);
333
+ if (claims !== void 0) return {
334
+ first,
335
+ second,
336
+ claims
337
+ };
338
+ }
339
+ }
340
+ /**
341
+ * The data type that claims a reported type, with its parameters in normal form, or undefined when
342
+ * no type in `dataTypes` claims it or its parameters fail the type's schema.
343
+ */
344
+ function resolveReportedSqlType(reported, dataTypes) {
345
+ const sqlTypes = dataTypes.filter(isSqlDataType);
346
+ if (reported.kind !== void 0) {
347
+ const claimant = sqlTypes.find((type) => type.sql.claimsKind === reported.kind);
348
+ if (claimant === void 0) return void 0;
349
+ return resolvedWith(claimant, claimant.sql.fromReported?.(reported) ?? {});
350
+ }
351
+ const text = prepareReportedText(reported.text);
352
+ for (const type of sqlTypes) for (const candidate of type.sql.texts) {
353
+ if (!claims(candidate)) continue;
354
+ const params = paramsMatching(type, candidate, text);
355
+ if (params !== void 0) return resolvedWith(type, params);
356
+ }
357
+ }
358
+ const signedParamKeysByType = /* @__PURE__ */ new WeakMap();
359
+ /** The parameters of `type` that may be negative, whose placeholders read a leading minus. */
360
+ function signedParamKeys(type) {
361
+ const known = signedParamKeysByType.get(type);
362
+ if (known !== void 0) return known;
363
+ const keys = schemaKeysAllowing(type.params, -1) ?? [];
364
+ signedParamKeysByType.set(type, keys);
365
+ return keys;
366
+ }
367
+ function paramsMatching(type, candidate, text) {
368
+ const match = patternOf(candidate.text, signedParamKeys(type)).exec(text);
369
+ if (match === null) return void 0;
370
+ return Object.fromEntries(placeholdersOf(candidate.text).map((name, index) => [name, Number.parseInt(match[index + 1] ?? "", 10)]));
371
+ }
372
+ /**
373
+ * Every data type in `dataTypes` that reads `text` as a migration may write it, with its parameters
374
+ * in normal form: any of a type's texts counts, whether written, printed by the catalog or only
375
+ * claimed. Empty when no type reads it or its parameters fail the type's schema. A type that claims
376
+ * a kind has no texts, so it never reads one.
377
+ */
378
+ function resolveWrittenSqlTypes(text, dataTypes) {
379
+ const prepared = prepareReportedText(text);
380
+ return dataTypes.filter(isSqlDataType).flatMap((type) => {
381
+ for (const candidate of type.sql.texts) {
382
+ const params = paramsMatching(type, candidate, prepared);
383
+ if (params === void 0) continue;
384
+ const resolved = resolvedWith(type, params);
385
+ if (resolved !== void 0) return [resolved];
386
+ }
387
+ return [];
388
+ });
389
+ }
390
+ function resolvedWith(type$1, params) {
391
+ if (type$1.params !== void 0 && type$1.params(params) instanceof type.errors) return void 0;
392
+ return {
393
+ dataType: type$1,
394
+ typeParams: type$1.sql.normalize(params)
395
+ };
396
+ }
397
+ //#endregion
398
+ export { unquotedSqlBaseName as _, renderSqlTypeName as a, sameSqlColumnType as c, sqlColumnLength as d, sqlDataType as f, sqlStorageTypeOfCodec as g, sqlStorageTypeId as h, renderSqlCatalogText as i, sqlBaseName as l, sqlStorageType as m, isSqlDataType as n, resolveReportedSqlType as o, sqlDataTypeOfCodec as p, nameIsCatalogText as r, resolveWrittenSqlTypes as s, findSqlDataTypeCollision as t, sqlCodecColumnLength as u, unquotedSqlBaseNameOfCodec as v, validateSqlTypeParams as y };
399
+
400
+ //# sourceMappingURL=sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-data-type-D7M-YTTY-D2vRqDxn.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/sql-data-type-D7M-YTTY.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { assertDataTypeParams, dataType, dataTypeParams, objectSchemaKeys, schemaKeysAllowing } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { type } from \"arktype\";\n//#region src/sql-data-type.ts\nconst PLACEHOLDER = /\\{([A-Za-z][A-Za-z0-9]*)\\}/g;\nconst LITERAL_CHARACTERS = /^[a-z0-9_ (),.]*$/;\nconst REGEXP_SPECIAL = /[.*+?^${}()|[\\]\\\\]/g;\nfunction paramKeysOf(id, schema) {\n\tif (schema === void 0) return [];\n\tconst keys = objectSchemaKeys(schema);\n\tif (keys === void 0) refuseDeclaration(id, \"its parameter schema must be an arktype object schema.\");\n\treturn keys;\n}\nfunction placeholdersOf(text) {\n\treturn [...text.matchAll(PLACEHOLDER)].map((match) => match[1] ?? \"\");\n}\nfunction placeholderSetOf(text) {\n\treturn [...placeholdersOf(text)].sort().join(\",\");\n}\nfunction patternOf(text, signedKeys = []) {\n\tconst placeholders = text.replace(REGEXP_SPECIAL, \"\\\\$&\").replace(/\\\\\\{([A-Za-z][A-Za-z0-9]*)\\\\\\}/g, (_, name) => signedKeys.includes(name) ? \"(-?\\\\d+)\" : \"(\\\\d+)\");\n\treturn new RegExp(`^${placeholders}$`);\n}\nfunction refuseDeclaration(id, why) {\n\tthrow new InternalError(`Data type ${id}: ${why}`);\n}\nfunction checkText(id, text, paramKeys) {\n\tconst quoted = JSON.stringify(text.text);\n\tconst refuse = (why) => refuseDeclaration(id, `the text ${quoted} ${why}.`);\n\tif (text.text === \"\") refuse(\"is empty\");\n\tif (text.text !== text.text.trim()) refuse(\"starts or ends with a space\");\n\tif (text.text.includes(\" \")) refuse(\"has two spaces in a row\");\n\tconst literal = text.text.replace(PLACEHOLDER, \"\");\n\tif (literal.includes(\"{\") || literal.includes(\"}\")) refuse(\"has a placeholder that is not written {name}\");\n\tif (!LITERAL_CHARACTERS.test(literal)) refuse(\"must be lower case and contain only letters, digits, spaces, brackets, commas, dots, underscores and placeholders\");\n\tfor (const name of placeholdersOf(text.text)) if (!paramKeys.includes(name)) refuse(`names the parameter {${name}}, which the type does not declare`);\n\tif (text.display === void 0) return;\n\tconst display = JSON.stringify(text.display);\n\tif (text.display.toLowerCase() !== text.text.toLowerCase()) refuse(`has the display ${display}, which differs from it beyond letter case`);\n\tif (placeholdersOf(text.display).join(\",\") !== placeholdersOf(text.text).join(\",\")) refuse(`has the display ${display}, which writes a placeholder differently`);\n}\nfunction checkMarks(id, texts) {\n\tconst marked = /* @__PURE__ */ new Map();\n\tfor (const text of texts) {\n\t\tconst key = placeholderSetOf(text.text);\n\t\tconst entry = marked.get(key) ?? {};\n\t\tfor (const mark of [\"written\", \"catalog\"]) {\n\t\t\tif (text[mark] !== true) continue;\n\t\t\tconst other = entry[mark];\n\t\t\tif (other !== void 0) refuseDeclaration(id, `the texts ${JSON.stringify(other)} and ${JSON.stringify(text.text)} have the same placeholders and are both ${mark}.`);\n\t\t\tentry[mark] = text.text;\n\t\t}\n\t\tmarked.set(key, entry);\n\t}\n}\nfunction checkKindClaim(id, spec) {\n\tif (spec.nameIsCatalogText === true) {\n\t\tif (spec.render === void 0) refuseDeclaration(id, \"a type whose name is its catalog text declares render.\");\n\t\tif (spec.texts !== void 0 || spec.claimsKind !== void 0) refuseDeclaration(id, \"a type whose name is its catalog text declares no texts and claims no kind.\");\n\t}\n\tif (spec.claimsKind === void 0) {\n\t\tif (spec.render !== void 0 && spec.nameIsCatalogText !== true) refuseDeclaration(id, \"render is allowed only together with claimsKind or nameIsCatalogText.\");\n\t\tif (spec.fromReported !== void 0) refuseDeclaration(id, \"fromReported is allowed only together with claimsKind.\");\n\t\treturn;\n\t}\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type that claims a kind declares no texts.\");\n}\nfunction checkStoredAs(id, spec) {\n\tif (spec.storedAs === void 0) return;\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type stored as another declares no texts; its name is the name of the type it is stored as.\");\n\tif (spec.claimsKind !== void 0) refuseDeclaration(id, \"a type stored as another claims no kind.\");\n}\nconst identity = (params) => params;\nfunction isParamsOf(schema, params) {\n\treturn schema === void 0 || !(schema(params) instanceof type.errors);\n}\nfunction checkNormalFormsWritten(type) {\n\tconst written = new Set(type.sql.texts.filter((text) => text.written === true).map((text) => placeholderSetOf(text.text)));\n\tif (written.size === 0) return;\n\tconst probes = [{}, ...type.sql.texts.map((text) => Object.fromEntries(placeholdersOf(text.text).map((name) => [name, 1])))];\n\tfor (const probe of probes) {\n\t\tif (!isParamsOf(type.params, probe)) continue;\n\t\tconst normalKeys = presentKeys(type.sql.normalize(probe));\n\t\tif (!written.has([...normalKeys].sort().join(\",\"))) refuseDeclaration(type.id, `the parameters ${formatKeys(Object.keys(probe))} have the normal form ${formatKeys(normalKeys)}, which no written text takes.`);\n\t}\n}\n/** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */\nfunction sqlDataType(id, spec) {\n\tconst declaredNormalize = spec.normalize ?? identity;\n\tconst normalize = (params) => isParamsOf(spec.params, params) ? declaredNormalize(params) : params;\n\tconst { params: _untypedParams, ...declared } = dataType(id, {\n\t\t...spec,\n\t\tnormalize\n\t});\n\tconst texts = spec.texts ?? [];\n\tconst paramKeys = paramKeysOf(declared.id, spec.params);\n\tfor (const text of texts) checkText(declared.id, text, paramKeys);\n\tcheckMarks(declared.id, texts);\n\tcheckKindClaim(declared.id, spec);\n\tcheckStoredAs(declared.id, spec);\n\tconst type = {\n\t\t...declared,\n\t\t...ifDefined(\"params\", spec.params),\n\t\tsql: {\n\t\t\ttexts,\n\t\t\tclaimsKind: spec.claimsKind,\n\t\t\tstoredAs: spec.storedAs,\n\t\t\tnormalize,\n\t\t\trender: spec.render,\n\t\t\tfromReported: spec.fromReported,\n\t\t\tnameIsCatalogText: spec.nameIsCatalogText === true\n\t\t}\n\t};\n\tcheckNormalFormsWritten(type);\n\treturn type;\n}\n/** Whether the name of `type` is the text the database catalog prints, as declared by {@link SqlDataTypeSpec.nameIsCatalogText}. */\nfunction nameIsCatalogText(type) {\n\treturn type.sql.nameIsCatalogText;\n}\n/** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */\nfunction isSqlDataType(type) {\n\treturn \"sql\" in type;\n}\nfunction presentKeys(params) {\n\treturn Object.keys(params).filter((key) => params[key] !== void 0);\n}\nfunction formatKeys(keys) {\n\treturn `[${[...keys].sort().join(\", \")}]`;\n}\n/** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter it refuses. */\nfunction validateSqlTypeParams(type, params) {\n\tassertDataTypeParams(type, params);\n\treturn blindCast(params);\n}\nfunction pickText(type, mark, keys) {\n\tconst candidates = type.sql.texts.filter((text) => text[mark] === true);\n\tconst wanted = [...keys].sort().join(\",\");\n\tconst found = candidates.find((text) => placeholderSetOf(text.text) === wanted);\n\tif (found !== void 0) return found;\n\tconst verb = mark === \"written\" ? \"written\" : \"reported\";\n\tconst takes = candidates.length === 0 ? `it is never ${verb}` : `it is ${verb} with ${candidates.map((text) => formatKeys(placeholdersOf(text.text))).join(\", \")}`;\n\tthrow contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id} cannot be ${verb} with parameters ${formatKeys(keys)}; ${takes}`, { meta: {\n\t\tdataType: type.id,\n\t\tparameters: [...keys]\n\t} });\n}\nfunction substitute(type, text, params) {\n\treturn (text.display ?? text.text).replace(PLACEHOLDER, (_, name) => {\n\t\tconst value = params[name];\n\t\tif (!Number.isSafeInteger(value)) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id}: the parameter ${name} is written into the type name and must be an integer`, { meta: {\n\t\t\tdataType: type.id,\n\t\t\tparameters: [name]\n\t\t} });\n\t\treturn String(value);\n\t});\n}\n/**\n* The name of `type` with no parameters, for places where parameters must not appear, such as a\n* cast. A type whose name is its catalog text has none: its parameters cannot be separated from its\n* name, so it is refused.\n*/\nfunction sqlBaseName(type, params) {\n\tif (type.sql.nameIsCatalogText) throw new InternalError(`Data type ${type.id} names its type by its catalog text, so it has no base name.`);\n\tif (type.sql.render !== void 0) return type.sql.render(validateSqlTypeParams(type, params));\n\tconst fewest = type.sql.texts.filter((text) => text.written === true).reduce((best, text) => best === void 0 || placeholdersOf(text.text).length < placeholdersOf(best.text).length ? text : best, void 0);\n\tif (fewest === void 0) throw new InternalError(`Data type ${type.id} has no written text and no render, so it has no base name.`);\n\tconst name = fewest.display ?? fewest.text;\n\tif (placeholdersOf(fewest.text).length === 0) return name;\n\tconst bracket = name.indexOf(\"(\");\n\treturn bracket === -1 ? name : name.slice(0, bracket);\n}\n/**\n* The base name of `type` with `params`, unquoted, for display. It differs from {@link sqlBaseName}\n* for a type that claims a kind, where it is the `typeName` parameter as written (`app.status`)\n* while `sqlBaseName` gives the quoted name `render` writes into SQL (`\"app\".\"status\"`), and for a\n* type whose name is its catalog text, where it is that whole text.\n*/\nfunction unquotedSqlBaseName(type, params) {\n\tif (type.sql.nameIsCatalogText) return renderSqlTypeName(type, params);\n\tif (type.sql.claimsKind === void 0) return sqlBaseName(type, params);\n\tconst { typeName } = validateSqlTypeParams(type, params);\n\tif (typeof typeName !== \"string\") throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" but declares no string typeName parameter.`);\n\treturn typeName;\n}\nconst ADD_THE_CODEC_PACK = \"Add the pack that provides the codec, and so declares its data type, to the configuration: to `extensions` in prisma.config or in defineContract.\";\n/** The SQL data type the codec `codecId` represents. */\nfunction sqlDataTypeOfCodec(codecId, lookups) {\n\tconst descriptor = lookups.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) throw contractError(\"CONTRACT.CODEC_DESCRIPTOR_MISSING\", `No codec \"${codecId}\" is registered, so its column type cannot be named.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: { codecId }\n\t});\n\tconst type = lookups.dataTypeLookup.get(descriptor.dataType);\n\tif (type === void 0) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tif (!isSqlDataType(type)) throw new InternalError(`Data type ${type.id} is not a SQL data type, so it has no type name.`);\n\treturn type;\n}\n/**\n* The length of a column of data type `type` with `typeParams`, in the type's normal form, as verify compares it: a bare Postgres `character` holds 1. `undefined` when the column has no length, or when its data type drops the length because the database does not limit it, as SQLite's text types do.\n*/\nfunction sqlColumnLength(type, typeParams) {\n\tif (type === void 0 || !isSqlDataType(type)) return void 0;\n\tconst length = type.sql.normalize(dataTypeParams(type, typeParams ?? {}))[\"length\"];\n\treturn typeof length === \"number\" ? length : void 0;\n}\n/** The length of a column of `codecId` in its data type's normal form, or `undefined` for a column with no length or one whose database does not limit it. */\nfunction sqlCodecColumnLength(dataTypes, codecId, typeParams) {\n\tconst dataTypeId = dataTypes.dataTypeOfCodec(codecId);\n\treturn sqlColumnLength(dataTypeId === void 0 ? void 0 : dataTypes.lookup.get(dataTypeId), typeParams);\n}\n/** The type a column of `type` is stored as, whose name DDL writes and the database reports: `type` itself unless it names another. */\nfunction sqlStorageType(type, lookup) {\n\tif (type.sql.storedAs === void 0) return type;\n\tconst storage = lookup.get(type.sql.storedAs);\n\tif (storage === void 0 || !isSqlDataType(storage)) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Data type \"${type.id}\" is stored as \"${type.sql.storedAs}\", which no component registers as a SQL data type.`, { meta: {\n\t\tdataType: type.sql.storedAs,\n\t\tstoredBy: type.id\n\t} });\n\treturn storage;\n}\n/** The id of the type a column of the data type `dataTypeId` is stored as: {@link sqlStorageType} of it, which refuses a storage type the lookup does not register, or `dataTypeId` itself when the lookup does not know it as a SQL data type. */\nfunction sqlStorageTypeId(dataTypeId, lookup) {\n\tconst type = lookup.get(dataTypeId);\n\treturn type !== void 0 && isSqlDataType(type) ? sqlStorageType(type, lookup).id : dataTypeId;\n}\n/** The type a column is stored as, with its parameters in normal form, or the column's own id and parameters as written when the lookup does not know its data type as a SQL data type. */\nfunction storedColumnType(column, lookup) {\n\tconst type = lookup.get(column.dataType);\n\tif (type === void 0 || !isSqlDataType(type)) return {\n\t\tid: column.dataType,\n\t\tparams: column.typeParams ?? {}\n\t};\n\tconst storage = sqlStorageType(type, lookup);\n\treturn {\n\t\tid: storage.id,\n\t\tparams: storage.sql.normalize(dataTypeParams(storage, column.typeParams ?? {}))\n\t};\n}\n/**\n* Whether two contract columns have the same type: the types their data types are stored as are one type, those types' parameters are equal in normal form, and both or neither are lists. ADR 254.\n*/\nfunction sameSqlColumnType(a, b, lookup) {\n\tconst isList = (column) => column.many !== void 0 && column.many !== false;\n\tconst left = storedColumnType(a, lookup);\n\tconst right = storedColumnType(b, lookup);\n\treturn left.id === right.id && canonicalizeJson(left.params) === canonicalizeJson(right.params) && isList(a) === isList(b);\n}\n/** The type a column of the codec `codecId` is stored as: {@link sqlStorageType} of the data type it represents. */\nfunction sqlStorageTypeOfCodec(codecId, lookups) {\n\treturn sqlStorageType(sqlDataTypeOfCodec(codecId, lookups), lookups.dataTypeLookup);\n}\n/** {@link unquotedSqlBaseName} of the type a column of the codec `codecId` is stored as. */\nfunction unquotedSqlBaseNameOfCodec(codecId, typeParams, lookups) {\n\tconst type = sqlStorageTypeOfCodec(codecId, lookups);\n\treturn unquotedSqlBaseName(type, dataTypeParams(type, typeParams));\n}\n/** The text a migration writes for `type` with the raw `params`. */\nfunction renderSqlTypeName(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"written\", presentKeys(params).filter((key) => Object.hasOwn(normalized, key))), params);\n}\n/** The text the database catalog prints for `type` with `params`, in their normal form. */\nfunction renderSqlCatalogText(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.claimsKind !== void 0) throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" and has no catalog text.`);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"catalog\", presentKeys(normalized)), normalized);\n}\nfunction prepareReportedText(text) {\n\tlet prepared = \"\";\n\tlet quoted = false;\n\tlet spacePending = false;\n\tfor (const character of text.trim()) {\n\t\tif (!quoted && /\\s/.test(character)) {\n\t\t\tspacePending = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (spacePending && !/[(,]$/.test(prepared) && character !== \")\") prepared += \" \";\n\t\tspacePending = false;\n\t\tif (character === \"\\\"\") quoted = !quoted;\n\t\tprepared += quoted ? character : character.toLowerCase();\n\t}\n\treturn prepared;\n}\nfunction claims(text) {\n\treturn text.catalog === true || text.written !== true;\n}\nfunction claimingTexts(type) {\n\treturn type.sql.texts.filter(claims).map((text) => text.text);\n}\nfunction textsCollide(a, b) {\n\tconst withOnes = (text) => text.replace(PLACEHOLDER, \"1\");\n\treturn patternOf(a).test(withOnes(b)) || patternOf(b).test(withOnes(a));\n}\nfunction collisionBetween(first, second) {\n\tconst kind = first.sql.claimsKind;\n\tif (kind !== void 0 && kind === second.sql.claimsKind) return {\n\t\tby: \"kind\",\n\t\tkind\n\t};\n\tfor (const a of claimingTexts(first)) {\n\t\tconst b = claimingTexts(second).find((text) => textsCollide(a, text));\n\t\tif (b !== void 0) return {\n\t\t\tby: \"text\",\n\t\t\tfirst: a,\n\t\t\tsecond: b\n\t\t};\n\t}\n}\n/**\n* The first two SQL data types in `types` that would both recognise one reported type: a claiming\n* text of each collides, or both claim the same kind. Two texts collide when either one's pattern\n* matches the other with each placeholder written as 1.\n*/\nfunction findSqlDataTypeCollision(types) {\n\tconst sqlTypes = types.filter(isSqlDataType);\n\tfor (const [index, first] of sqlTypes.entries()) for (const second of sqlTypes.slice(index + 1)) {\n\t\tconst claims = collisionBetween(first, second);\n\t\tif (claims !== void 0) return {\n\t\t\tfirst,\n\t\t\tsecond,\n\t\t\tclaims\n\t\t};\n\t}\n}\n/**\n* The data type that claims a reported type, with its parameters in normal form, or undefined when\n* no type in `dataTypes` claims it or its parameters fail the type's schema.\n*/\nfunction resolveReportedSqlType(reported, dataTypes) {\n\tconst sqlTypes = dataTypes.filter(isSqlDataType);\n\tif (reported.kind !== void 0) {\n\t\tconst claimant = sqlTypes.find((type) => type.sql.claimsKind === reported.kind);\n\t\tif (claimant === void 0) return void 0;\n\t\treturn resolvedWith(claimant, claimant.sql.fromReported?.(reported) ?? {});\n\t}\n\tconst text = prepareReportedText(reported.text);\n\tfor (const type of sqlTypes) for (const candidate of type.sql.texts) {\n\t\tif (!claims(candidate)) continue;\n\t\tconst params = paramsMatching(type, candidate, text);\n\t\tif (params !== void 0) return resolvedWith(type, params);\n\t}\n}\nconst signedParamKeysByType = /* @__PURE__ */ new WeakMap();\n/** The parameters of `type` that may be negative, whose placeholders read a leading minus. */\nfunction signedParamKeys(type) {\n\tconst known = signedParamKeysByType.get(type);\n\tif (known !== void 0) return known;\n\tconst keys = schemaKeysAllowing(type.params, -1) ?? [];\n\tsignedParamKeysByType.set(type, keys);\n\treturn keys;\n}\nfunction paramsMatching(type, candidate, text) {\n\tconst match = patternOf(candidate.text, signedParamKeys(type)).exec(text);\n\tif (match === null) return void 0;\n\treturn Object.fromEntries(placeholdersOf(candidate.text).map((name, index) => [name, Number.parseInt(match[index + 1] ?? \"\", 10)]));\n}\n/**\n* Every data type in `dataTypes` that reads `text` as a migration may write it, with its parameters\n* in normal form: any of a type's texts counts, whether written, printed by the catalog or only\n* claimed. Empty when no type reads it or its parameters fail the type's schema. A type that claims\n* a kind has no texts, so it never reads one.\n*/\nfunction resolveWrittenSqlTypes(text, dataTypes) {\n\tconst prepared = prepareReportedText(text);\n\treturn dataTypes.filter(isSqlDataType).flatMap((type) => {\n\t\tfor (const candidate of type.sql.texts) {\n\t\t\tconst params = paramsMatching(type, candidate, prepared);\n\t\t\tif (params === void 0) continue;\n\t\t\tconst resolved = resolvedWith(type, params);\n\t\t\tif (resolved !== void 0) return [resolved];\n\t\t}\n\t\treturn [];\n\t});\n}\nfunction resolvedWith(type$1, params) {\n\tif (type$1.params !== void 0 && type$1.params(params) instanceof type.errors) return void 0;\n\treturn {\n\t\tdataType: type$1,\n\t\ttypeParams: type$1.sql.normalize(params)\n\t};\n}\n//#endregion\nexport { unquotedSqlBaseName as _, renderSqlTypeName as a, sameSqlColumnType as c, sqlColumnLength as d, sqlDataType as f, sqlStorageTypeOfCodec as g, sqlStorageTypeId as h, renderSqlCatalogText as i, sqlBaseName as l, sqlStorageType as m, isSqlDataType as n, resolveReportedSqlType as o, sqlDataTypeOfCodec as p, nameIsCatalogText as r, resolveWrittenSqlTypes as s, findSqlDataTypeCollision as t, sqlCodecColumnLength as u, unquotedSqlBaseNameOfCodec as v, validateSqlTypeParams as y };\n\n//# sourceMappingURL=sql-data-type-D7M-YTTY.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,SAAS,YAAY,IAAI,QAAQ;CAChC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,OAAO,iBAAiB,MAAM;CACpC,IAAI,SAAS,KAAK,GAAG,kBAAkB,IAAI,wDAAwD;CACnG,OAAO;AACR;AACA,SAAS,eAAe,MAAM;CAC7B,OAAO,CAAC,GAAG,KAAK,SAAS,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,MAAM,MAAM,EAAE;AACrE;AACA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG;AACjD;AACA,SAAS,UAAU,MAAM,aAAa,CAAC,GAAG;CACzC,MAAM,eAAe,KAAK,QAAQ,gBAAgB,MAAM,CAAC,CAAC,QAAQ,oCAAoC,GAAG,SAAS,WAAW,SAAS,IAAI,IAAI,aAAa,QAAQ;CACnK,OAAO,IAAI,OAAO,IAAI,aAAa,EAAE;AACtC;AACA,SAAS,kBAAkB,IAAI,KAAK;CACnC,MAAM,IAAI,cAAc,aAAa,GAAG,IAAI,KAAK;AAClD;AACA,SAAS,UAAU,IAAI,MAAM,WAAW;CACvC,MAAM,SAAS,KAAK,UAAU,KAAK,IAAI;CACvC,MAAM,UAAU,QAAQ,kBAAkB,IAAI,YAAY,OAAO,GAAG,IAAI,EAAE;CAC1E,IAAI,KAAK,SAAS,IAAI,OAAO,UAAU;CACvC,IAAI,KAAK,SAAS,KAAK,KAAK,KAAK,GAAG,OAAO,6BAA6B;CACxE,IAAI,KAAK,KAAK,SAAS,IAAI,G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,IAAI;CACxE,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,OAAO,OAAO,YAAY,eAAe,UAAU,IAAI,CAAC,CAAC,KAAK,MAAM,UAAU,CAAC,MAAM,OAAO,SAAS,MAAM,QAAQ,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;AACnI;;;;;;;AAOA,SAAS,uBAAuB,MAAM,WAAW;CAChD,MAAM,WAAW,oBAAoB,IAAI;CACzC,OAAO,UAAU,OAAO,aAAa,CAAC,CAAC,SAAS,SAAS;EACxD,KAAK,MAAM,aAAa,KAAK,IAAI,OAAO;GACvC,MAAM,SAAS,eAAe,MAAM,WAAW,QAAQ;GACvD,IAAI,WAAW,KAAK,GAAG;GACvB,MAAM,WAAW,aAAa,MAAM,MAAM;GAC1C,IAAI,aAAa,KAAK,GAAG,OAAO,CAAC,QAAQ;EAC1C;EACA,OAAO,CAAC;CACT,CAAC;AACF;AACA,SAAS,aAAa,QAAQ,QAAQ;CACrC,IAAI,OAAO,WAAW,KAAK,KAAK,OAAO,OAAO,MAAM,aAAa,KAAK,QAAQ,OAAO,KAAK;CAC1F,OAAO;EACN,UAAU;EACV,YAAY,OAAO,IAAI,UAAU,MAAM;CACxC;AACD"}
@@ -1,6 +1,6 @@
1
- import { m as AnyQueryAst } from "./types-v3qxLLxo-DCeKv7yY.mjs";
1
+ import { h as AnyQueryAst } from "./types-DriMIMNQ-BkbsW7w3.mjs";
2
2
  import { ExecutionPlan } from "@prisma/orm-framework/components/runtime";
3
- //#region ../../../2-sql/4-lanes/relational-core/dist/sql-execution-plan--jKyLpe5.d.mts
3
+ //#region ../../../2-sql-family/4-lanes/relational-core/dist/sql-execution-plan-3uxYjHyu.d.mts
4
4
  //#region src/sql-execution-plan.d.ts
5
5
  /**
6
6
  * SQL-domain execution plan: a query lowered to the wire-level shape that a
@@ -28,4 +28,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
28
28
  }
29
29
  //#endregion
30
30
  export { SqlExecutionPlan as t };
31
- //# sourceMappingURL=sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts.map
31
+ //# sourceMappingURL=sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/sql-execution-plan-3uxYjHyu.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,iBAAiB,uBAAuB,cAAc;WACrD;WACA;WACA,KAAK"}
@@ -0,0 +1,62 @@
1
+ import { DataTypeAuthoringEntry } from "@prisma/orm-framework/components/authoring";
2
+ import { DataType, DataTypeId } from "@prisma/orm-framework/components/codec";
3
+ import { JsonValue } from "@prisma/orm-framework/contract/types";
4
+ //#region ../../../2-sql-family/1-core/contract/dist/sql-expression.d.mts
5
+ //#region src/sql-expression.d.ts
6
+ declare const SQL_EXPRESSION_DATA_TYPE_ID: DataTypeId;
7
+ declare const SQL_EXPRESSION_TAG = "sql";
8
+ /** The data type of a SQL expression in the target database's language. It declares no casts. The SQL family registers it. ADR 254. */
9
+ declare const sqlExpressionDataType: DataType;
10
+ /** PSL support for `sql/expression`. The SQL family registers it under `SQL_EXPRESSION_DATA_TYPE_ID`. */
11
+ declare const sqlExpressionAuthoringEntry: DataTypeAuthoringEntry;
12
+ interface SqlExpressionRegistration {
13
+ readonly dataTypes: readonly DataType[];
14
+ readonly authoring: {
15
+ readonly dataTypes: Readonly<Record<string, DataTypeAuthoringEntry>>;
16
+ };
17
+ }
18
+ /** The SQL family's registration of `sql/expression`, shaped as the family descriptor's `dataTypes` and `authoring.dataTypes`. */
19
+ declare const sqlExpressionRegistration: SqlExpressionRegistration;
20
+ /** The SQL text held by the stored form of a `sql/expression` value. */
21
+ declare function sqlTextFromStored(value: JsonValue): string;
22
+ /** The text a `sql` literal holding `text` reads back as, or `undefined` when `text` has a NUL character or is too large. */
23
+ declare function storedSqlText(text: string): string | undefined;
24
+ /**
25
+ * A `sql` literal holding `text`. Throws when the literal would read back as different text; check with `sqlTextsReadBack`
26
+ * first. The result of `storedSqlText` always reads back.
27
+ */
28
+ declare function printSqlExpressionLiteral(text: string): string;
29
+ /** Whether every present text reads back unchanged when printed as a `sql` literal. */
30
+ declare function sqlTextsReadBack(texts: readonly (string | undefined)[]): boolean;
31
+ /**
32
+ * Throws when a data type declares a cast or a list cast from `sql/expression`. A `sql` literal is
33
+ * SQL the database runs, so a cast would turn it into a value of another type with no diagnostic.
34
+ * ADR 254.
35
+ */
36
+ declare function assertNothingCastsFromSqlExpression(declaredDataTypes: ReadonlyArray<{
37
+ readonly type: DataType;
38
+ readonly contributedBy: string;
39
+ }>): void;
40
+ declare const SQL_EXPRESSION_MARKER: unique symbol;
41
+ /** A value of the data type `sql/expression` in TypeScript. Its text is always canonical. */
42
+ declare class SqlExpression {
43
+ readonly [SQL_EXPRESSION_MARKER]: true;
44
+ readonly text: string;
45
+ /** Canonicalizes `text` as a PSL `sql` literal's text is canonicalized. Throws CONTRACT.SQL_EXPRESSION_INVALID on NUL or oversize text. */
46
+ constructor(text: string);
47
+ }
48
+ /** Whether `value` is a `sql` value, made by this copy of the package or by another one. */
49
+ declare function isSqlExpression(value: unknown): value is SqlExpression;
50
+ /**
51
+ * This copy's `SqlExpression` for `value`: the value itself when this copy made it, a new one built
52
+ * from the text of a `sql` value another copy made, so that text is canonicalized here too, or
53
+ * `undefined` for anything else.
54
+ */
55
+ declare function readSqlExpression(value: unknown): SqlExpression | undefined;
56
+ /** Raw SQL written as a template literal: `` sql`"userId" = auth.uid()` ``. Other `sql` values may be interpolated; each later line of one takes the indentation of the template line it sits on. */
57
+ declare function sql(strings: TemplateStringsArray, ...values: readonly SqlExpression[]): SqlExpression;
58
+ /** Reads `value` with `readSqlExpression`; throws for anything that is not a `sql` value. For callers that JavaScript cannot type-check. */
59
+ declare function requireSqlExpression(value: unknown, what: string): SqlExpression;
60
+ //#endregion
61
+ export { assertNothingCastsFromSqlExpression as a, readSqlExpression as c, sqlExpressionAuthoringEntry as d, sqlExpressionDataType as f, storedSqlText as g, sqlTextsReadBack as h, SqlExpressionRegistration as i, requireSqlExpression as l, sqlTextFromStored as m, SQL_EXPRESSION_TAG as n, isSqlExpression as o, sqlExpressionRegistration as p, SqlExpression as r, printSqlExpressionLiteral as s, SQL_EXPRESSION_DATA_TYPE_ID as t, sql as u };
62
+ //# sourceMappingURL=sql-expression-B4BrhGPi.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-expression-B4BrhGPi.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/sql-expression.d.mts"],"mappings":";;;;;cAIc,6BAA6B;cAC7B;;cAEA,uBAAuB;;cAEvB,6BAA6B;UACjC;WACC,oBAAoB;WACpB;aACE,WAAW,SAAS,eAAe;;;;cAIlC,2BAA2B;;iBAExB,kBAAkB,OAAO;;iBAEzB,cAAc;;;;;iBAKd,0BAA0B;;iBAE1B,iBAAiB;;;;;;iBAMjB,oCAAoC,mBAAmB;WAC7D,MAAM;WACN;;cAEG;;cAEA;YACF;WACD;;EAET,YAAY;;;iBAGG,gBAAgB,iBAAiB,SAAS;;;;;;iBAM1C,kBAAkB,iBAAiB;;iBAEnC,IAAI,SAAS,yBAAyB,iBAAiB,kBAAkB;;iBAEzE,qBAAqB,gBAAgB,eAAe"}