@prisma/orm-family-sql 8.0.0-rc.21-dev.5 → 8.0.0-rc.21-dev.7

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 (337) hide show
  1. package/dist/{ast-DcphKbq9.d.mts → ast-1JRQY-dP.d.mts} +10 -4
  2. package/dist/ast-1JRQY-dP.d.mts.map +1 -0
  3. package/dist/{ast-e_02t9Nt.mjs → ast-C3itulLi.mjs} +7 -1
  4. package/dist/ast-C3itulLi.mjs.map +1 -0
  5. package/dist/{attribute-specs-Dcd2ZUrY.d.mts → attribute-specs-DDpSUaG9.d.mts} +3 -3
  6. package/dist/{attribute-specs-Dcd2ZUrY.d.mts.map → attribute-specs-DDpSUaG9.d.mts.map} +1 -1
  7. package/dist/{authored-check-naming-D-o196ry.d.mts → authored-check-naming-BiSwtSFu.d.mts} +2 -2
  8. package/dist/{authored-check-naming-D-o196ry.d.mts.map → authored-check-naming-BiSwtSFu.d.mts.map} +1 -1
  9. package/dist/{authored-check-naming-BHGJhjqn.mjs → authored-check-naming-DTKcH2_d.mjs} +3 -3
  10. package/dist/{authored-check-naming-BHGJhjqn.mjs.map → authored-check-naming-DTKcH2_d.mjs.map} +1 -1
  11. package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts} +2 -2
  12. package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts.map → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts.map} +1 -1
  13. package/dist/builder.d.mts +3 -3
  14. package/dist/builder__runtime.d.mts +10 -10
  15. package/dist/builder__runtime.mjs +4 -4
  16. package/dist/builder__types.d.mts +5 -5
  17. package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts → check-constraint-B7qGu6rc-D5kVe9je.d.mts} +2 -2
  18. package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts.map → check-constraint-B7qGu6rc-D5kVe9je.d.mts.map} +1 -1
  19. package/dist/check-expressions-BDsLvzqN.mjs +108 -0
  20. package/dist/check-expressions-BDsLvzqN.mjs.map +1 -0
  21. package/dist/check-expressions-DuWjvG4h.d.mts +82 -0
  22. package/dist/check-expressions-DuWjvG4h.d.mts.map +1 -0
  23. package/dist/{codec-descriptor-registry-CiiFzMtb.mjs → codec-descriptor-registry-UiFDvDj4.mjs} +2 -2
  24. package/dist/{codec-descriptor-registry-CiiFzMtb.mjs.map → codec-descriptor-registry-UiFDvDj4.mjs.map} +1 -1
  25. package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts +13 -0
  26. package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts.map +1 -0
  27. package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs +21 -0
  28. package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs.map +1 -0
  29. package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts → collection-methods-D9CYfePl-BGvD1h9Z.d.mts} +4 -4
  30. package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts.map → collection-methods-D9CYfePl-BGvD1h9Z.d.mts.map} +1 -1
  31. package/dist/collection-methods-mo-2RjdX.d.mts +1 -0
  32. package/dist/{config-types-DkEeq_qq.mjs → config-types-BCXwEBZH.mjs} +2 -2
  33. package/dist/{config-types-DkEeq_qq.mjs.map → config-types-BCXwEBZH.mjs.map} +1 -1
  34. package/dist/{config-types-C-1mIiJO.d.mts → config-types-Ce1tAJ0B.d.mts} +4 -4
  35. package/dist/{config-types-C-1mIiJO.d.mts.map → config-types-Ce1tAJ0B.d.mts.map} +1 -1
  36. package/dist/{contract-builder-DMNe_jX9.mjs → contract-builder-D50r41BU.mjs} +114 -49
  37. package/dist/contract-builder-D50r41BU.mjs.map +1 -0
  38. package/dist/{contract-builder-B-Q9T1CO.d.mts → contract-builder-D6JuOGA6.d.mts} +58 -13
  39. package/dist/contract-builder-D6JuOGA6.d.mts.map +1 -0
  40. package/dist/contract-emitter.d.mts +1 -1
  41. package/dist/contract-emitter.mjs +1 -1
  42. package/dist/contract-prisma7__provider.d.mts +5 -3
  43. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  44. package/dist/contract-prisma7__provider.mjs +62 -26
  45. package/dist/contract-prisma7__provider.mjs.map +1 -1
  46. package/dist/contract-psl.d.mts +4 -4
  47. package/dist/contract-psl.mjs +1 -1
  48. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  49. package/dist/contract-psl__attribute-specs.mjs +1 -1
  50. package/dist/contract-psl__diagnostics.mjs +1 -1
  51. package/dist/contract-psl__provider.d.mts +2 -2
  52. package/dist/contract-psl__provider.mjs +3 -3
  53. package/dist/contract-psl__provider.mjs.map +1 -1
  54. package/dist/contract-ts.d.mts +4 -4
  55. package/dist/contract-ts.mjs +3 -3
  56. package/dist/contract-ts__config-types.d.mts +1 -1
  57. package/dist/contract-ts__config-types.mjs +1 -1
  58. package/dist/contract-ts__contract-builder.d.mts +3 -3
  59. package/dist/contract-ts__contract-builder.mjs +2 -2
  60. package/dist/{contract-view-DqpzeYeE.mjs → contract-view-CcD3axo0.mjs} +6 -2
  61. package/dist/contract-view-CcD3axo0.mjs.map +1 -0
  62. package/dist/{contract-view-DuB35or0.d.mts → contract-view-DkIZrHyj.d.mts} +3 -3
  63. package/dist/{contract-view-DuB35or0.d.mts.map → contract-view-DkIZrHyj.d.mts.map} +1 -1
  64. package/dist/contract.d.mts +21 -19
  65. package/dist/contract.mjs +18 -14
  66. package/dist/contract__authored-check-naming.d.mts +1 -1
  67. package/dist/contract__authored-check-naming.mjs +1 -1
  68. package/dist/contract__check-expressions.d.mts +2 -0
  69. package/dist/contract__check-expressions.mjs +2 -0
  70. package/dist/contract__codec-json-type.d.mts +2 -0
  71. package/dist/contract__codec-json-type.mjs +2 -0
  72. package/dist/contract__contract-view.d.mts +1 -1
  73. package/dist/contract__contract-view.mjs +1 -1
  74. package/dist/contract__data-type.d.mts +2 -2
  75. package/dist/contract__data-type.mjs +2 -2
  76. package/dist/contract__entity-kinds.d.mts +2 -2
  77. package/dist/contract__entity-kinds.mjs +2 -2
  78. package/dist/contract__factories.d.mts +1 -1
  79. package/dist/contract__factories.mjs +1 -1
  80. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  81. package/dist/contract__foreign-key-materialization.mjs +2 -2
  82. package/dist/contract__index-naming.d.mts +1 -1
  83. package/dist/contract__index-naming.mjs +1 -1
  84. package/dist/contract__index-type-validation.d.mts +1 -1
  85. package/dist/contract__resolve-storage-table.d.mts +1 -1
  86. package/dist/contract__sql-expression.d.mts +1 -1
  87. package/dist/contract__types.d.mts +8 -8
  88. package/dist/contract__types.mjs +6 -4
  89. package/dist/contract__validators.d.mts +1 -1
  90. package/dist/contract__validators.mjs +2 -2
  91. package/dist/{control-B6W_VEZ9.d.mts → control-BE7gXqZF.d.mts} +18 -18
  92. package/dist/{control-B6W_VEZ9.d.mts.map → control-BE7gXqZF.d.mts.map} +1 -1
  93. package/dist/{control-D6wIw5Fi.mjs → control-DPCrkpMS.mjs} +16 -17
  94. package/dist/control-DPCrkpMS.mjs.map +1 -0
  95. package/dist/{control-adapter-SlQkTEwT.mjs → control-adapter-BetaUm2y.mjs} +2 -2
  96. package/dist/{control-adapter-SlQkTEwT.mjs.map → control-adapter-BetaUm2y.mjs.map} +1 -1
  97. package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts → control-adapter-BfyLe7rh-CiGzw3dq.d.mts} +8 -8
  98. package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts.map → control-adapter-BfyLe7rh-CiGzw3dq.d.mts.map} +1 -1
  99. package/dist/{control-adapter-CZ84jQ_z.d.mts → control-adapter-BlBhW0pc.d.mts} +4 -4
  100. package/dist/{control-adapter-CZ84jQ_z.d.mts.map → control-adapter-BlBhW0pc.d.mts.map} +1 -1
  101. package/dist/{data-type-DJIvKQHf.d.mts → data-type-B-Do6RMA.d.mts} +15 -7
  102. package/dist/data-type-B-Do6RMA.d.mts.map +1 -0
  103. package/dist/{data-type-BFSpaotu.mjs → data-type-BfA5F0Qf.mjs} +2 -2
  104. package/dist/{data-type-BFSpaotu.mjs.map → data-type-BfA5F0Qf.mjs.map} +1 -1
  105. package/dist/{db-D1d75IvM-D5CqruQz.d.mts → db-D1d75IvM-C1lqD6a2.d.mts} +13 -13
  106. package/dist/{db-D1d75IvM-D5CqruQz.d.mts.map → db-D1d75IvM-C1lqD6a2.d.mts.map} +1 -1
  107. package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts → ddl-types-BeA1kjV1-BUcW52Dx.d.mts} +3 -3
  108. package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts.map → ddl-types-BeA1kjV1-BUcW52Dx.d.mts.map} +1 -1
  109. package/dist/{default-mapping-CAOONlKQ-4m07nb-O.d.mts → default-mapping-CEISdj2g-B50Ag_F_.d.mts} +5 -11
  110. package/dist/default-mapping-CEISdj2g-B50Ag_F_.d.mts.map +1 -0
  111. package/dist/{derived-checks-D5HVRvqN-BJx1gwPA.mjs → derived-checks-D__agoFB-Boa1MHcA.mjs} +156 -40
  112. package/dist/derived-checks-D__agoFB-Boa1MHcA.mjs.map +1 -0
  113. package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts → derived-checks-DpPkO6Dt-CQIM17j5.d.mts} +3 -3
  114. package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts.map → derived-checks-DpPkO6Dt-CQIM17j5.d.mts.map} +1 -1
  115. package/dist/{diagnostics-C7jR1Jyf.mjs → diagnostics-CoM0OFuR.mjs} +40 -30
  116. package/dist/diagnostics-CoM0OFuR.mjs.map +1 -0
  117. package/dist/{diff-FNTO8gbI.d.mts → diff-BlX_rfVG.d.mts} +7 -7
  118. package/dist/{diff-FNTO8gbI.d.mts.map → diff-BlX_rfVG.d.mts.map} +1 -1
  119. package/dist/{dist-C8Y-PPuE.mjs → dist-BJjqJT_M.mjs} +5 -3
  120. package/dist/dist-BJjqJT_M.mjs.map +1 -0
  121. package/dist/{entity-kinds-JR5SAm5h-DOH6VUtL.mjs → entity-kinds-CgEwK0hH-D1NKoKE5.mjs} +25 -7
  122. package/dist/entity-kinds-CgEwK0hH-D1NKoKE5.mjs.map +1 -0
  123. package/dist/{entity-kinds-BPG2xCZV.d.mts → entity-kinds-oN1yn4vw.d.mts} +8 -7
  124. package/dist/{entity-kinds-BPG2xCZV.d.mts.map → entity-kinds-oN1yn4vw.d.mts.map} +1 -1
  125. package/dist/{exports-CGzFaakG-Dddm8emA.mjs → exports-CGzFaakG-4Aw50nT1.mjs} +3 -3
  126. package/dist/{exports-CGzFaakG-Dddm8emA.mjs.map → exports-CGzFaakG-4Aw50nT1.mjs.map} +1 -1
  127. package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts → expression-BWRsWR6O-HbWL9x9D.d.mts} +3 -3
  128. package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts.map → expression-BWRsWR6O-HbWL9x9D.d.mts.map} +1 -1
  129. package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts → expression-C3F6gxZH-EOb5cRCY.d.mts} +7 -7
  130. package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts.map → expression-C3F6gxZH-EOb5cRCY.d.mts.map} +1 -1
  131. package/dist/expression-OVCWlXHm.d.mts +2 -0
  132. package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs → expression-impl-DtbmFnnz-Dal0IYDE.mjs} +2 -2
  133. package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs.map → expression-impl-DtbmFnnz-Dal0IYDE.mjs.map} +1 -1
  134. package/dist/{factories-Crobuxwn.mjs → factories-B2hKDIzy.mjs} +3 -3
  135. package/dist/{factories-Crobuxwn.mjs.map → factories-B2hKDIzy.mjs.map} +1 -1
  136. package/dist/{factories-DbNP9qfs.d.mts → factories-DVgCG7DR.d.mts} +4 -4
  137. package/dist/{factories-DbNP9qfs.d.mts.map → factories-DVgCG7DR.d.mts.map} +1 -1
  138. package/dist/family.d.mts +16 -16
  139. package/dist/family.mjs +10 -10
  140. package/dist/family__control-adapter.d.mts +2 -2
  141. package/dist/family__control-adapter.mjs +1 -1
  142. package/dist/family__control.d.mts +4 -4
  143. package/dist/family__control.mjs +3 -3
  144. package/dist/family__diff.d.mts +1 -1
  145. package/dist/family__diff.mjs +1 -1
  146. package/dist/family__ir.d.mts +1 -1
  147. package/dist/family__ir.mjs +1 -1
  148. package/dist/family__migration.d.mts +1 -1
  149. package/dist/family__pack.d.mts +1 -1
  150. package/dist/family__pack.mjs +2 -2
  151. package/dist/family__psl-build.d.mts +3 -3
  152. package/dist/family__psl-build.mjs +2 -2
  153. package/dist/family__psl-infer.d.mts +1 -1
  154. package/dist/family__psl-infer.mjs +1 -1
  155. package/dist/family__runtime.d.mts +2 -2
  156. package/dist/family__runtime.mjs +1 -1
  157. package/dist/{foreign-key-materialization-48P2V8on.d.mts → foreign-key-materialization-C53nVQuD.d.mts} +4 -4
  158. package/dist/{foreign-key-materialization-48P2V8on.d.mts.map → foreign-key-materialization-C53nVQuD.d.mts.map} +1 -1
  159. package/dist/{foreign-key-materialization-BM59w_Xg.mjs → foreign-key-materialization-CCHAR789.mjs} +5 -5
  160. package/dist/{foreign-key-materialization-BM59w_Xg.mjs.map → foreign-key-materialization-CCHAR789.mjs.map} +1 -1
  161. package/dist/{functions-D7lN5-JU.mjs → functions-DO1k8KLB.mjs} +2 -2
  162. package/dist/{functions-D7lN5-JU.mjs.map → functions-DO1k8KLB.mjs.map} +1 -1
  163. package/dist/{functions-CQrsCHCj.d.mts → functions-PBSwFhni.d.mts} +6 -6
  164. package/dist/{functions-CQrsCHCj.d.mts.map → functions-PBSwFhni.d.mts.map} +1 -1
  165. package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs → generator-functions-Hy4pDDr9-CMfJOBtv.mjs} +3 -3
  166. package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs.map → generator-functions-Hy4pDDr9-CMfJOBtv.mjs.map} +1 -1
  167. package/dist/{index-0qfR8_db.d.mts → index-BAI1gH-I.d.mts} +21 -21
  168. package/dist/{index-0qfR8_db.d.mts.map → index-BAI1gH-I.d.mts.map} +1 -1
  169. package/dist/{index-Nqc3OHR_.d.mts → index-BWWwt5hB.d.mts} +3 -3
  170. package/dist/{index-Nqc3OHR_.d.mts.map → index-BWWwt5hB.d.mts.map} +1 -1
  171. package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs → index-equivalence-DswCiq5l-9GNm8oG9.mjs} +2 -2
  172. package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs.map → index-equivalence-DswCiq5l-9GNm8oG9.mjs.map} +1 -1
  173. package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs → index-naming-BOcJT1B3-D-49owHA.mjs} +2 -2
  174. package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs.map → index-naming-BOcJT1B3-D-49owHA.mjs.map} +1 -1
  175. package/dist/{index-naming-Cs6wwia3.d.mts → index-naming-DqjO4p5R.d.mts} +2 -2
  176. package/dist/{index-naming-Cs6wwia3.d.mts.map → index-naming-DqjO4p5R.d.mts.map} +1 -1
  177. package/dist/index-reference-D3p5ziNG.d.mts +1 -0
  178. package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts → index-reference-YHvh6wAL-BupQRpkE.d.mts} +4 -4
  179. package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts.map → index-reference-YHvh6wAL-BupQRpkE.d.mts.map} +1 -1
  180. package/dist/{index-type-validation-fGGwAHWc.d.mts → index-type-validation-BFJlwjWi.d.mts} +3 -3
  181. package/dist/{index-type-validation-fGGwAHWc.d.mts.map → index-type-validation-BFJlwjWi.d.mts.map} +1 -1
  182. package/dist/{interpreter-CS21wD1i-G0u1x8t_.mjs → interpreter-ChvVEijY-FeJngsog.mjs} +92 -45
  183. package/dist/interpreter-ChvVEijY-FeJngsog.mjs.map +1 -0
  184. package/dist/{ir-BvptQsFW.d.mts → ir-CZ5Ks7EA.d.mts} +4 -4
  185. package/dist/{ir-BvptQsFW.d.mts.map → ir-CZ5Ks7EA.d.mts.map} +1 -1
  186. package/dist/middleware-Dp3CD7yZ.d.mts +1 -0
  187. package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts → middleware-JfHt_Ax8-rWWdDxnq.d.mts} +2 -2
  188. package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts.map → middleware-JfHt_Ax8-rWWdDxnq.d.mts.map} +1 -1
  189. package/dist/{migration-qalbcIUs.d.mts → migration-B35kGD-7.d.mts} +4 -4
  190. package/dist/{migration-qalbcIUs.d.mts.map → migration-B35kGD-7.d.mts.map} +1 -1
  191. package/dist/{naming-BcD36g9T-Mfe_xGGL.d.mts → naming-CLfASFf7-HRjmKe43.d.mts} +9 -4
  192. package/dist/naming-CLfASFf7-HRjmKe43.d.mts.map +1 -0
  193. package/dist/{naming-bM5qm5PY-jOg3JFMb.mjs → naming-DEpT6Zad-C9PFkWt6.mjs} +5 -4
  194. package/dist/naming-DEpT6Zad-C9PFkWt6.mjs.map +1 -0
  195. package/dist/operations.d.mts +1 -1
  196. package/dist/orm-client.d.mts +22 -22
  197. package/dist/orm-client.mjs +7 -7
  198. package/dist/{pack-Cap3oVPy.d.mts → pack-DKM1hv1E.d.mts} +4 -4
  199. package/dist/{pack-Cap3oVPy.d.mts.map → pack-DKM1hv1E.d.mts.map} +1 -1
  200. package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts → plan-CMqVpPq6-Aoza6Dp2.d.mts} +4 -4
  201. package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts.map → plan-CMqVpPq6-Aoza6Dp2.d.mts.map} +1 -1
  202. package/dist/plan-DINEcqC1.d.mts +2 -0
  203. package/dist/psl-build-BA0Ndi1v.mjs +268 -0
  204. package/dist/psl-build-BA0Ndi1v.mjs.map +1 -0
  205. package/dist/{psl-build-RelubU2E.d.mts → psl-build-DCZaF5g4.d.mts} +47 -18
  206. package/dist/psl-build-DCZaF5g4.d.mts.map +1 -0
  207. package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts} +3 -3
  208. package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts.map → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts.map} +1 -1
  209. package/dist/{psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs → psl-field-resolution-BW2_FOb9-DxqR43fo.mjs} +68 -38
  210. package/dist/psl-field-resolution-BW2_FOb9-DxqR43fo.mjs.map +1 -0
  211. package/dist/{psl-infer--g4i84Go.mjs → psl-infer-C9kVS9ma.mjs} +2 -2
  212. package/dist/{psl-infer--g4i84Go.mjs.map → psl-infer-C9kVS9ma.mjs.map} +1 -1
  213. package/dist/{psl-infer-DzoxPZGd.d.mts → psl-infer-Cr9AeccU.d.mts} +4 -4
  214. package/dist/{psl-infer-DzoxPZGd.d.mts.map → psl-infer-Cr9AeccU.d.mts.map} +1 -1
  215. package/dist/query-lane-context-DL6bwl6k.d.mts +1 -0
  216. package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts → query-lane-context-DLSXDsDK-CGSahS15.d.mts} +8 -8
  217. package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts.map → query-lane-context-DLSXDsDK-CGSahS15.d.mts.map} +1 -1
  218. package/dist/relational-core.d.mts +12 -12
  219. package/dist/relational-core.mjs +2 -2
  220. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  221. package/dist/relational-core__ast.d.mts +3 -3
  222. package/dist/relational-core__ast.mjs +1 -1
  223. package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
  224. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  225. package/dist/relational-core__collection-methods.d.mts +2 -2
  226. package/dist/relational-core__contract-free.d.mts +4 -4
  227. package/dist/relational-core__expression.d.mts +3 -3
  228. package/dist/relational-core__expression.mjs +1 -1
  229. package/dist/relational-core__functions.d.mts +1 -1
  230. package/dist/relational-core__functions.mjs +1 -1
  231. package/dist/relational-core__index-reference.d.mts +2 -2
  232. package/dist/relational-core__middleware.d.mts +2 -2
  233. package/dist/relational-core__plan.d.mts +3 -3
  234. package/dist/relational-core__query-lane-context.d.mts +2 -2
  235. package/dist/relational-core__types.d.mts +2 -2
  236. package/dist/{resolve-storage-table-DCqtmnSU.d.mts → resolve-storage-table-D1rXCcCk.d.mts} +3 -3
  237. package/dist/{resolve-storage-table-DCqtmnSU.d.mts.map → resolve-storage-table-D1rXCcCk.d.mts.map} +1 -1
  238. package/dist/{runtime-JKWb27L5.d.mts → runtime-CSDcwOEG.d.mts} +5 -4
  239. package/dist/{runtime-JKWb27L5.d.mts.map → runtime-CSDcwOEG.d.mts.map} +1 -1
  240. package/dist/{runtime-CCzfa1mY.mjs → runtime-DkUiQi00.mjs} +12 -4
  241. package/dist/runtime-DkUiQi00.mjs.map +1 -0
  242. package/dist/runtime.d.mts +4 -4
  243. package/dist/runtime.mjs +1 -1
  244. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  245. package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts → schema-differ-DmP74bB8-BXkhxcPs.d.mts} +5 -5
  246. package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts.map → schema-differ-DmP74bB8-BXkhxcPs.d.mts.map} +1 -1
  247. package/dist/schema-ir.d.mts +1 -1
  248. package/dist/schema-ir.mjs +1 -1
  249. package/dist/schema-ir__naming.d.mts +2 -2
  250. package/dist/schema-ir__naming.mjs +2 -2
  251. package/dist/schema-ir__types.d.mts +2 -2
  252. package/dist/schema-ir__types.mjs +1 -1
  253. package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs → schema-verify-C3wbdviw-nQ4tG9N7.mjs} +4 -4
  254. package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs.map → schema-verify-C3wbdviw-nQ4tG9N7.mjs.map} +1 -1
  255. package/dist/{serialized-index-DjCCnXB1-DMA7BtO2.mjs → serialized-index-BefvjuZ0-Bbsja7If.mjs} +14 -27
  256. package/dist/serialized-index-BefvjuZ0-Bbsja7If.mjs.map +1 -0
  257. package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts → serialized-index-CrgG8ct1-Duy5-kFV.d.mts} +3 -3
  258. package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts.map → serialized-index-CrgG8ct1-Duy5-kFV.d.mts.map} +1 -1
  259. package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs} +4 -4
  260. package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs.map} +1 -1
  261. package/dist/{sql-data-type-D7M-YTTY-D2vRqDxn.mjs → sql-data-type-LVBldu1a-Bq203xWX.mjs} +13 -7
  262. package/dist/sql-data-type-LVBldu1a-Bq203xWX.mjs.map +1 -0
  263. package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts} +2 -2
  264. package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts.map → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts.map} +1 -1
  265. package/dist/{sql-expression-B4BrhGPi.d.mts → sql-expression-1yO8GiBc.d.mts} +2 -2
  266. package/dist/{sql-expression-B4BrhGPi.d.mts.map → sql-expression-1yO8GiBc.d.mts.map} +1 -1
  267. package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts → sql-index-ByAAE7K8-4TUFKGLK.d.mts} +2 -2
  268. package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts.map → sql-index-ByAAE7K8-4TUFKGLK.d.mts.map} +1 -1
  269. package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs +50 -0
  270. package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs.map +1 -0
  271. package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts → sql-storage-B_AM6tU1-BOPQxXo7.d.mts} +6 -5
  272. package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map → sql-storage-B_AM6tU1-BOPQxXo7.d.mts.map} +1 -1
  273. package/dist/{storage-table-DDvN83mw-DkbBFmK9.mjs → storage-table-B_MrLtQX-eWx6BgGT.mjs} +7 -50
  274. package/dist/storage-table-B_MrLtQX-eWx6BgGT.mjs.map +1 -0
  275. package/dist/{storage-table-Bf1ZjnxO-pUj6pyP0.d.mts → storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts} +23 -6
  276. package/dist/storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts.map +1 -0
  277. package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs +38 -0
  278. package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs.map +1 -0
  279. package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts → transaction-state-DR3nKTmH-C3wq6dCB.d.mts} +9 -9
  280. package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts.map → transaction-state-DR3nKTmH-C3wq6dCB.d.mts.map} +1 -1
  281. package/dist/{types-DoyiTsjg-2YMhMJDA.mjs → types-1ZKE0deC-Dou4ugcz.mjs} +3 -3
  282. package/dist/{types-DoyiTsjg-2YMhMJDA.mjs.map → types-1ZKE0deC-Dou4ugcz.mjs.map} +1 -1
  283. package/dist/types-B-dwfOwQ.d.mts +1 -0
  284. package/dist/{types-CTdSkl0s.mjs → types-CISwoRED.mjs} +2 -2
  285. package/dist/types-CISwoRED.mjs.map +1 -0
  286. package/dist/{types-COXfSNOP-DcuULeD9.d.mts → types-COXfSNOP-D9vt9QDL.d.mts} +9 -9
  287. package/dist/{types-COXfSNOP-DcuULeD9.d.mts.map → types-COXfSNOP-D9vt9QDL.d.mts.map} +1 -1
  288. package/dist/{types-CkAd8SWm.d.mts → types-CXRxo_TK.d.mts} +7 -7
  289. package/dist/{types-CkAd8SWm.d.mts.map → types-CXRxo_TK.d.mts.map} +1 -1
  290. package/dist/types-DIoM5Ft3.d.mts +1 -0
  291. package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts → types-DNTLudNR-DiVulPhL.d.mts} +7 -7
  292. package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts.map → types-DNTLudNR-DiVulPhL.d.mts.map} +1 -1
  293. package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts → types-NgqqVAo5-CJG02ILZ.d.mts} +10 -10
  294. package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts.map → types-NgqqVAo5-CJG02ILZ.d.mts.map} +1 -1
  295. package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts → types-fmtEmvj3-B0fQaVes.d.mts} +4 -4
  296. package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts.map → types-fmtEmvj3-B0fQaVes.d.mts.map} +1 -1
  297. package/dist/{types-ijhejJhK-EdACW3bY.d.mts → types-ijhejJhK-BqfwP5Cc.d.mts} +2 -2
  298. package/dist/{types-ijhejJhK-EdACW3bY.d.mts.map → types-ijhejJhK-BqfwP5Cc.d.mts.map} +1 -1
  299. package/dist/{validators-FJs8HvFr.d.mts → validators-Dt-19ywK.d.mts} +4 -4
  300. package/dist/{validators-FJs8HvFr.d.mts.map → validators-Dt-19ywK.d.mts.map} +1 -1
  301. package/dist/{validators-BwA7ttZM.mjs → validators-qcQteqs2.mjs} +30 -31
  302. package/dist/validators-qcQteqs2.mjs.map +1 -0
  303. package/package.json +20 -18
  304. package/dist/ast-DcphKbq9.d.mts.map +0 -1
  305. package/dist/ast-e_02t9Nt.mjs.map +0 -1
  306. package/dist/collection-methods-FWiYjZ5j.d.mts +0 -1
  307. package/dist/contract-builder-B-Q9T1CO.d.mts.map +0 -1
  308. package/dist/contract-builder-DMNe_jX9.mjs.map +0 -1
  309. package/dist/contract-view-DqpzeYeE.mjs.map +0 -1
  310. package/dist/control-D6wIw5Fi.mjs.map +0 -1
  311. package/dist/data-type-DJIvKQHf.d.mts.map +0 -1
  312. package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts.map +0 -1
  313. package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +0 -1
  314. package/dist/diagnostics-C7jR1Jyf.mjs.map +0 -1
  315. package/dist/dist-C8Y-PPuE.mjs.map +0 -1
  316. package/dist/entity-kinds-JR5SAm5h-DOH6VUtL.mjs.map +0 -1
  317. package/dist/expression-CQHy0GY7.d.mts +0 -2
  318. package/dist/index-reference-BVkoanQn.d.mts +0 -1
  319. package/dist/interpreter-CS21wD1i-G0u1x8t_.mjs.map +0 -1
  320. package/dist/middleware-DYiOUIpn.d.mts +0 -1
  321. package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +0 -1
  322. package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +0 -1
  323. package/dist/plan-Cg0h96GD.d.mts +0 -2
  324. package/dist/psl-build-DqqYhOsa.mjs +0 -426
  325. package/dist/psl-build-DqqYhOsa.mjs.map +0 -1
  326. package/dist/psl-build-RelubU2E.d.mts.map +0 -1
  327. package/dist/psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs.map +0 -1
  328. package/dist/query-lane-context-Dqs5qCXx.d.mts +0 -1
  329. package/dist/runtime-CCzfa1mY.mjs.map +0 -1
  330. package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +0 -1
  331. package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +0 -1
  332. package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +0 -1
  333. package/dist/storage-table-DDvN83mw-DkbBFmK9.mjs.map +0 -1
  334. package/dist/types-CTdSkl0s.mjs.map +0 -1
  335. package/dist/types-CvmPNREJ.d.mts +0 -1
  336. package/dist/types-ljUNyiWe.d.mts +0 -1
  337. package/dist/validators-BwA7ttZM.mjs.map +0 -1
@@ -1,26 +1,26 @@
1
- import { t as StorageColumn } from "./storage-table-Bf1ZjnxO-pUj6pyP0.mjs";
2
- import { l as SqlStorage } from "./sql-storage-DeCAh5Hi-CEM-m8cs.mjs";
3
- import { D as QueryOperationTypesBase, d as ExtractAggregateTypes, f as ExtractCodecTypes, h as ExtractQueryOperationTypes, m as ExtractFieldOutputTypes, p as ExtractFieldInputTypes } from "./types-DfKvtJwS-CrpWTGBJ.mjs";
4
- import { n as HasExecutionCreateDefault, r as IsOptionalCreateColumn } from "./types-CkAd8SWm.mjs";
5
- import { Bt as TableSource, Ct as OrderByNulls, E as CodecRef$1, O as ColumnRef, St as OrderByItem, Ut as WhereArg, _ as BinaryExpr, a as AndExpr, c as AnyExpression, ct as LimitOffsetValue, dt as LockStrength, pt as LockingClause, r as AggregateFn, xt as OrExpr, yt as NullCheckExpr } from "./types-ijhejJhK-EdACW3bY.mjs";
6
- import { n as SqlQueryPlan, t as Preparable } from "./plan-CMqVpPq6-Bllx5Zpk.mjs";
7
- import { C as TraitExpression, g as RawSqlInterpolation, i as CodecTypesBase, o as Expression, r as CodecExpression } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
8
- import "./expression-CQHy0GY7.mjs";
9
- import { n as BuiltinFunctions, t as BooleanCodecType } from "./functions-CQrsCHCj.mjs";
10
- import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-DcphKbq9.mjs";
11
- import { r as TableIndexReferences, t as IndexReference } from "./index-reference-YHvh6wAL-BAhOS7RC.mjs";
12
- import "./index-reference-BVkoanQn.mjs";
13
- import "./plan-Cg0h96GD.mjs";
14
- import { c as CollectionMethodRegistry, r as CollectionMethodContributionId, u as ContributedMethodSignature } from "./collection-methods-D9CYfePl-DsDjYS6t.mjs";
15
- import { n as ExecutionContext } from "./query-lane-context-DLSXDsDK-pEiQmuYy.mjs";
16
- import "./query-lane-context-Dqs5qCXx.mjs";
17
- import { h as RuntimeScope, o as ComputeColumnJsType } from "./types-NgqqVAo5-Be_uYGQx.mjs";
18
- import "./types-CvmPNREJ.mjs";
19
- import { l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, t as BindSiteParams, u as PreparedStatement } from "./transaction-state-DR3nKTmH-BIKF_fP6.mjs";
20
- import "./collection-methods-FWiYjZ5j.mjs";
21
- import { K as Runtime, L as ActivitySourceTarget, Q as RuntimeQueryable$1 } from "./index-0qfR8_db.mjs";
22
- import { CodecDescriptorRef, ScalarFieldDeclarationBuilder } from "@prisma/orm-framework/components/codec";
1
+ import { t as StorageColumn } from "./storage-value-object-BcvIeUr8-DiiZNIrZ.mjs";
2
+ import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
3
+ import { D as QueryOperationTypesBase, d as ExtractAggregateTypes, f as ExtractCodecTypes, h as ExtractQueryOperationTypes, m as ExtractFieldOutputTypes, p as ExtractFieldInputTypes } from "./types-DNTLudNR-DiVulPhL.mjs";
4
+ import { n as HasExecutionCreateDefault, r as IsOptionalCreateColumn } from "./types-CXRxo_TK.mjs";
5
+ import { Bt as TableSource, Ct as OrderByNulls, E as CodecRef$1, O as ColumnRef, St as OrderByItem, Ut as WhereArg, _ as BinaryExpr, a as AndExpr, c as AnyExpression, ct as LimitOffsetValue, dt as LockStrength, pt as LockingClause, r as AggregateFn, xt as OrExpr, yt as NullCheckExpr } from "./types-ijhejJhK-BqfwP5Cc.mjs";
6
+ import { n as SqlQueryPlan, t as Preparable } from "./plan-CMqVpPq6-Aoza6Dp2.mjs";
7
+ import { C as TraitExpression, g as RawSqlInterpolation, i as CodecTypesBase, o as Expression, r as CodecExpression } from "./expression-C3F6gxZH-EOb5cRCY.mjs";
8
+ import "./expression-OVCWlXHm.mjs";
9
+ import { n as BuiltinFunctions, t as BooleanCodecType } from "./functions-PBSwFhni.mjs";
10
+ import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-1JRQY-dP.mjs";
11
+ import { r as TableIndexReferences, t as IndexReference } from "./index-reference-YHvh6wAL-BupQRpkE.mjs";
12
+ import "./index-reference-D3p5ziNG.mjs";
13
+ import "./plan-DINEcqC1.mjs";
14
+ import { c as CollectionMethodRegistry, r as CollectionMethodContributionId, u as ContributedMethodSignature } from "./collection-methods-D9CYfePl-BGvD1h9Z.mjs";
15
+ import { n as ExecutionContext } from "./query-lane-context-DLSXDsDK-CGSahS15.mjs";
16
+ import "./query-lane-context-DL6bwl6k.mjs";
17
+ import { h as RuntimeScope, o as ComputeColumnJsType } from "./types-NgqqVAo5-CJG02ILZ.mjs";
18
+ import "./types-DIoM5Ft3.mjs";
19
+ import { l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, t as BindSiteParams, u as PreparedStatement } from "./transaction-state-DR3nKTmH-C3wq6dCB.mjs";
20
+ import "./collection-methods-mo-2RjdX.mjs";
21
+ import { K as Runtime, L as ActivitySourceTarget, Q as RuntimeQueryable$1 } from "./index-BAI1gH-I.mjs";
23
22
  import { Contract } from "@prisma/orm-framework/contract/types";
23
+ import { CodecDescriptorRef, ScalarFieldDeclarationBuilder } from "@prisma/orm-framework/components/codec";
24
24
  import { AsyncIterableResult, MetaBuilder, ResultType, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
25
25
  import { SimplifyDeep } from "@prisma/orm-framework/utils/simplify-deep";
26
26
  //#region ../../../3-extensions/sql-orm-client/dist/index.d.mts
@@ -2,21 +2,21 @@ import { t as resolveStorageTable } from "./resolve-storage-table-BHLQsOza.mjs";
2
2
  import { i as isUniqueConstraintViolation } from "./dist-CB2NpcCs.mjs";
3
3
  import { A as ParamRef, C as LiteralExpr, E as NullCheckExpr, F as SelectAst, G as isOrderByNulls, I as SubqueryExpr, L as TableSource, M as ProjectionItem, O as OrExpr, R as UpdateAst, S as ListExpression, T as NotExpr, U as isAggregateFn, V as checkLimitOffset, W as isOrderByDirection, _ as InsertAst, b as JsonArrayAggExpr, c as DeleteAst, f as EqColJoinOn, k as OrderByItem, l as DerivedTableSource, n as AndExpr, o as ColumnRef, p as ExistsExpr, q as isWhereExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, v as InsertOnConflict, w as LockingClause, x as JsonObjectExpr, y as JoinAst, z as WindowFuncExpr } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
4
4
  import { t as collectOrderedParamRefs } from "./util-DixeJBri-Cad7x5ec.mjs";
5
- import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, O as missingCapability, T as lockOptionCapabilities, n as JsonDocumentProjection, r as NativeJsonValueProjection, t as CodecJsonValueProjection, w as lockIncompatible } from "./ast-e_02t9Nt.mjs";
6
- import { a as isExpression, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-CUKzBisY.mjs";
7
- import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-CiiFzMtb.mjs";
8
- import { t as createFunctions } from "./functions-D7lN5-JU.mjs";
5
+ import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, O as missingCapability, T as lockOptionCapabilities, n as JsonDocumentProjection, r as NativeJsonValueProjection, t as CodecJsonValueProjection, w as lockIncompatible } from "./ast-C3itulLi.mjs";
6
+ import { a as isExpression, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-Dal0IYDE.mjs";
7
+ import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-UiFDvDj4.mjs";
8
+ import { t as createFunctions } from "./functions-DO1k8KLB.mjs";
9
9
  import { t as createIndexReferences } from "./index-reference-BQSrkRfT.mjs";
10
10
  import { o as settlementOf } from "./transaction-state-BfXhs7D7-DhmbySW9.mjs";
11
- import { h as findActivitySource } from "./exports-CGzFaakG-Dddm8emA.mjs";
11
+ import { h as findActivitySource } from "./exports-CGzFaakG-4Aw50nT1.mjs";
12
12
  import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
13
13
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
14
+ import { domainModelsAtDefaultNamespace } from "@prisma/orm-framework/contract/types";
15
+ import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
14
16
  import { blindCast, castAs } from "@prisma/orm-framework/utils/casts";
15
17
  import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
16
- import { domainModelsAtDefaultNamespace } from "@prisma/orm-framework/contract/types";
17
18
  import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
18
19
  import { AsyncIterableResult, createMetaBuilder, isRuntimeError, runtimeError } from "@prisma/orm-framework/components/runtime";
19
- import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
20
20
  import { hashContent } from "@prisma/orm-framework/utils/hash-content";
21
21
  //#region ../../../3-extensions/sql-orm-client/dist/index.mjs
22
22
  const operationNamesByRegistry = /* @__PURE__ */ new WeakMap();
@@ -1,6 +1,6 @@
1
- import { r as SqlExpression } from "./sql-expression-B4BrhGPi.mjs";
2
- import { a as EnumMemberListDefault, i as EnumMemberDefault, n as DefaultFunctionCall, o as ParsedNullLiteral } from "./attribute-specs-Dcd2ZUrY.mjs";
3
- import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CgKIgWq5-CZK1F9a_.mjs";
1
+ import { r as SqlExpression } from "./sql-expression-1yO8GiBc.mjs";
2
+ import { a as EnumMemberListDefault, i as EnumMemberDefault, n as DefaultFunctionCall, o as ParsedNullLiteral } from "./attribute-specs-DDpSUaG9.mjs";
3
+ import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CgKIgWq5-BqRjoPFF.mjs";
4
4
  import { DataTypeSupport } from "@prisma/orm-framework/components/authoring";
5
5
  import { DataTypeId } from "@prisma/orm-framework/components/codec";
6
6
  import { GeneratorFunctionContribution } from "@prisma/orm-framework/components/components";
@@ -321,4 +321,4 @@ declare const sqlFamilyPack: typeof sqlFamilyPackBase & {
321
321
  };
322
322
  //#endregion
323
323
  export { sqlTargetTypeConstructors as i, sqlFamilyPack as n, sqlIntegerArgumentGeneratorFunctions as r, idGeneratorFunctionBindings as t };
324
- //# sourceMappingURL=pack-Cap3oVPy.d.mts.map
324
+ //# sourceMappingURL=pack-DKM1hv1E.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pack-Cap3oVPy.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/pack.d.mts"],"mappings":";;;;;;;;;;;;iBAUiB,gCAAgC,yBAAyB;WAC/D,UAAU;;WAEV;aACE;eACE;eACA;eACA;iBACE;iBACA,UAAU;iBACV;;eAEF;iBACE;iBACA;mBACE;qBACE;qBACA;;;;;aAKR;eACE;eACA;eACA;iBACE;iBACA,UAAU;iBACV;;eAEF;iBACE;iBACA;mBACE;qBACE;qBACA;;;;;;;;;;iBAUJ,4BAA4B;WAClC;WACA;aACE;;;;iBAII,uCAAuC;WAC7C,SAAS;;WAET;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,qCAAqC,uBAAuB,cAAc,eAAe;eACzF;;;WAGJ;;WAEA;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,MAAM,WAAW;eACjB;;;WAGJ;;WAEA;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,qCAAqC,wBAAwB,cAAc,gBAAgB;eAC3F;;;WAGJ;;;;cAIG;WACH;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;;;aAOZ,WAAW,SAAS,kEAAkE;aACtF,gEAAgE;aAChE;eACE;QACP;QACA;QACA;QACA;QACA;UACE;;QAEF,aAAa;QACb;UACE,2CAA2C;YACzC;4CACgC;;;;aAI/B;eACE;iBACE,MAAM,qCAAqC,wDAAwD;UAC1G;0CACgC;iBACzB,KAAK,qCAAqC,wDAAwD;UACzG;mBACS;0CACuB;iBACzB,SAAS,qCAAqC,wDAAwD;UAC7G;mBACS;0CACuB;iBACzB,QAAQ,oCAAoC,wDAAwD;UAC3G;mBACS,4CAA4C;mBAC5C,uCAAuC;mBACvC;mBACA;mBACA;mBACA;mBACA,UAAU;0CACa;iBACzB,QAAQ,oCAAoC,wDAAwD;mBAClG,2CAA2C;mBAC3C;mBACA;0CACuB;iBACzB,UAAU,qCAAqC,wDAAwD;UAC9G;0CACgC;iBACzB,gBAAgB,qCAAqC,wDAAwD;UACpH;0CACgC;iBACzB,OAAO,qCAAqC,wDAAwD;UAC3G,qCAAqC,uDAAuD;UAC5F,sCAAsC;0CACN;;eAE3B;iBACE,MAAM,qCAAqC,6DAA6D;UAC/G;0CACgC;iBACzB,KAAK,qCAAqC,6DAA6D;mBACrG;0CACuB;iBACzB,SAAS,qCAAqC,6DAA6D;mBACzG;0CACuB;iBACzB,WAAW,qCAAqC,6DAA6D;UACpH;mBACS;mBACA;mBACA;mBACA;mBACA;mBACA;0CACuB;iBACzB,UAAU,oCAAoC,6DAA6D;UAClH,sCAAsC,sBAtCnB,mDAsCiJ,iDAAiD,sBAApG,qBAA+K,sBAA0E,oBAA2E;0CACrZ;iBACzB,WAAW,oCAAoC,6DAA6D;UACnH,sCAAsC;0CACN;iBACzB,WAAW,oCAAoC,6DAA6D;UACnH,sCAAsC;0CACN;;;;WAI/B;aACE;aACA;eACE;;aAEF;;aAEA;aACA,uEAAuE;;aAEvE;aACA,uEAAuE;;aAEvE;aACA;eACE;;aAEF,uEAAuE;;aAEvE;aACA,uEAAuE;;aAEvE;aACA;eACE;;aAEF,uEAAuE;;WAEzE;aACE,yBAAyB;aACzB,gFAAgF;;;cAG/E,sBAAsB;WACzB;aACE;eACE,UAAU;eACV"}
1
+ {"version":3,"file":"pack-DKM1hv1E.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/pack.d.mts"],"mappings":";;;;;;;;;;;;iBAUiB,gCAAgC,yBAAyB;WAC/D,UAAU;;WAEV;aACE;eACE;eACA;eACA;iBACE;iBACA,UAAU;iBACV;;eAEF;iBACE;iBACA;mBACE;qBACE;qBACA;;;;;aAKR;eACE;eACA;eACA;iBACE;iBACA,UAAU;iBACV;;eAEF;iBACE;iBACA;mBACE;qBACE;qBACA;;;;;;;;;;iBAUJ,4BAA4B;WAClC;WACA;aACE;;;;iBAII,uCAAuC;WAC7C,SAAS;;WAET;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,qCAAqC,uBAAuB,cAAc,eAAe;eACzF;;;WAGJ;;WAEA;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,MAAM,WAAW;eACjB;;;WAGJ;;WAEA;WACA,YAAY,WAAW;aACrB;aACA;eACE;eACA,qCAAqC,wBAAwB,cAAc,gBAAgB;eAC3F;;;WAGJ;;;;cAIG;WACH;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;;;aAOZ,WAAW,SAAS,kEAAkE;aACtF,gEAAgE;aAChE;eACE;QACP;QACA;QACA;QACA;QACA;UACE;;QAEF,aAAa;QACb;UACE,2CAA2C;YACzC;4CACgC;;;;aAI/B;eACE;iBACE,MAAM,qCAAqC,wDAAwD;UAC1G;0CACgC;iBACzB,KAAK,qCAAqC,wDAAwD;UACzG;mBACS;0CACuB;iBACzB,SAAS,qCAAqC,wDAAwD;UAC7G;mBACS;0CACuB;iBACzB,QAAQ,oCAAoC,wDAAwD;UAC3G;mBACS,4CAA4C;mBAC5C,uCAAuC;mBACvC;mBACA;mBACA;mBACA;mBACA,UAAU;0CACa;iBACzB,QAAQ,oCAAoC,wDAAwD;mBAClG,2CAA2C;mBAC3C;mBACA;0CACuB;iBACzB,UAAU,qCAAqC,wDAAwD;UAC9G;0CACgC;iBACzB,gBAAgB,qCAAqC,wDAAwD;UACpH;0CACgC;iBACzB,OAAO,qCAAqC,wDAAwD;UAC3G,qCAAqC,uDAAuD;UAC5F,sCAAsC;0CACN;;eAE3B;iBACE,MAAM,qCAAqC,6DAA6D;UAC/G;0CACgC;iBACzB,KAAK,qCAAqC,6DAA6D;mBACrG;0CACuB;iBACzB,SAAS,qCAAqC,6DAA6D;mBACzG;0CACuB;iBACzB,WAAW,qCAAqC,6DAA6D;UACpH;mBACS;mBACA;mBACA;mBACA;mBACA;mBACA;0CACuB;iBACzB,UAAU,oCAAoC,6DAA6D;UAClH,sCAAsC,sBAtCnB,mDAsCiJ,iDAAiD,sBAApG,qBAA+K,sBAA0E,oBAA2E;0CACrZ;iBACzB,WAAW,oCAAoC,6DAA6D;UACnH,sCAAsC;0CACN;iBACzB,WAAW,oCAAoC,6DAA6D;UACnH,sCAAsC;0CACN;;;;WAI/B;aACE;aACA;eACE;;aAEF;;aAEA;aACA,uEAAuE;;aAEvE;aACA,uEAAuE;;aAEvE;aACA;eACE;;aAEF,uEAAuE;;aAEvE;aACA,uEAAuE;;aAEvE;aACA;eACE;;aAEF,uEAAuE;;WAEzE;aACE,yBAAyB;aACzB,gFAAgF;;;cAG/E,sBAAsB;WACzB;aACE;eACE,UAAU;eACV"}
@@ -1,6 +1,6 @@
1
- import { l as SqlStorage } from "./sql-storage-DeCAh5Hi-CEM-m8cs.mjs";
2
- import "./types-CkAd8SWm.mjs";
3
- import { h as AnyQueryAst } from "./types-ijhejJhK-EdACW3bY.mjs";
1
+ import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
2
+ import "./types-CXRxo_TK.mjs";
3
+ import { h as AnyQueryAst } from "./types-ijhejJhK-BqfwP5Cc.mjs";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { AsyncIterableResult, QueryPlan } from "@prisma/orm-framework/components/runtime";
6
6
  //#region ../../../2-sql-family/4-lanes/relational-core/dist/plan-CMqVpPq6.d.mts
@@ -47,4 +47,4 @@ interface Preparable<DbRow, Result> {
47
47
  declare function planFromAst<Row = unknown>(ast: AnyQueryAst, contract: Contract<SqlStorage>, laneId?: string): SqlQueryPlan<Row>;
48
48
  //#endregion
49
49
  export { SqlQueryPlan as n, planFromAst as r, Preparable as t };
50
- //# sourceMappingURL=plan-CMqVpPq6-Bllx5Zpk.d.mts.map
50
+ //# sourceMappingURL=plan-CMqVpPq6-Aoza6Dp2.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-CMqVpPq6-Bllx5Zpk.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/plan-CMqVpPq6.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;UAED,WAAW,OAAO;WACjB,MAAM,aAAa;EAC5B,QAAQ,MAAM,oBAAoB,SAAS;;;;;;;;;;;;;;;;;;;;iBAoB5B,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
1
+ {"version":3,"file":"plan-CMqVpPq6-Aoza6Dp2.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/plan-CMqVpPq6.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;UAED,WAAW,OAAO;WACjB,MAAM,aAAa;EAC5B,QAAQ,MAAM,oBAAoB,SAAS;;;;;;;;;;;;;;;;;;;;iBAoB5B,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
@@ -0,0 +1,2 @@
1
+ import "./plan-CMqVpPq6-Aoza6Dp2.mjs";
2
+ import "./sql-execution-plan-CN-FEwrR-BEJ0-g83.mjs";
@@ -0,0 +1,268 @@
1
+ import { n as isSqlDataType, o as resolveReportedSqlType } from "./sql-data-type-LVBldu1a-Bq203xWX.mjs";
2
+ import "./sql-expression-CKgKznXS.mjs";
3
+ import { t as sqlFamilyError } from "./errors-B5g0xWro-C8plbqga.mjs";
4
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
+ import { authoringTypeConstructorArguments, authoringTypeConstructors, findAuthoringTypeChoiceCall, getAuthoringTypeChoice, getAuthoringTypeConstructor, instantiateAuthoringTypeConstructor, isAuthoringTypeChoiceOption, printTaggedLiteral, writeDataTypeValue, writeTypedLiteral, writtenTypeArguments } from "@prisma/orm-framework/components/authoring";
6
+ import { dataTypeId, dataTypeParams } from "@prisma/orm-framework/components/codec";
7
+ import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
8
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
9
+ import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
10
+ //#region ../../../2-sql-family/9-family/dist/psl-build.mjs
11
+ /** Every constructor of `authoringTypes` marked `inferred`, by the data type its codec represents. */
12
+ function inferredTypeConstructors(input) {
13
+ const found = /* @__PURE__ */ new Map();
14
+ for (const { path, descriptor } of authoringTypeConstructors(input.authoringTypes)) {
15
+ if (descriptor.inferred !== true) continue;
16
+ const dataTypeId = input.codecLookup.descriptorFor(descriptor.output.codecId)?.dataType;
17
+ const dataType = dataTypeId === void 0 ? void 0 : input.dataTypeLookup.get(dataTypeId);
18
+ if (dataType === void 0 || !isSqlDataType(dataType)) continue;
19
+ found.set(dataType.id, {
20
+ path,
21
+ descriptor,
22
+ dataType
23
+ });
24
+ }
25
+ return found;
26
+ }
27
+ function normalParams(marked, args) {
28
+ try {
29
+ const { typeParams } = instantiateAuthoringTypeConstructor(marked.descriptor, args);
30
+ const params = dataTypeParams(marked.dataType, typeParams);
31
+ return canonicalizeJson(marked.dataType.sql.normalize(params));
32
+ } catch (error) {
33
+ if (isInternalError(error)) throw error;
34
+ return;
35
+ }
36
+ }
37
+ /**
38
+ * The call to `marked` with the fewest arguments that produces `params`, the normal form of a
39
+ * column's data type parameters: arguments are dropped from the end while the normal form of what
40
+ * the call produces stays `params`. Undefined when the constructor cannot produce them, such as one
41
+ * whose argument names another entity.
42
+ */
43
+ function fewestArgumentsCall(marked, params) {
44
+ const all = authoringTypeConstructorArguments(marked.descriptor, {
45
+ codecId: marked.descriptor.output.codecId,
46
+ typeParams: params
47
+ });
48
+ if (all === void 0) return void 0;
49
+ const wanted = canonicalizeJson(params);
50
+ const args = [...all];
51
+ while (args.length > 0 && normalParams(marked, args.slice(0, -1)) === wanted) args.pop();
52
+ return {
53
+ path: marked.path,
54
+ args
55
+ };
56
+ }
57
+ /**
58
+ * Whether two outputs have the same codec and the same parameters in the normal form of `dataType`, which the codecs represent: how `db verify` and the planner compare a column with the database.
59
+ */
60
+ function sameInNormalForm(dataType) {
61
+ const normal = (output) => canonicalizeJson(dataType.sql.normalize(dataTypeParams(dataType, output.typeParams ?? {})));
62
+ return (produced, wanted) => produced.codecId === wanted.codecId && normal(produced) === normal(wanted);
63
+ }
64
+ /**
65
+ * The type choice call that becomes the type constructor call `call`, written by name with only the arguments that differ from the defaults (ADR 279). `sameOutput` decides when it becomes the same type; by default the codec and type parameters must be exactly equal. `undefined` when no type choice call becomes it or an argument has no literal that reads back as it.
66
+ */
67
+ function writtenTypeChoiceCall(input) {
68
+ const found = findAuthoringTypeChoiceCall({
69
+ namespace: input.authoringTypes,
70
+ call: input.call,
71
+ ...ifDefined("sameOutput", input.sameOutput)
72
+ });
73
+ const choice = found && getAuthoringTypeChoice({ type: input.authoringTypes }, found.path);
74
+ if (found === void 0 || choice === void 0) return void 0;
75
+ const args = [];
76
+ for (const { name, value } of found.args) {
77
+ const argument = choice.descriptor.args.find((candidate) => candidate.name === name);
78
+ const text = argument === void 0 ? void 0 : isAuthoringTypeChoiceOption(argument) ? String(value) : writeDataTypeValue(blindCast(value), dataTypeId(argument.dataType), input.dataTypes);
79
+ if (text === void 0) return void 0;
80
+ args.push({
81
+ name,
82
+ text
83
+ });
84
+ }
85
+ return {
86
+ path: found.path,
87
+ args,
88
+ becomes: found.becomes
89
+ };
90
+ }
91
+ /** The type the database reported for `column`, which introspection always records. */
92
+ function reportedTypeOf(column, tableName) {
93
+ if (column.reportedType === void 0) throw new InternalError(`contract infer read column "${tableName}"."${column.name}" without the type the database reported for it.`);
94
+ return column.reportedType;
95
+ }
96
+ /** The call to the type choice that becomes `marked` with every parameter in `params`, compared in the normal form, as `db verify` compares the column, with the explicit call it becomes. */
97
+ function convenienceCall(marked, params, authoringTypes, support) {
98
+ const values = authoringTypeConstructorArguments(marked.descriptor, {
99
+ codecId: marked.descriptor.output.codecId,
100
+ typeParams: params
101
+ });
102
+ const written = values && writtenTypeChoiceCall({
103
+ authoringTypes,
104
+ call: {
105
+ path: marked.path,
106
+ args: values
107
+ },
108
+ dataTypes: support,
109
+ sameOutput: sameInNormalForm(marked.dataType)
110
+ });
111
+ return written && {
112
+ path: written.path,
113
+ args: written.args,
114
+ explicit: {
115
+ path: written.becomes.path,
116
+ values: written.becomes.args
117
+ }
118
+ };
119
+ }
120
+ /**
121
+ * The first call to a row of the type choice `written` names whose type constructor represents the same data type, with the same parameters, and whose codec reads the column default.
122
+ */
123
+ async function rowReadingDefault(written, marked, params, authoringTypes, support, readsDefault) {
124
+ const choice = getAuthoringTypeChoice({ type: authoringTypes }, written.path);
125
+ for (const row of choice?.descriptor.choices ?? []) {
126
+ const path = [...written.path.slice(0, -1), row.type];
127
+ const descriptor = getAuthoringTypeConstructor({ type: authoringTypes }, path);
128
+ const call = descriptor !== void 0 && support.dataTypeOfCodec(descriptor.output.codecId) === marked.dataType.id ? convenienceCall({
129
+ ...marked,
130
+ path,
131
+ descriptor
132
+ }, params, authoringTypes, support) : void 0;
133
+ if (call !== void 0 && await readsDefault(call)) return call;
134
+ }
135
+ }
136
+ async function writtenCall(constructors, dataTypes, authoringTypes, support, reported, readsDefault) {
137
+ const resolved = resolveReportedSqlType(reported, dataTypes);
138
+ const marked = resolved && constructors.get(resolved.dataType.id);
139
+ if (resolved === void 0 || marked === void 0) return void 0;
140
+ const convenience = convenienceCall(marked, resolved.typeParams, authoringTypes, support);
141
+ if (convenience !== void 0) {
142
+ if (await readsDefault(convenience)) return convenience;
143
+ return await rowReadingDefault(convenience, marked, resolved.typeParams, authoringTypes, support, readsDefault) ?? convenience;
144
+ }
145
+ const call = fewestArgumentsCall(marked, resolved.typeParams);
146
+ const args = call && writtenTypeArguments(marked.descriptor, call.args, support);
147
+ return call && args && {
148
+ path: call.path,
149
+ args: args.map((text) => ({
150
+ name: void 0,
151
+ text
152
+ })),
153
+ explicit: {
154
+ path: call.path,
155
+ values: call.args
156
+ }
157
+ };
158
+ }
159
+ /**
160
+ * The type of every column of `tables` that `isEnumColumn` does not claim, through the constructor marked `inferred` for the data type that claims the column's reported type: the type choice call that becomes it, with only the arguments that differ from the defaults, or else the call to it with the fewest arguments. When the codec of that type choice call cannot read the column default as a row, the first row of the same type choice whose codec can is written instead. When any column has no such call, throws `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.
161
+ */
162
+ async function inferColumnTypes(input) {
163
+ const dataTypes = [...input.constructors.values()].map((marked) => marked.dataType);
164
+ const types = /* @__PURE__ */ new Map();
165
+ const unclaimed = [];
166
+ for (const { schemaName, tableName, columns } of input.tables) for (const column of columns) {
167
+ if (input.isEnumColumn(column)) continue;
168
+ const reported = reportedTypeOf(column, tableName);
169
+ const readsDefault = input.readsDefault;
170
+ const call = await writtenCall(input.constructors, dataTypes, input.authoringTypes, input.dataTypes, reported, async (type) => readsDefault === void 0 ? true : readsDefault(tableName, column, type));
171
+ if (call === void 0) {
172
+ unclaimed.push(`${schemaName}.${tableName}.${column.name}: ${reported.text}${column.many === true ? "[]" : ""}`);
173
+ continue;
174
+ }
175
+ types.set(JSON.stringify([tableName, column.name]), call);
176
+ }
177
+ if (unclaimed.length > 0) {
178
+ const columns = unclaimed.sort();
179
+ throw sqlFamilyError("CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED", ["contract infer: Prisma 8 cannot write these column types with the configured stack:", ...columns.map((line) => ` ${line}`)].join("\n"), {
180
+ why: "Prisma 8 reads a column type only through a data type that the target or an extension pack declares.",
181
+ fix: `No configured pack has a type for these columns. If a type comes from a database extension that has a Prisma 8 pack, add the pack to extensions in prisma.config.ts. Otherwise, to keep such a column, write the schema by hand and declare its field as Raw(sql\`<type>\`) with the type as listed, or change the column's type or remove the column from the database.`,
182
+ meta: { columns }
183
+ });
184
+ }
185
+ return (tableName, columnName) => {
186
+ const type = types.get(JSON.stringify([tableName, columnName]));
187
+ if (type === void 0) throw new InternalError(`contract infer resolved no type for "${tableName}"."${columnName}".`);
188
+ return type;
189
+ };
190
+ }
191
+ const DEFAULT_FUNCTION_ATTRIBUTES = {
192
+ "autoincrement()": "@default(autoincrement())",
193
+ "now()": "@default(now())"
194
+ };
195
+ /**
196
+ * The attribute a stored default prints as: a named function, a literal the column takes, or any
197
+ * other expression as a `sql` literal. `undefined` when a literal has no written form. An expression
198
+ * prints even when the literal would read back as different text: default expressions are compared
199
+ * with case and whitespace ignored (`SqlColumnDefaultIR.isEqualTo`), and canonicalization changes only
200
+ * whitespace (ADR 129).
201
+ */
202
+ function mapDefault(columnDefault, options) {
203
+ switch (columnDefault.kind) {
204
+ case "literal": {
205
+ const text = writeTypedLiteral(columnDefault.value, {
206
+ dataTypes: options?.dataTypes,
207
+ dataType: options?.columnCodec?.dataType,
208
+ typeParams: options?.typeParams,
209
+ ...ifDefined("list", options?.list)
210
+ });
211
+ return text === void 0 ? void 0 : { attribute: `@default(${text})` };
212
+ }
213
+ case "function": return { attribute: options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? `@default(${printTaggedLiteral("sql", columnDefault.expression)})` };
214
+ }
215
+ }
216
+ const GENERATOR_PHASES = ["onCreate", "onUpdate"];
217
+ /**
218
+ * The generator function call that writes each phase of a column's generators, as `@onCreate(...)` and `@onUpdate(...)` take it. A call must resolve back to the stored generator, so a list column, a generator no function writes for the codec, and a call that reads back differently are refused.
219
+ */
220
+ function generatorCallsFor(input) {
221
+ const { executionDefault, field, list, generatorFunctions } = input;
222
+ const calls = [];
223
+ for (const phase of GENERATOR_PHASES) {
224
+ const generator = executionDefault[phase];
225
+ if (generator === void 0) continue;
226
+ if (list) return {
227
+ ok: false,
228
+ refusal: {
229
+ kind: "on-list",
230
+ phase,
231
+ generator
232
+ }
233
+ };
234
+ const printed = generatorFunctions.callFor(generator, field);
235
+ if (printed === void 0) return {
236
+ ok: false,
237
+ refusal: {
238
+ kind: "no-function",
239
+ phase,
240
+ generator
241
+ }
242
+ };
243
+ const readBack = generatorFunctions.resolve(printed.call, field);
244
+ if (!readBack.ok || canonicalizeJson(readBack.generator) !== canonicalizeJson(generator)) return {
245
+ ok: false,
246
+ refusal: {
247
+ kind: "reads-back-differently",
248
+ phase,
249
+ generator,
250
+ text: printed.text,
251
+ readBack: readBack.ok ? readBack.generator : void 0,
252
+ refusedBecause: !readBack.ok && readBack.reason === "refused" ? readBack.message : void 0
253
+ }
254
+ };
255
+ calls.push({
256
+ phase,
257
+ text: printed.text
258
+ });
259
+ }
260
+ return {
261
+ ok: true,
262
+ calls
263
+ };
264
+ }
265
+ //#endregion
266
+ export { mapDefault as a, inferredTypeConstructors as i, generatorCallsFor as n, sameInNormalForm as o, inferColumnTypes as r, writtenTypeChoiceCall as s, fewestArgumentsCall as t };
267
+
268
+ //# sourceMappingURL=psl-build-BA0Ndi1v.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-build-BA0Ndi1v.mjs","names":[],"sources":["../../../../2-sql-family/9-family/dist/psl-build.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { s as toEnumMemberName } from \"./psl-names-C3cwe0rg.mjs\";\nimport { isSqlDataType, resolveReportedSqlType } from \"@internal/sql-contract/data-type\";\nimport { SQL_EXPRESSION_TAG } from \"@internal/sql-contract/sql-expression\";\nimport { authoringTypeConstructorArguments, authoringTypeConstructors, findAuthoringTypeChoiceCall, getAuthoringTypeChoice, getAuthoringTypeConstructor, instantiateAuthoringTypeConstructor, isAuthoringTypeChoiceOption, printTaggedLiteral, writeDataTypeValue, writeTypedLiteral, writtenTypeArguments } from \"@internal/framework-components/authoring\";\nimport { dataTypeId, dataTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\n//#region src/core/psl-build/inferred-type-constructors.ts\n/** Every constructor of `authoringTypes` marked `inferred`, by the data type its codec represents. */\nfunction inferredTypeConstructors(input) {\n\tconst found = /* @__PURE__ */ new Map();\n\tfor (const { path, descriptor } of authoringTypeConstructors(input.authoringTypes)) {\n\t\tif (descriptor.inferred !== true) continue;\n\t\tconst dataTypeId = input.codecLookup.descriptorFor(descriptor.output.codecId)?.dataType;\n\t\tconst dataType = dataTypeId === void 0 ? void 0 : input.dataTypeLookup.get(dataTypeId);\n\t\tif (dataType === void 0 || !isSqlDataType(dataType)) continue;\n\t\tfound.set(dataType.id, {\n\t\t\tpath,\n\t\t\tdescriptor,\n\t\t\tdataType\n\t\t});\n\t}\n\treturn found;\n}\nfunction normalParams(marked, args) {\n\ttry {\n\t\tconst { typeParams } = instantiateAuthoringTypeConstructor(marked.descriptor, args);\n\t\tconst params = dataTypeParams(marked.dataType, typeParams);\n\t\treturn canonicalizeJson(marked.dataType.sql.normalize(params));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn;\n\t}\n}\n/**\n* The call to `marked` with the fewest arguments that produces `params`, the normal form of a\n* column's data type parameters: arguments are dropped from the end while the normal form of what\n* the call produces stays `params`. Undefined when the constructor cannot produce them, such as one\n* whose argument names another entity.\n*/\nfunction fewestArgumentsCall(marked, params) {\n\tconst all = authoringTypeConstructorArguments(marked.descriptor, {\n\t\tcodecId: marked.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tif (all === void 0) return void 0;\n\tconst wanted = canonicalizeJson(params);\n\tconst args = [...all];\n\twhile (args.length > 0 && normalParams(marked, args.slice(0, -1)) === wanted) args.pop();\n\treturn {\n\t\tpath: marked.path,\n\t\targs\n\t};\n}\n/**\n* Whether two outputs have the same codec and the same parameters in the normal form of `dataType`, which the codecs represent: how `db verify` and the planner compare a column with the database.\n*/\nfunction sameInNormalForm(dataType) {\n\tconst normal = (output) => canonicalizeJson(dataType.sql.normalize(dataTypeParams(dataType, output.typeParams ?? {})));\n\treturn (produced, wanted) => produced.codecId === wanted.codecId && normal(produced) === normal(wanted);\n}\n/**\n* The type choice call that becomes the type constructor call `call`, written by name with only the arguments that differ from the defaults (ADR 279). `sameOutput` decides when it becomes the same type; by default the codec and type parameters must be exactly equal. `undefined` when no type choice call becomes it or an argument has no literal that reads back as it.\n*/\nfunction writtenTypeChoiceCall(input) {\n\tconst found = findAuthoringTypeChoiceCall({\n\t\tnamespace: input.authoringTypes,\n\t\tcall: input.call,\n\t\t...ifDefined(\"sameOutput\", input.sameOutput)\n\t});\n\tconst choice = found && getAuthoringTypeChoice({ type: input.authoringTypes }, found.path);\n\tif (found === void 0 || choice === void 0) return void 0;\n\tconst args = [];\n\tfor (const { name, value } of found.args) {\n\t\tconst argument = choice.descriptor.args.find((candidate) => candidate.name === name);\n\t\tconst text = argument === void 0 ? void 0 : isAuthoringTypeChoiceOption(argument) ? String(value) : writeDataTypeValue(blindCast(value), dataTypeId(argument.dataType), input.dataTypes);\n\t\tif (text === void 0) return void 0;\n\t\targs.push({\n\t\t\tname,\n\t\t\ttext\n\t\t});\n\t}\n\treturn {\n\t\tpath: found.path,\n\t\targs,\n\t\tbecomes: found.becomes\n\t};\n}\n//#endregion\n//#region src/core/psl-build/column-types.ts\n/** The type the database reported for `column`, which introspection always records. */\nfunction reportedTypeOf(column, tableName) {\n\tif (column.reportedType === void 0) throw new InternalError(`contract infer read column \"${tableName}\".\"${column.name}\" without the type the database reported for it.`);\n\treturn column.reportedType;\n}\n/** The call to the type choice that becomes `marked` with every parameter in `params`, compared in the normal form, as `db verify` compares the column, with the explicit call it becomes. */\nfunction convenienceCall(marked, params, authoringTypes, support) {\n\tconst values = authoringTypeConstructorArguments(marked.descriptor, {\n\t\tcodecId: marked.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tconst written = values && writtenTypeChoiceCall({\n\t\tauthoringTypes,\n\t\tcall: {\n\t\t\tpath: marked.path,\n\t\t\targs: values\n\t\t},\n\t\tdataTypes: support,\n\t\tsameOutput: sameInNormalForm(marked.dataType)\n\t});\n\treturn written && {\n\t\tpath: written.path,\n\t\targs: written.args,\n\t\texplicit: {\n\t\t\tpath: written.becomes.path,\n\t\t\tvalues: written.becomes.args\n\t\t}\n\t};\n}\n/**\n* The first call to a row of the type choice `written` names whose type constructor represents the same data type, with the same parameters, and whose codec reads the column default.\n*/\nasync function rowReadingDefault(written, marked, params, authoringTypes, support, readsDefault) {\n\tconst choice = getAuthoringTypeChoice({ type: authoringTypes }, written.path);\n\tfor (const row of choice?.descriptor.choices ?? []) {\n\t\tconst path = [...written.path.slice(0, -1), row.type];\n\t\tconst descriptor = getAuthoringTypeConstructor({ type: authoringTypes }, path);\n\t\tconst call = descriptor !== void 0 && support.dataTypeOfCodec(descriptor.output.codecId) === marked.dataType.id ? convenienceCall({\n\t\t\t...marked,\n\t\t\tpath,\n\t\t\tdescriptor\n\t\t}, params, authoringTypes, support) : void 0;\n\t\tif (call !== void 0 && await readsDefault(call)) return call;\n\t}\n}\nasync function writtenCall(constructors, dataTypes, authoringTypes, support, reported, readsDefault) {\n\tconst resolved = resolveReportedSqlType(reported, dataTypes);\n\tconst marked = resolved && constructors.get(resolved.dataType.id);\n\tif (resolved === void 0 || marked === void 0) return void 0;\n\tconst convenience = convenienceCall(marked, resolved.typeParams, authoringTypes, support);\n\tif (convenience !== void 0) {\n\t\tif (await readsDefault(convenience)) return convenience;\n\t\treturn await rowReadingDefault(convenience, marked, resolved.typeParams, authoringTypes, support, readsDefault) ?? convenience;\n\t}\n\tconst call = fewestArgumentsCall(marked, resolved.typeParams);\n\tconst args = call && writtenTypeArguments(marked.descriptor, call.args, support);\n\treturn call && args && {\n\t\tpath: call.path,\n\t\targs: args.map((text) => ({\n\t\t\tname: void 0,\n\t\t\ttext\n\t\t})),\n\t\texplicit: {\n\t\t\tpath: call.path,\n\t\t\tvalues: call.args\n\t\t}\n\t};\n}\n/**\n* The type of every column of `tables` that `isEnumColumn` does not claim, through the constructor marked `inferred` for the data type that claims the column's reported type: the type choice call that becomes it, with only the arguments that differ from the defaults, or else the call to it with the fewest arguments. When the codec of that type choice call cannot read the column default as a row, the first row of the same type choice whose codec can is written instead. When any column has no such call, throws `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.\n*/\nasync function inferColumnTypes(input) {\n\tconst dataTypes = [...input.constructors.values()].map((marked) => marked.dataType);\n\tconst types = /* @__PURE__ */ new Map();\n\tconst unclaimed = [];\n\tfor (const { schemaName, tableName, columns } of input.tables) for (const column of columns) {\n\t\tif (input.isEnumColumn(column)) continue;\n\t\tconst reported = reportedTypeOf(column, tableName);\n\t\tconst readsDefault = input.readsDefault;\n\t\tconst call = await writtenCall(input.constructors, dataTypes, input.authoringTypes, input.dataTypes, reported, async (type) => readsDefault === void 0 ? true : readsDefault(tableName, column, type));\n\t\tif (call === void 0) {\n\t\t\tunclaimed.push(`${schemaName}.${tableName}.${column.name}: ${reported.text}${column.many === true ? \"[]\" : \"\"}`);\n\t\t\tcontinue;\n\t\t}\n\t\ttypes.set(JSON.stringify([tableName, column.name]), call);\n\t}\n\tif (unclaimed.length > 0) {\n\t\tconst columns = unclaimed.sort();\n\t\tthrow sqlFamilyError(\"CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED\", [\"contract infer: Prisma 8 cannot write these column types with the configured stack:\", ...columns.map((line) => ` ${line}`)].join(\"\\n\"), {\n\t\t\twhy: \"Prisma 8 reads a column type only through a data type that the target or an extension pack declares.\",\n\t\t\tfix: `No configured pack has a type for these columns. If a type comes from a database extension that has a Prisma 8 pack, add the pack to extensions in prisma.config.ts. Otherwise, to keep such a column, write the schema by hand and declare its field as Raw(sql\\`<type>\\`) with the type as listed, or change the column's type or remove the column from the database.`,\n\t\t\tmeta: { columns }\n\t\t});\n\t}\n\treturn (tableName, columnName) => {\n\t\tconst type = types.get(JSON.stringify([tableName, columnName]));\n\t\tif (type === void 0) throw new InternalError(`contract infer resolved no type for \"${tableName}\".\"${columnName}\".`);\n\t\treturn type;\n\t};\n}\n//#endregion\n//#region src/core/psl-build/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\n/**\n* The attribute a stored default prints as: a named function, a literal the column takes, or any\n* other expression as a `sql` literal. `undefined` when a literal has no written form. An expression\n* prints even when the literal would read back as different text: default expressions are compared\n* with case and whitespace ignored (`SqlColumnDefaultIR.isEqualTo`), and canonicalization changes only\n* whitespace (ADR 129).\n*/\nfunction mapDefault(columnDefault, options) {\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": {\n\t\t\tconst text = writeTypedLiteral(columnDefault.value, {\n\t\t\t\tdataTypes: options?.dataTypes,\n\t\t\t\tdataType: options?.columnCodec?.dataType,\n\t\t\t\ttypeParams: options?.typeParams,\n\t\t\t\t...ifDefined(\"list\", options?.list)\n\t\t\t});\n\t\t\treturn text === void 0 ? void 0 : { attribute: `@default(${text})` };\n\t\t}\n\t\tcase \"function\": return { attribute: options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? `@default(${printTaggedLiteral(SQL_EXPRESSION_TAG, columnDefault.expression)})` };\n\t}\n}\n//#endregion\n//#region src/core/psl-build/generator-calls.ts\nconst GENERATOR_PHASES = [\"onCreate\", \"onUpdate\"];\n/**\n* The generator function call that writes each phase of a column's generators, as `@onCreate(...)` and `@onUpdate(...)` take it. A call must resolve back to the stored generator, so a list column, a generator no function writes for the codec, and a call that reads back differently are refused.\n*/\nfunction generatorCallsFor(input) {\n\tconst { executionDefault, field, list, generatorFunctions } = input;\n\tconst calls = [];\n\tfor (const phase of GENERATOR_PHASES) {\n\t\tconst generator = executionDefault[phase];\n\t\tif (generator === void 0) continue;\n\t\tif (list) return {\n\t\t\tok: false,\n\t\t\trefusal: {\n\t\t\t\tkind: \"on-list\",\n\t\t\t\tphase,\n\t\t\t\tgenerator\n\t\t\t}\n\t\t};\n\t\tconst printed = generatorFunctions.callFor(generator, field);\n\t\tif (printed === void 0) return {\n\t\t\tok: false,\n\t\t\trefusal: {\n\t\t\t\tkind: \"no-function\",\n\t\t\t\tphase,\n\t\t\t\tgenerator\n\t\t\t}\n\t\t};\n\t\tconst readBack = generatorFunctions.resolve(printed.call, field);\n\t\tif (!readBack.ok || canonicalizeJson(readBack.generator) !== canonicalizeJson(generator)) return {\n\t\t\tok: false,\n\t\t\trefusal: {\n\t\t\t\tkind: \"reads-back-differently\",\n\t\t\t\tphase,\n\t\t\t\tgenerator,\n\t\t\t\ttext: printed.text,\n\t\t\t\treadBack: readBack.ok ? readBack.generator : void 0,\n\t\t\t\trefusedBecause: !readBack.ok && readBack.reason === \"refused\" ? readBack.message : void 0\n\t\t\t}\n\t\t};\n\t\tcalls.push({\n\t\t\tphase,\n\t\t\ttext: printed.text\n\t\t});\n\t}\n\treturn {\n\t\tok: true,\n\t\tcalls\n\t};\n}\n//#endregion\nexport { fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault, sameInNormalForm, toEnumMem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G,OAAO;GAChG,IAAI;GACJ,SAAS;IACR,MAAM;IACN;IACA;IACA,MAAM,QAAQ;IACd,UAAU,SAAS,KAAK,SAAS,YAAY,KAAK;IAClD,gBAAgB,CAAC,SAAS,MAAM,SAAS,WAAW,YAAY,SAAS,UAAU,KAAK;GACzF;EACD;EACA,MAAM,KAAK;GACV;GACA,MAAM,QAAQ;EACf,CAAC;CACF;CACA,OAAO;EACN,IAAI;EACJ;CACD;AACD"}
@@ -1,10 +1,10 @@
1
- import { u as SqlColumnIR } from "./types-CuCxAQat-Dz8P4xyt.mjs";
2
- import "./types-ljUNyiWe.mjs";
3
- import { i as SqlDataType, l as SqlTypeParams } from "./data-type-DJIvKQHf.mjs";
4
- import "./default-mapping-CAOONlKQ-4m07nb-O.mjs";
5
- import { AuthoringTypeConstructorCall, AuthoringTypeConstructorDescriptor, AuthoringTypeNamespace, DataTypeSupport } from "@prisma/orm-framework/components/authoring";
6
- import { CodecLookupWithDescriptors, DataTypeLookup } from "@prisma/orm-framework/components/codec";
1
+ import { u as SqlColumnIR } from "./types-fmtEmvj3-B0fQaVes.mjs";
2
+ import "./types-B-dwfOwQ.mjs";
3
+ import { a as SqlDataType, u as SqlTypeParams } from "./data-type-B-Do6RMA.mjs";
4
+ import "./default-mapping-CEISdj2g-B50Ag_F_.mjs";
5
+ import { AuthoringTypeConstructorCall, AuthoringTypeConstructorDescriptor, AuthoringTypeConstructorOutput, AuthoringTypeNamespace, DataTypeSupport } from "@prisma/orm-framework/components/authoring";
7
6
  import { ExecutionMutationDefaultPhases, ExecutionMutationDefaultValue } from "@prisma/orm-framework/contract/types";
7
+ import { CodecLookupWithDescriptors, DataTypeLookup } from "@prisma/orm-framework/components/codec";
8
8
  import { GeneratorFunctionField, GeneratorFunctionRegistry, GeneratorPhase } from "@prisma/orm-framework/components/components";
9
9
  //#region ../../../2-sql-family/9-family/dist/psl-build.d.mts
10
10
  //#region src/core/psl-build/inferred-type-constructors.d.ts
@@ -29,20 +29,48 @@ declare function inferredTypeConstructors(input: {
29
29
  * whose argument names another entity.
30
30
  */
31
31
  declare function fewestArgumentsCall(marked: InferredTypeConstructor, params: SqlTypeParams): AuthoringTypeConstructorCall | undefined;
32
+ /** An argument of a type call as PSL writes it: by name, or by position when `name` is undefined. */
33
+ interface PslTypeArgument {
34
+ readonly name: string | undefined;
35
+ readonly text: string;
36
+ }
37
+ /** A call to a type constructor or type choice as PSL writes it. */
38
+ interface WrittenPslTypeCall {
39
+ readonly path: readonly string[];
40
+ readonly args: readonly PslTypeArgument[];
41
+ }
42
+ /** A type choice call as PSL writes it, and the type constructor call it becomes. */
43
+ interface WrittenTypeChoiceCall extends WrittenPslTypeCall {
44
+ readonly becomes: AuthoringTypeConstructorCall;
45
+ }
46
+ /**
47
+ * Whether two outputs have the same codec and the same parameters in the normal form of `dataType`, which the codecs represent: how `db verify` and the planner compare a column with the database.
48
+ */
49
+ declare function sameInNormalForm(dataType: SqlDataType): (produced: AuthoringTypeConstructorOutput, wanted: AuthoringTypeConstructorOutput) => boolean;
32
50
  /**
33
- * Each argument of a call to `descriptor` as PSL writes it: a value argument as a literal of its data type that reads back as the same value. `undefined` when an argument is not a value argument or no literal reads back as it.
51
+ * The type choice call that becomes the type constructor call `call`, written by name with only the arguments that differ from the defaults (ADR 279). `sameOutput` decides when it becomes the same type; by default the codec and type parameters must be exactly equal. `undefined` when no type choice call becomes it or an argument has no literal that reads back as it.
34
52
  */
35
- declare function writtenTypeArguments(descriptor: AuthoringTypeConstructorDescriptor, args: readonly unknown[], dataTypes: DataTypeSupport): readonly string[] | undefined;
53
+ declare function writtenTypeChoiceCall(input: {
54
+ readonly authoringTypes: AuthoringTypeNamespace;
55
+ readonly call: AuthoringTypeConstructorCall;
56
+ readonly dataTypes: DataTypeSupport;
57
+ readonly sameOutput: ((produced: AuthoringTypeConstructorOutput, wanted: AuthoringTypeConstructorOutput) => boolean) | undefined;
58
+ }): WrittenTypeChoiceCall | undefined;
36
59
  //#endregion
37
60
  //#region src/core/psl-build/column-types.d.ts
38
- /** A call to a type constructor as PSL writes it: the constructor's path, its arguments' text, and the value each argument gives the constructor. */
61
+ /** A type call as PSL writes it, and the explicit type constructor it becomes, with the value of each of its arguments. */
39
62
  interface PslTypeCall {
40
63
  readonly path: readonly string[];
41
- readonly args: readonly string[];
42
- readonly values: readonly unknown[];
64
+ readonly args: readonly PslTypeArgument[];
65
+ readonly explicit: {
66
+ readonly path: readonly string[];
67
+ readonly values: readonly unknown[];
68
+ };
43
69
  }
44
70
  /** The PSL type `contract infer` writes for a column that is not an enum, by table and column name. */
45
71
  type ColumnTypeOf = (tableName: string, columnName: string) => PslTypeCall;
72
+ /** Whether the codec of `type` reads the default the database reports for `column` as a row value. */
73
+ type ColumnTypeReadsDefault = (tableName: string, column: SqlColumnIR, type: PslTypeCall) => Promise<boolean>;
46
74
  /** One introspected table, with the schema it was read from. */
47
75
  interface IntrospectedTable {
48
76
  readonly schemaName: string;
@@ -50,18 +78,19 @@ interface IntrospectedTable {
50
78
  readonly columns: readonly SqlColumnIR[];
51
79
  }
52
80
  /**
53
- * The type of every column of `tables` that `isEnumColumn` does not claim: the call, with the
54
- * fewest arguments, to the constructor marked `inferred` for the data type that claims the
55
- * column's reported type. When any column has no such call, throws
56
- * `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.
81
+ * The type of every column of `tables` that `isEnumColumn` does not claim, through the constructor marked `inferred` for the data type that claims the column's reported type: the type choice call that becomes it, with only the arguments that differ from the defaults, or else the call to it with the fewest arguments. When the codec of that type choice call cannot read the column default as a row, the first row of the same type choice whose codec can is written instead. When any column has no such call, throws `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.
57
82
  */
58
83
  declare function inferColumnTypes(input: {
59
84
  readonly tables: readonly IntrospectedTable[];
60
85
  readonly constructors: InferredTypeConstructors;
86
+ /** The stack's type namespace, whose type choices infer writes where one becomes a marked constructor. */
87
+ readonly authoringTypes: AuthoringTypeNamespace;
61
88
  /** The stack's data types, whose literals write each argument. */
62
89
  readonly dataTypes: DataTypeSupport;
63
90
  readonly isEnumColumn: (column: SqlColumnIR) => boolean;
64
- }): ColumnTypeOf;
91
+ /** Whether a type's codec reads the column default; every type does when `undefined`. */
92
+ readonly readsDefault: ColumnTypeReadsDefault | undefined;
93
+ }): Promise<ColumnTypeOf>;
65
94
  //#endregion
66
95
  //#region src/core/psl-build/generator-calls.d.ts
67
96
  /** The call text that writes one phase of a column's generators. */
@@ -108,5 +137,5 @@ declare function generatorCallsFor(input: {
108
137
  */
109
138
  declare function toEnumMemberName(value: string): string;
110
139
  //#endregion
111
- export { InferredTypeConstructors as a, PslTypeCall as c, inferColumnTypes as d, inferredTypeConstructors as f, InferredTypeConstructor as i, fewestArgumentsCall as l, writtenTypeArguments as m, GeneratorCallRefusal as n, IntrospectedTable as o, toEnumMemberName as p, GeneratorCallsResult as r, PhaseCallText as s, ColumnTypeOf as t, generatorCallsFor as u };
112
- //# sourceMappingURL=psl-build-RelubU2E.d.mts.map
140
+ export { sameInNormalForm as _, InferredTypeConstructor as a, PhaseCallText as c, WrittenPslTypeCall as d, WrittenTypeChoiceCall as f, inferredTypeConstructors as g, inferColumnTypes as h, GeneratorCallsResult as i, PslTypeArgument as l, generatorCallsFor as m, ColumnTypeReadsDefault as n, InferredTypeConstructors as o, fewestArgumentsCall as p, GeneratorCallRefusal as r, IntrospectedTable as s, ColumnTypeOf as t, PslTypeCall as u, toEnumMemberName as v, writtenTypeChoiceCall as y };
141
+ //# sourceMappingURL=psl-build-DCZaF5g4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-build-DCZaF5g4.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/psl-build.d.mts"],"mappings":";;;;;;;;;;;UASU;WACC;WACA,YAAY;WACZ,UAAU;;;KAGhB,2BAA2B,oBAAoB;;iBAEnC,yBAAyB;WAC/B,gBAAgB;WAChB,aAAa,KAAK;WAClB,gBAAgB;IACvB;;;;;;;iBAOa,oBAAoB,QAAQ,yBAAyB,QAAQ,gBAAgB;;UAEpF;WACC;WACA;;;UAGD;WACC;WACA,eAAe;;;UAGhB,8BAA8B;WAC7B,SAAS;;;;;iBAKH,iBAAiB,UAAU,eAAe,UAAU,gCAAgC,QAAQ;;;;iBAI5F,sBAAsB;WAC5B,gBAAgB;WAChB,MAAM;WACN,WAAW;WACX,cAAc,UAAU,gCAAgC,QAAQ;IACvE;;;;UAIM;WACC;WACA,eAAe;WACf;aACE;aACA;;;;KAIR,gBAAgB,mBAAmB,uBAAuB;;KAE1D,0BAA0B,mBAAmB,QAAQ,aAAa,MAAM,gBAAgB;;UAEnF;WACC;WACA;WACA,kBAAkB;;;;;iBAKZ,iBAAiB;WACvB,iBAAiB;WACjB,cAAc;;WAEd,gBAAgB;;WAEhB,WAAW;WACX,eAAe,QAAQ;;WAEvB,cAAc;IACrB,QAAQ;;;;UAIF;WACC,OAAO;WACP;;KAEN;WACM;WACA,OAAO;WACP,WAAW;;WAEX;WACA,OAAO;WACP,WAAW;WACX;WACA,UAAU;;WAEV;;KAEN;WACM;WACA,gBAAgB;;WAEhB;WACA,SAAS;;;;;iBAKH,kBAAkB;WACxB,kBAAkB;WAClB,OAAO;WACP;WACA,oBAAoB;IAC3B;;;;;;;;;iBASa,iBAAiB"}
@@ -1,7 +1,7 @@
1
- import "./contract-builder-B-Q9T1CO.mjs";
1
+ import "./contract-builder-D6JuOGA6.mjs";
2
2
  import { AuthoringTypeConstructorDescriptor, DataTypeSupport } from "@prisma/orm-framework/components/authoring";
3
- import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
4
3
  import { ValueSetRef } from "@prisma/orm-framework/contract/types";
4
+ import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
5
5
  import "@prisma/orm-framework/components/control";
6
6
  import { Binder } from "@prisma/orm-framework/psl-parser";
7
7
  //#region ../../../2-sql-family/2-authoring/contract-psl/dist/psl-column-resolution-djGEITmJ.d.mts
@@ -21,4 +21,4 @@ type ColumnDescriptor = {
21
21
  };
22
22
  //#endregion
23
23
  export { ColumnDescriptor as t };
24
- //# sourceMappingURL=psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts.map
24
+ //# sourceMappingURL=psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts","names":[],"sources":["../../../../2-sql-family/2-authoring/contract-psl/dist/psl-column-resolution-djGEITmJ.d.mts"],"mappings":";;;;;;;;KASK;WACM;WACA,aAAa;;;;;;;;;WASb,WAAW"}
1
+ {"version":3,"file":"psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts","names":[],"sources":["../../../../2-sql-family/2-authoring/contract-psl/dist/psl-column-resolution-djGEITmJ.d.mts"],"mappings":";;;;;;;;KASK;WACM;WACA,aAAa;;;;;;;;;WASb,WAAW"}