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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/{ast-De8XGuVW.mjs → ast-BDwGvnKK.mjs} +4 -30
  2. package/dist/ast-BDwGvnKK.mjs.map +1 -0
  3. package/dist/{ast-Dp6lQXUX.d.mts → ast-DbmdIKFd.d.mts} +6 -14
  4. package/dist/ast-DbmdIKFd.d.mts.map +1 -0
  5. package/dist/{attribute-specs-BgdwJoq3.d.mts → attribute-specs-CKg3a2P_.d.mts} +3 -3
  6. package/dist/{attribute-specs-BgdwJoq3.d.mts.map → attribute-specs-CKg3a2P_.d.mts.map} +1 -1
  7. package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts} +2 -2
  8. package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts.map → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts.map} +1 -1
  9. package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs} +2 -2
  10. package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs.map → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs.map} +1 -1
  11. package/dist/builder.d.mts +3 -3
  12. package/dist/builder__runtime.d.mts +9 -9
  13. package/dist/builder__runtime.mjs +1 -1
  14. package/dist/builder__types.d.mts +5 -5
  15. package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts} +3 -3
  16. package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts.map → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts.map} +1 -1
  17. package/dist/collection-methods-iWGpEfkq.d.mts +1 -0
  18. package/dist/{config-types-Ci51fcnp.d.mts → config-types-C2mASmPh.d.mts} +3 -3
  19. package/dist/{config-types-Ci51fcnp.d.mts.map → config-types-C2mASmPh.d.mts.map} +1 -1
  20. package/dist/{config-types-DyZXyiNb.mjs → config-types-CrREu8Fa.mjs} +2 -2
  21. package/dist/{config-types-DyZXyiNb.mjs.map → config-types-CrREu8Fa.mjs.map} +1 -1
  22. package/dist/{contract-builder-C4fgERNT.d.mts → contract-builder-ClsLO9DI.d.mts} +464 -101
  23. package/dist/contract-builder-ClsLO9DI.d.mts.map +1 -0
  24. package/dist/{contract-builder-B_oFvMWk.mjs → contract-builder-Du_YOA1B.mjs} +10 -9
  25. package/dist/contract-builder-Du_YOA1B.mjs.map +1 -0
  26. package/dist/contract-emitter.d.mts +1 -0
  27. package/dist/contract-emitter.d.mts.map +1 -1
  28. package/dist/contract-emitter.mjs +1 -1
  29. package/dist/contract-prisma7__provider.d.mts +1 -1
  30. package/dist/contract-prisma7__provider.mjs +6 -6
  31. package/dist/contract-psl.d.mts +3 -3
  32. package/dist/contract-psl.d.mts.map +1 -1
  33. package/dist/contract-psl.mjs +1 -1
  34. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  35. package/dist/contract-psl__attribute-specs.mjs +1 -1
  36. package/dist/contract-psl__diagnostics.d.mts +12 -0
  37. package/dist/contract-psl__diagnostics.d.mts.map +1 -0
  38. package/dist/contract-psl__diagnostics.mjs +2 -0
  39. package/dist/contract-psl__provider.d.mts +1 -1
  40. package/dist/contract-psl__provider.mjs +2 -2
  41. package/dist/contract-psl__provider.mjs.map +1 -1
  42. package/dist/contract-ts.d.mts +4 -4
  43. package/dist/contract-ts.mjs +3 -3
  44. package/dist/contract-ts__config-types.d.mts +1 -1
  45. package/dist/contract-ts__config-types.mjs +1 -1
  46. package/dist/contract-ts__contract-builder.d.mts +3 -3
  47. package/dist/contract-ts__contract-builder.mjs +2 -2
  48. package/dist/contract.d.mts +8 -8
  49. package/dist/contract.mjs +4 -4
  50. package/dist/contract__data-type.d.mts +2 -2
  51. package/dist/contract__data-type.mjs +1 -1
  52. package/dist/contract__factories.d.mts +1 -1
  53. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  54. package/dist/contract__foreign-key-materialization.mjs +2 -2
  55. package/dist/contract__index-type-validation.d.mts +1 -1
  56. package/dist/contract__types.d.mts +3 -3
  57. package/dist/contract__validators.d.mts +1 -1
  58. package/dist/contract__validators.mjs +1 -1
  59. package/dist/{control-CyY2Ijms.d.mts → control-Ced1D4yz.d.mts} +17 -16
  60. package/dist/control-Ced1D4yz.d.mts.map +1 -0
  61. package/dist/{control-_KWRuSBH.mjs → control-DiLXYDZc.mjs} +15 -10
  62. package/dist/control-DiLXYDZc.mjs.map +1 -0
  63. package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts → control-adapter-CkFfBVei-4WUzQP7G.d.mts} +8 -8
  64. package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts.map → control-adapter-CkFfBVei-4WUzQP7G.d.mts.map} +1 -1
  65. package/dist/control-adapter-pn8u9o3J.d.mts +1 -0
  66. package/dist/{data-type-gKl5DBHw.d.mts → data-type-CYsho6Yd.d.mts} +4 -12
  67. package/dist/data-type-CYsho6Yd.d.mts.map +1 -0
  68. package/dist/{data-type-BgP6Wv48.mjs → data-type-DU0mtme5.mjs} +18 -9
  69. package/dist/data-type-DU0mtme5.mjs.map +1 -0
  70. package/dist/{db-BmrN9nRS-CDq1n2be.d.mts → db-BmrN9nRS-CkMIL55t.d.mts} +12 -12
  71. package/dist/{db-BmrN9nRS-CDq1n2be.d.mts.map → db-BmrN9nRS-CkMIL55t.d.mts.map} +1 -1
  72. package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts → ddl-types-DtKZjNtN-BCpmdMQF.d.mts} +3 -3
  73. package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map → ddl-types-DtKZjNtN-BCpmdMQF.d.mts.map} +1 -1
  74. package/dist/{type-map-BMCZ_fb9-BTmWHQ-J.d.mts → default-mapping-B8_APB1M-CWcTmSQW.d.mts} +3 -22
  75. package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +1 -0
  76. package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs → derived-checks-BVSHiu2A-CzEmkTMg.mjs} +18 -6
  77. package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs.map → derived-checks-BVSHiu2A-CzEmkTMg.mjs.map} +1 -1
  78. package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts} +2 -2
  79. package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts.map → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts.map} +1 -1
  80. package/dist/diagnostics-C8YevjSU.mjs +21 -0
  81. package/dist/diagnostics-C8YevjSU.mjs.map +1 -0
  82. package/dist/{diff-C-18M6Ii.d.mts → diff-Cx7qTc2x.d.mts} +7 -7
  83. package/dist/{diff-C-18M6Ii.d.mts.map → diff-Cx7qTc2x.d.mts.map} +1 -1
  84. package/dist/{dist-Dswy-oRP.mjs → dist-D4FKWSKx.mjs} +30 -41
  85. package/dist/dist-D4FKWSKx.mjs.map +1 -0
  86. package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts → expression-CNBCbbzU-DnvLZYf4.d.mts} +3 -3
  87. package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts.map → expression-CNBCbbzU-DnvLZYf4.d.mts.map} +1 -1
  88. package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts → expression-Ck1wys3N-CBfr-HMG.d.mts} +6 -6
  89. package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts.map → expression-Ck1wys3N-CBfr-HMG.d.mts.map} +1 -1
  90. package/dist/expression-eDSWdiqh.d.mts +2 -0
  91. package/dist/{factories-BVIVyHQU.d.mts → factories-2LNVsQ2j.d.mts} +2 -2
  92. package/dist/{factories-BVIVyHQU.d.mts.map → factories-2LNVsQ2j.d.mts.map} +1 -1
  93. package/dist/family.d.mts +14 -14
  94. package/dist/family.mjs +7 -7
  95. package/dist/family__control-adapter.d.mts +2 -2
  96. package/dist/family__control.d.mts +4 -4
  97. package/dist/family__control.mjs +3 -3
  98. package/dist/family__diff.d.mts +2 -2
  99. package/dist/family__diff.mjs +1 -1
  100. package/dist/family__ir.d.mts +1 -1
  101. package/dist/family__ir.mjs +1 -1
  102. package/dist/family__migration.d.mts +1 -1
  103. package/dist/family__pack.d.mts +1 -1
  104. package/dist/family__pack.mjs +2 -2
  105. package/dist/family__psl-build.d.mts +3 -3
  106. package/dist/family__psl-build.mjs +2 -2
  107. package/dist/family__psl-infer.d.mts +1 -1
  108. package/dist/family__psl-infer.mjs +1 -1
  109. package/dist/{foreign-key-materialization-DBYDet74.d.mts → foreign-key-materialization-DJ6uhBba.d.mts} +3 -3
  110. package/dist/{foreign-key-materialization-DBYDet74.d.mts.map → foreign-key-materialization-DJ6uhBba.d.mts.map} +1 -1
  111. package/dist/{foreign-key-materialization-DyoakLGY.mjs → foreign-key-materialization-DibQ9Hjg.mjs} +2 -2
  112. package/dist/{foreign-key-materialization-DyoakLGY.mjs.map → foreign-key-materialization-DibQ9Hjg.mjs.map} +1 -1
  113. package/dist/{functions-CJ8Yf8uL.d.mts → functions-DucgffNf.d.mts} +6 -6
  114. package/dist/{functions-CJ8Yf8uL.d.mts.map → functions-DucgffNf.d.mts.map} +1 -1
  115. package/dist/{index-We-mbWnZ.d.mts → index-CJlr0Eja.d.mts} +3 -3
  116. package/dist/{index-We-mbWnZ.d.mts.map → index-CJlr0Eja.d.mts.map} +1 -1
  117. package/dist/{index-UHjF-U84.d.mts → index-DuD4M3b8.d.mts} +19 -19
  118. package/dist/{index-UHjF-U84.d.mts.map → index-DuD4M3b8.d.mts.map} +1 -1
  119. package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs → index-equivalence-DswCiq5l-DlC2yTK1.mjs} +2 -2
  120. package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs.map → index-equivalence-DswCiq5l-DlC2yTK1.mjs.map} +1 -1
  121. package/dist/index-reference-CrohwmmB.d.mts +1 -0
  122. package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts → index-reference-DJX-CNsb-C1fCMhrJ.d.mts} +3 -3
  123. package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts.map → index-reference-DJX-CNsb-C1fCMhrJ.d.mts.map} +1 -1
  124. package/dist/{index-type-validation-D7-fPxIJ.d.mts → index-type-validation-P4WLRyZA.d.mts} +2 -2
  125. package/dist/{index-type-validation-D7-fPxIJ.d.mts.map → index-type-validation-P4WLRyZA.d.mts.map} +1 -1
  126. package/dist/{interpreter-C3Ltz47m-BM7A_CmQ.mjs → interpreter-y1GRudgs-DnP0uDGL.mjs} +7 -5
  127. package/dist/interpreter-y1GRudgs-DnP0uDGL.mjs.map +1 -0
  128. package/dist/{ir-OBn7ct21.d.mts → ir-BEQwEnRB.d.mts} +2 -2
  129. package/dist/{ir-OBn7ct21.d.mts.map → ir-BEQwEnRB.d.mts.map} +1 -1
  130. package/dist/middleware-DTu2jl68.d.mts +1 -0
  131. package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts → middleware-YsFLC19Y-Dot9R8QY.d.mts} +2 -2
  132. package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts.map → middleware-YsFLC19Y-Dot9R8QY.d.mts.map} +1 -1
  133. package/dist/{migration-Bdt_UrTg.d.mts → migration-Cc102YUu.d.mts} +3 -3
  134. package/dist/{migration-Bdt_UrTg.d.mts.map → migration-Cc102YUu.d.mts.map} +1 -1
  135. package/dist/operations.d.mts +1 -1
  136. package/dist/orm-client.d.mts +38 -32
  137. package/dist/orm-client.d.mts.map +1 -1
  138. package/dist/orm-client.mjs +1 -1
  139. package/dist/{pack-DOLmsrEs.d.mts → pack-DI4Nur5d.d.mts} +3 -3
  140. package/dist/{pack-DOLmsrEs.d.mts.map → pack-DI4Nur5d.d.mts.map} +1 -1
  141. package/dist/plan-CuSLaQdv.d.mts +2 -0
  142. package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts → plan-cGEaSXHv-Bv-SBtFA.d.mts} +3 -3
  143. package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts.map → plan-cGEaSXHv-Bv-SBtFA.d.mts.map} +1 -1
  144. package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs +42 -0
  145. package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs.map +1 -0
  146. package/dist/{psl-build-C3WT2pWV.mjs → psl-build-8bx9WTUt.mjs} +113 -4
  147. package/dist/psl-build-8bx9WTUt.mjs.map +1 -0
  148. package/dist/psl-build-PXVtl8gM.d.mts +73 -0
  149. package/dist/psl-build-PXVtl8gM.d.mts.map +1 -0
  150. package/dist/{psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts → psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts} +5 -5
  151. package/dist/psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts.map +1 -0
  152. package/dist/{psl-field-resolution-ztVU6TV2-BSBajXoF.mjs → psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs} +7 -41
  153. package/dist/psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs.map +1 -0
  154. package/dist/{psl-infer-DHO72J_m.mjs → psl-infer-CG0_wra6.mjs} +2 -2
  155. package/dist/{psl-infer-DHO72J_m.mjs.map → psl-infer-CG0_wra6.mjs.map} +1 -1
  156. package/dist/{psl-infer-Dp_NzWE0.d.mts → psl-infer-g040TwAr.d.mts} +4 -6
  157. package/dist/psl-infer-g040TwAr.d.mts.map +1 -0
  158. package/dist/query-lane-context-C29KGcgz.d.mts +1 -0
  159. package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts → query-lane-context-C42-u9L1-CUP3uW4A.d.mts} +6 -6
  160. package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts.map → query-lane-context-C42-u9L1-CUP3uW4A.d.mts.map} +1 -1
  161. package/dist/relational-core.d.mts +13 -13
  162. package/dist/relational-core.mjs +2 -2
  163. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  164. package/dist/relational-core__ast.d.mts +4 -4
  165. package/dist/relational-core__ast.mjs +2 -2
  166. package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
  167. package/dist/relational-core__collection-methods.d.mts +2 -2
  168. package/dist/relational-core__contract-free.d.mts +3 -3
  169. package/dist/relational-core__expression.d.mts +3 -3
  170. package/dist/relational-core__functions.d.mts +1 -1
  171. package/dist/relational-core__index-reference.d.mts +2 -2
  172. package/dist/relational-core__middleware.d.mts +2 -2
  173. package/dist/relational-core__plan.d.mts +3 -3
  174. package/dist/relational-core__query-lane-context.d.mts +2 -2
  175. package/dist/relational-core__types.d.mts +2 -2
  176. package/dist/runtime.d.mts +4 -4
  177. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  178. package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts → schema-differ-CqWOkoW9-DAcuiQPU.d.mts} +4 -4
  179. package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts.map → schema-differ-CqWOkoW9-DAcuiQPU.d.mts.map} +1 -1
  180. package/dist/schema-ir.d.mts +2 -2
  181. package/dist/schema-ir.mjs +1 -1
  182. package/dist/schema-ir__types.d.mts +3 -3
  183. package/dist/schema-ir__types.mjs +1 -1
  184. package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs → schema-verify-DIfHSB4I-CU6ViTDO.mjs} +2 -2
  185. package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs.map → schema-verify-DIfHSB4I-CU6ViTDO.mjs.map} +1 -1
  186. package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs} +2 -2
  187. package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs.map → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs.map} +1 -1
  188. package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts} +2 -2
  189. package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts.map} +1 -1
  190. package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts → transaction-state-DR3nKTmH-CkkfiS9z.d.mts} +9 -9
  191. package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts.map → transaction-state-DR3nKTmH-CkkfiS9z.d.mts.map} +1 -1
  192. package/dist/types-BhcBOXu7.d.mts +1 -0
  193. package/dist/{types-DIZSW9JI-DNUF-RnL.d.mts → types-C-z8HyiZ-1Nhw0pHj.d.mts} +17 -3
  194. package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +1 -0
  195. package/dist/types-CJK7FBdw.d.mts +1 -0
  196. package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts → types-Cl4MLNrS-GHKQvTNi.d.mts} +8 -8
  197. package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts.map → types-Cl4MLNrS-GHKQvTNi.d.mts.map} +1 -1
  198. package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts → types-CzxOObSY-DTQ2rnLF.d.mts} +7 -7
  199. package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts.map → types-CzxOObSY-DTQ2rnLF.d.mts.map} +1 -1
  200. package/dist/{types-D0GFxty0-CP8b4dR3.mjs → types-DvhckjSz-Cm0Oodhr.mjs} +3 -2
  201. package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +1 -0
  202. package/dist/types-HD5m-h8B.d.mts +67 -0
  203. package/dist/types-HD5m-h8B.d.mts.map +1 -0
  204. package/dist/{types-Sh5HuaZE-CqThc46M.d.mts → types-Sh5HuaZE-Dq4AUzl7.d.mts} +2 -2
  205. package/dist/{types-Sh5HuaZE-CqThc46M.d.mts.map → types-Sh5HuaZE-Dq4AUzl7.d.mts.map} +1 -1
  206. package/dist/{types-DFZhLz18-Msi8wwig.d.mts → types-zwKzjyma-CxZkmkUI.d.mts} +114 -3
  207. package/dist/types-zwKzjyma-CxZkmkUI.d.mts.map +1 -0
  208. package/dist/{validators-CudqzmkF.d.mts → validators-BifwoR5e.d.mts} +2 -2
  209. package/dist/{validators-CudqzmkF.d.mts.map → validators-BifwoR5e.d.mts.map} +1 -1
  210. package/dist/{validators-BMWQ7-5D.mjs → validators-CfUrQdiv.mjs} +2 -2
  211. package/dist/{validators-BMWQ7-5D.mjs.map → validators-CfUrQdiv.mjs.map} +1 -1
  212. package/package.json +19 -18
  213. package/dist/ast-De8XGuVW.mjs.map +0 -1
  214. package/dist/ast-Dp6lQXUX.d.mts.map +0 -1
  215. package/dist/collection-methods-DoBrRR69.d.mts +0 -1
  216. package/dist/contract-builder-B_oFvMWk.mjs.map +0 -1
  217. package/dist/contract-builder-C4fgERNT.d.mts.map +0 -1
  218. package/dist/control-CyY2Ijms.d.mts.map +0 -1
  219. package/dist/control-_KWRuSBH.mjs.map +0 -1
  220. package/dist/control-adapter-DB7MPI5L.d.mts +0 -1
  221. package/dist/data-type-BgP6Wv48.mjs.map +0 -1
  222. package/dist/data-type-gKl5DBHw.d.mts.map +0 -1
  223. package/dist/dist-Dswy-oRP.mjs.map +0 -1
  224. package/dist/expression-DWcDQHh9.d.mts +0 -2
  225. package/dist/index-reference-ZZrszBDq.d.mts +0 -1
  226. package/dist/interpreter-C3Ltz47m-BM7A_CmQ.mjs.map +0 -1
  227. package/dist/middleware-DOKGNt72.d.mts +0 -1
  228. package/dist/plan-_8dKi13Q.d.mts +0 -2
  229. package/dist/psl-build-C3WT2pWV.mjs.map +0 -1
  230. package/dist/psl-build-TrbDSGOA.d.mts +0 -13
  231. package/dist/psl-build-TrbDSGOA.d.mts.map +0 -1
  232. package/dist/psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts.map +0 -1
  233. package/dist/psl-field-resolution-ztVU6TV2-BSBajXoF.mjs.map +0 -1
  234. package/dist/psl-infer-Dp_NzWE0.d.mts.map +0 -1
  235. package/dist/query-lane-context-DW5q2RAY.d.mts +0 -1
  236. package/dist/type-map-BMCZ_fb9-BTmWHQ-J.d.mts.map +0 -1
  237. package/dist/types-BkA6tyT-.d.mts +0 -1
  238. package/dist/types-D0GFxty0-CP8b4dR3.mjs.map +0 -1
  239. package/dist/types-DFZhLz18-Msi8wwig.d.mts.map +0 -1
  240. package/dist/types-DIZSW9JI-DNUF-RnL.d.mts.map +0 -1
  241. package/dist/types-DqSCaTK3.d.mts +0 -1
  242. package/dist/types-Uv3oTMAb.d.mts +0 -18
  243. package/dist/types-Uv3oTMAb.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-build-8bx9WTUt.mjs","names":[],"sources":["../../../../2-sql/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 { SQL_EXPRESSION_TAG } from \"@internal/sql-contract/sql-expression\";\nimport { authoringEntryType, authoringTypeConstructorArguments, authoringTypeConstructors, instantiateAuthoringTypeConstructor, printTaggedLiteral } from \"@internal/framework-components/authoring\";\nimport { canonicalFormOf, dataTypeId } from \"@internal/framework-components/codec\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { dataTypeParams, isSqlDataType, numeralText, resolveReportedSqlType } from \"@internal/sql-contract/data-type\";\nimport { defaultInCanonicalForm } from \"@internal/sql-schema-ir/types\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { escapePslString } from \"@internal/sql-contract/data-type-support\";\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* A type constructor argument as PSL writes it: a number as written, a string between quotes.\n* Undefined for a string PSL cannot carry, because a quote, backslash or line break in it would read\n* back differently.\n*/\nfunction pslTypeArgumentText(value) {\n\tif (typeof value !== \"string\") return String(value);\n\treturn escapePslString(value) === value ? `\"${value}\"` : void 0;\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}\nfunction writtenCall(constructors, dataTypes, reported) {\n\tconst resolved = resolveReportedSqlType(reported, dataTypes);\n\tconst marked = resolved && constructors.get(resolved.dataType);\n\tconst call = resolved && marked && fewestArgumentsCall(marked, resolved.typeParams);\n\tif (call === void 0) return void 0;\n\tconst args = call.args.map(pslTypeArgumentText);\n\treturn args.every((arg) => arg !== void 0) ? {\n\t\tpath: call.path,\n\t\targs\n\t} : void 0;\n}\n/**\n* The type of every column of `tables` that `isEnumColumn` does not claim: the call, with the\n* fewest arguments, to the constructor marked `inferred` for the data type that claims the\n* column's reported type. When any column has no such call, throws\n* `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.\n*/\nfunction 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 call = writtenCall(input.constructors, dataTypes, reported);\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 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 (`resolvedDefaultsEqual`), 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 = writeDefaultLiteral(columnDefault.value, options);\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}\nfunction writingSurface(entries) {\n\tconst entryOf = /* @__PURE__ */ new Map();\n\tlet classify;\n\tlet plainStringType;\n\tlet plainBooleanType;\n\tconst tagTypes = [];\n\tfor (const [key, entry] of Object.entries(entries)) {\n\t\tconst written = entry.written;\n\t\tif (written.kind === \"tag\") {\n\t\t\tconst type = dataTypeId(authoringEntryType(key, entry));\n\t\t\tif (!entryOf.has(type)) entryOf.set(type, entry);\n\t\t\ttagTypes.push(type);\n\t\t\tcontinue;\n\t\t}\n\t\tif (written.syntax === \"number\") {\n\t\t\tclassify = written.classify;\n\t\t\tfor (const type of written.types) entryOf.set(type, entry);\n\t\t\tcontinue;\n\t\t}\n\t\tentryOf.set(key, entry);\n\t\tif (written.syntax === \"string\") plainStringType = dataTypeId(key);\n\t\telse plainBooleanType = dataTypeId(key);\n\t}\n\treturn {\n\t\tentryOf,\n\t\tclassify,\n\t\tplainStringType,\n\t\tplainBooleanType,\n\t\ttagTypes\n\t};\n}\n/**\n* Every type the stored form could be a value of, in the order a written value would be read: a\n* number or numeral text through the classifier first, then the plain syntax that matches the\n* shape, then each tag, whose canonical form is a whole document.\n*/\nfunction classifications(value, surface) {\n\tconst found = [];\n\tif (typeof value === \"number\") {\n\t\tconst classified = surface.classify?.(numeralText(value));\n\t\treturn classified === void 0 ? [] : [classified];\n\t}\n\tif (typeof value === \"boolean\") return surface.plainBooleanType === void 0 ? [] : [{\n\t\ttype: surface.plainBooleanType,\n\t\tvalue\n\t}];\n\tif (typeof value === \"string\") {\n\t\tconst classified = surface.classify?.(value);\n\t\tif (classified !== void 0) found.push(classified);\n\t\tif (surface.plainStringType !== void 0) found.push({\n\t\t\ttype: surface.plainStringType,\n\t\t\tvalue\n\t\t});\n\t}\n\tfor (const type of surface.tagTypes) found.push({\n\t\ttype,\n\t\tvalue\n\t});\n\treturn found;\n}\n/** The stored form the column takes this value as, or `undefined` when its type takes no such value. */\nfunction admitted(candidate, columnDataType, lookup) {\n\tif (candidate.type === columnDataType) return candidate.value;\n\tconst cast = lookup.get(columnDataType)?.casts[candidate.type];\n\tif (cast === void 0) return void 0;\n\ttry {\n\t\treturn cast(candidate.value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The text of the literal: what the entry prints, before the syntax that fences it. */\nfunction printedText(entry, value) {\n\ttry {\n\t\treturn entry.print(value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** What the entry reads the printed text back as, which for a number is the classifier's answer. */\nfunction readBack(entry, type, text) {\n\tconst written = entry.written;\n\ttry {\n\t\treturn written.kind === \"plain\" && written.syntax === \"number\" ? written.classify(text) : {\n\t\t\ttype,\n\t\t\tvalue: written.parse(text)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction literalText(entry, text) {\n\tconst written = entry.written;\n\tif (written.kind === \"tag\") return printTaggedLiteral(written.tag, text);\n\treturn written.syntax === \"string\" ? `\"${escapePslString(text)}\"` : text;\n}\n/**\n* The value written as the literal of one of its types, proven by reading the text straight back:\n* the same entry, the same cast, and the stored form again.\n*/\nfunction writeScalar(value, columnDataType, lookup, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst stored = admitted(candidate, columnDataType, lookup);\n\t\tif (stored === void 0 || !sameForm(stored, value)) continue;\n\t\tconst text = printedText(entry, candidate.value);\n\t\tif (text === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, text);\n\t\tif (reread === void 0) continue;\n\t\tconst restored = admitted(reread, columnDataType, lookup);\n\t\tif (restored === void 0 || !sameForm(restored, value)) continue;\n\t\treturn literalText(entry, text);\n\t}\n}\n/** One written element of a list, printed as a value of any type, with no column type to admit it. */\nfunction writeElement(value, of, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tif (!of.includes(candidate.type)) continue;\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst text = printedText(entry, candidate.value);\n\t\tif (text === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, text);\n\t\tif (reread === void 0 || !of.includes(reread.type)) continue;\n\t\treturn {\n\t\t\ttext: literalText(entry, text),\n\t\t\tvalue: reread.value\n\t\t};\n\t}\n}\n/**\n* A written list on a scalar column, which the column type's list cast turns into its one value.\n* Each element is classified on its own and must be of a type the cast takes.\n*/\nfunction writeListCast(value, columnDataType, lookup, surface) {\n\tconst listCast = lookup.get(columnDataType)?.listCast;\n\tif (listCast === void 0) return void 0;\n\tconst parts = [];\n\tconst elements = [];\n\tfor (const element of value) {\n\t\tconst written = writeElement(element, listCast.of, surface);\n\t\tif (written === void 0) return void 0;\n\t\tparts.push(written.text);\n\t\telements.push(written.value);\n\t}\n\ttry {\n\t\tif (!sameForm(listCast.cast(elements), value)) return void 0;\n\t} catch {\n\t\treturn;\n\t}\n\treturn `[${parts.join(\", \")}]`;\n}\nfunction writeDefaultLiteral(stored, options) {\n\tif (stored instanceof Date) return void 0;\n\tconst { dataTypes, columnCodec } = options ?? {};\n\tif (dataTypes === void 0 || columnCodec === void 0) return void 0;\n\tconst { entries, lookup } = dataTypes;\n\tconst columnDataType = columnCodec.dataType;\n\tconst { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec, lookup), options?.list === true);\n\tif (value instanceof Date) return void 0;\n\tconst surface = writingSurface(entries);\n\tif (options?.list === true) {\n\t\tif (!Array.isArray(value)) return void 0;\n\t\tconst parts = [];\n\t\tfor (const element of value) {\n\t\t\tconst written = writeScalar(element, columnDataType, lookup, surface);\n\t\t\tif (written === void 0) return void 0;\n\t\t\tparts.push(written);\n\t\t}\n\t\treturn `[${parts.join(\", \")}]`;\n\t}\n\tconst written = writeScalar(value, columnDataType, lookup, surface);\n\tif (written !== void 0) return written;\n\treturn Array.isArray(value) ? writeListCast(value, columnDataType, lookup, surface) : void 0;\n}\n/** Whether two canonical forms are the same JSON value, member by member and element by element. */\nfunction sameForm(left, right) {\n\tif (left === right) return true;\n\tif (Array.isArray(left) !== Array.isArray(right)) return false;\n\tif (typeof left !== \"object\" || typeof right !== \"object\" || left === null || right === null) return false;\n\tconst members = Object.entries(left);\n\tconst others = new Map(Object.entries(right));\n\treturn members.length === others.size && members.every(([key, member]) => {\n\t\tconst other = others.get(key);\n\t\treturn other !== void 0 && sameForm(member, other);\n\t});\n}\n//#endregion\nexport { fewestArgumentsCall, inferColumnTypes, inferredTypeConstructors, mapDefault, pslTypeArgumentText, toEnumMemberName };\n\n//# sourceMappingURL=psl-build.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,yBAAyB,OAAO;CACxC,MAAM,wBAAwB,IAAI,IAAI;CACtC,KAAK,MAAM,EAAE,MAAM,gBAAgB,0BAA0B,MAAM,cAAc,GAAG;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;EACA,OAAO,IAAI,MAAM,KAAK,IAAI,EAAE;CAC7B;CACA,MAAM,UAAU,YAAY,OAAO,gBAAgB,QAAQ,OAAO;CAClE,IAAI,YAAY,KAAK,GAAG,OAAO;CAC/B,OAAO,MAAM,QAAQ,KAAK,IAAI,cAAc,OAAO,gBAAgB,QAAQ,OAAO,IAAI,KAAK;AAC5F;;AAEA,SAAS,SAAS,MAAM,OAAO;CAC9B,IAAI,SAAS,OAAO,OAAO;CAC3B,IAAI,MAAM,QAAQ,IAAI,MAAM,MAAM,QAAQ,KAAK,GAAG,OAAO;CACzD,IAAI,OAAO,SAAS,YAAY,OAAO,UAAU,YAAY,SAAS,QAAQ,UAAU,MAAM,OAAO;CACrG,MAAM,UAAU,OAAO,QAAQ,IAAI;CACnC,MAAM,SAAS,IAAI,IAAI,OAAO,QAAQ,KAAK,CAAC;CAC5C,OAAO,QAAQ,WAAW,OAAO,QAAQ,QAAQ,OAAO,CAAC,KAAK,YAAY;EACzE,MAAM,QAAQ,OAAO,IAAI,GAAG;EAC5B,OAAO,UAAU,KAAK,KAAK,SAAS,QAAQ,KAAK;CAClD,CAAC;AACF"}
@@ -0,0 +1,73 @@
1
+ import { d as SqlColumnIR } from "./types-C-z8HyiZ-1Nhw0pHj.mjs";
2
+ import "./types-CJK7FBdw.mjs";
3
+ import { n as SqlDataType, s as SqlTypeParams } from "./data-type-CYsho6Yd.mjs";
4
+ import "./default-mapping-B8_APB1M-CWcTmSQW.mjs";
5
+ import { AuthoringTypeConstructorCall, AuthoringTypeConstructorDescriptor, AuthoringTypeNamespace } from "@prisma/orm-framework/components/authoring";
6
+ import { CodecLookupWithDescriptors, DataTypeLookup } from "@prisma/orm-framework/components/codec";
7
+ //#region ../../../2-sql/9-family/dist/psl-build.d.mts
8
+ //#region src/core/psl-build/inferred-type-constructors.d.ts
9
+ /** The type constructor `contract infer` writes for a data type, with the data type it produces. */
10
+ interface InferredTypeConstructor {
11
+ readonly path: readonly string[];
12
+ readonly descriptor: AuthoringTypeConstructorDescriptor;
13
+ readonly dataType: SqlDataType;
14
+ }
15
+ /** The constructors marked `inferred` in a stack, keyed by the id of the data type each produces. */
16
+ type InferredTypeConstructors = ReadonlyMap<string, InferredTypeConstructor>;
17
+ /** Every constructor of `authoringTypes` marked `inferred`, by the data type its codec represents. */
18
+ declare function inferredTypeConstructors(input: {
19
+ readonly authoringTypes: AuthoringTypeNamespace;
20
+ readonly codecLookup: Pick<CodecLookupWithDescriptors, 'descriptorFor'>;
21
+ readonly dataTypeLookup: DataTypeLookup;
22
+ }): InferredTypeConstructors;
23
+ /**
24
+ * The call to `marked` with the fewest arguments that produces `params`, the normal form of a
25
+ * column's data type parameters: arguments are dropped from the end while the normal form of what
26
+ * the call produces stays `params`. Undefined when the constructor cannot produce them, such as one
27
+ * whose argument names another entity.
28
+ */
29
+ declare function fewestArgumentsCall(marked: InferredTypeConstructor, params: SqlTypeParams): AuthoringTypeConstructorCall | undefined;
30
+ /**
31
+ * A type constructor argument as PSL writes it: a number as written, a string between quotes.
32
+ * Undefined for a string PSL cannot carry, because a quote, backslash or line break in it would read
33
+ * back differently.
34
+ */
35
+ declare function pslTypeArgumentText(value: unknown): string | undefined;
36
+ //#endregion
37
+ //#region src/core/psl-build/column-types.d.ts
38
+ /** A call to a type constructor as PSL writes it: the constructor's path and its arguments' text. */
39
+ interface PslTypeCall {
40
+ readonly path: readonly string[];
41
+ readonly args: readonly string[];
42
+ }
43
+ /** The PSL type `contract infer` writes for a column that is not an enum, by table and column name. */
44
+ type ColumnTypeOf = (tableName: string, columnName: string) => PslTypeCall;
45
+ /** One introspected table, with the schema it was read from. */
46
+ interface IntrospectedTable {
47
+ readonly schemaName: string;
48
+ readonly tableName: string;
49
+ readonly columns: readonly SqlColumnIR[];
50
+ }
51
+ /**
52
+ * The type of every column of `tables` that `isEnumColumn` does not claim: the call, with the
53
+ * fewest arguments, to the constructor marked `inferred` for the data type that claims the
54
+ * column's reported type. When any column has no such call, throws
55
+ * `CONTRACT.INFER_COLUMN_TYPE_UNCLAIMED` listing every one of them.
56
+ */
57
+ declare function inferColumnTypes(input: {
58
+ readonly tables: readonly IntrospectedTable[];
59
+ readonly constructors: InferredTypeConstructors;
60
+ readonly isEnumColumn: (column: SqlColumnIR) => boolean;
61
+ }): ColumnTypeOf;
62
+ //#endregion
63
+ //#region src/core/psl-build/psl-names.d.ts
64
+ /**
65
+ * PSL member name for a native-enum value. The value itself always prints
66
+ * explicitly (`member = "value"`), so the returned name never needs a map:
67
+ * a value that already is a valid, non-reserved identifier is kept verbatim
68
+ * (case included); anything else is camelCased/escaped like a field name.
69
+ */
70
+ declare function toEnumMemberName(value: string): string;
71
+ //#endregion
72
+ export { PslTypeCall as a, inferredTypeConstructors as c, IntrospectedTable as i, pslTypeArgumentText as l, InferredTypeConstructor as n, fewestArgumentsCall as o, InferredTypeConstructors as r, inferColumnTypes as s, ColumnTypeOf as t, toEnumMemberName as u };
73
+ //# sourceMappingURL=psl-build-PXVtl8gM.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-build-PXVtl8gM.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-build.d.mts"],"mappings":";;;;;;;;;UAOU;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;;;;;;iBAM7E,oBAAoB;;;;UAI3B;WACC;WACA;;;KAGN,gBAAgB,mBAAmB,uBAAuB;;UAErD;WACC;WACA;WACA,kBAAkB;;;;;;;;iBAQZ,iBAAiB;WACvB,iBAAiB;WACjB,cAAc;WACd,eAAe,QAAQ;IAC9B;;;;;;;;;iBASa,iBAAiB"}
@@ -1,10 +1,10 @@
1
- import "./contract-builder-C4fgERNT.mjs";
1
+ import "./contract-builder-ClsLO9DI.mjs";
2
2
  import { AuthoringTypeConstructorDescriptor } from "@prisma/orm-framework/components/authoring";
3
3
  import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
4
4
  import { ColumnDefault, ExecutionMutationDefaultPhases, ValueSetRef } from "@prisma/orm-framework/contract/types";
5
5
  import { Binder } from "@prisma/orm-framework/psl-parser";
6
6
  import "@prisma/orm-framework/components/control";
7
- //#region ../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-Cj4gkj9H.d.mts
7
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-BCkhNzOK.d.mts
8
8
  //#region src/psl-column-resolution.d.ts
9
9
  type ColumnDescriptor = {
10
10
  readonly codecId: string;
@@ -14,12 +14,12 @@ type ColumnDescriptor = {
14
14
  * Storage-plane value-set ref, set only by an entity-ref type constructor
15
15
  * (e.g. `pg.enum(Ref)`) resolving `Ref` against a document-local
16
16
  * value-set-deriving entity. Threaded straight onto the `StorageColumn` —
17
- * this is what drives value-set → codec typing (`computeColumnType`
18
- * gating on `column.valueSet`); every other resolution path leaves it
17
+ * the emitter types such a column by its value set (`ColumnTypeOverrides`
18
+ * in the emitted `contract.d.ts`); every other resolution path leaves it
19
19
  * unset.
20
20
  */
21
21
  readonly valueSet?: ValueSetRef;
22
22
  };
23
23
  //#endregion
24
24
  export { ColumnDescriptor as t };
25
- //# sourceMappingURL=psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts.map
25
+ //# sourceMappingURL=psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-BCkhNzOK.d.mts"],"mappings":";;;;;;;;KAQK;WACM;WACA;WACA,aAAa;;;;;;;;;WASb,WAAW"}
@@ -1,6 +1,7 @@
1
1
  import { m as sqlTextFromCanonical, t as SQL_EXPRESSION_DATA_TYPE_ID } from "./sql-expression-DSRILiU2.mjs";
2
- import { n as checkSqlDefaultText, o as reservedSqlDefaultText } from "./validators-BMWQ7-5D.mjs";
3
- import { a as storedAsListColumn, i as isValueObjectMember } from "./derived-checks-BPWwhTds-Cy93UfrT.mjs";
2
+ import { n as checkSqlDefaultText, o as reservedSqlDefaultText } from "./validators-CfUrQdiv.mjs";
3
+ import { a as storedAsListColumn, i as isValueObjectMember } from "./derived-checks-BVSHiu2A-CzEmkTMg.mjs";
4
+ import { n as getAttribute, o as storageName, t as formatDbAttributeMigrationMessage } from "./psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs";
4
5
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
5
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
7
  import { admittedForms, castTypedValue, describeExpected, describeRefusal, describeRefusedValueType, exactRewrite, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, readWrittenValue, tagForm, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
@@ -8,47 +9,12 @@ import { canonicalFormOf, codecForRef } from "@prisma/orm-framework/components/c
8
9
  import { blindCast } from "@prisma/orm-framework/utils/casts";
9
10
  import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
10
11
  import { FunctionCallAst } from "@prisma/orm-framework/psl-parser/syntax";
11
- import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
12
+ import { invariant } from "@prisma/orm-framework/utils/assertions";
12
13
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
13
14
  import { bool, dataTypeValue, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, identifier, interpretAttribute, leafDiagnostic, list, mapArg, modelAttribute, nodePslSpan, numLiteral, oneOf, optional, record, referencedFieldRef, str, taggedLiteral, typeReferenceNode, writtenList, writtenScalar } from "@prisma/orm-framework/psl-parser";
14
15
  import { describeTaggedLiteralFailure as describeTaggedLiteralFailure$1 } from "@prisma/orm-framework/components/control";
15
16
  import { instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled } from "@prisma/orm-framework/psl-parser/interpret";
16
- //#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-ztVU6TV2.mjs
17
- function storageName(symbol, physicalNames) {
18
- const name = physicalNames.get(symbol);
19
- assertDefined(name, "Physical names are populated for every model and field before lowering");
20
- return name;
21
- }
22
- function getAttribute(attributes, name) {
23
- return attributes?.find((attribute) => attribute.name === name);
24
- }
25
- function formatDbAttributeMigrationMessage(attribute) {
26
- const renderedArguments = attribute.args.map((argument) => argument.kind === "named" && argument.name !== void 0 ? `${argument.name}: ${argument.value}` : argument.value).join(", ");
27
- const argumentList = attribute.args.length === 0 ? "" : `(${renderedArguments})`;
28
- const constructorName = attribute.name.slice(3);
29
- return `@${attribute.name}${argumentList} is no longer supported; use ${constructorName}${argumentList} in type position`;
30
- }
31
- function getNamedArgument(attribute, name) {
32
- const entry = attribute.args.find((arg) => arg.kind === "named" && arg.name === name);
33
- if (entry?.kind !== "named") return;
34
- return entry.value;
35
- }
36
- function mapFieldNamesToColumns(input) {
37
- const columns = [];
38
- for (const fieldName of input.fieldNames) {
39
- const field = input.model.fields[fieldName];
40
- if (field === void 0) {
41
- input.diagnostics.push({
42
- code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
43
- message: `${input.entityLabel} references unknown field "${input.model.name}.${fieldName}"`,
44
- ...input.source.at(input.span)
45
- });
46
- return;
47
- }
48
- columns.push(storageName(field, input.physicalNames));
49
- }
50
- return columns;
51
- }
17
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-4U7Plpfb.mjs
52
18
  function contractError(code, message, options) {
53
19
  return structuredError(code, message, options);
54
20
  }
@@ -1973,6 +1939,6 @@ function collectResolvedFields(input) {
1973
1939
  return resolvedFields;
1974
1940
  }
1975
1941
  //#endregion
1976
- export { storageName as C, sqlAttributeSpecs as S, modelCoordinateKey as _, describeUnsupportedSqlAttribute as a, readWrittenNumberForCodec as b, getAttribute as c, instantiateFieldTypeConstructor as d, instantiatePslTypeConstructor as f, modelAttributeSpecsFrom as g, mapFieldNamesToColumns as h, contractError as i, getAuthoringEntity as l, interpretModelAttribute as m, bareTypeConstructorOf as n, fieldSpecContext as o, interpretFieldAttribute as p, collectResolvedFields as r, formatDbAttributeMigrationMessage as s, PSL_CHECK_ON_STI_VARIANT as t, getNamedArgument as u, modelSpecContext as v, toNamedTypeFieldDescriptor as w, resolveFieldTypeDescriptor as x, readDataTypeDefault as y };
1942
+ export { resolveFieldTypeDescriptor as _, describeUnsupportedSqlAttribute as a, instantiateFieldTypeConstructor as c, interpretModelAttribute as d, modelAttributeSpecsFrom as f, readWrittenNumberForCodec as g, readDataTypeDefault as h, contractError as i, instantiatePslTypeConstructor as l, modelSpecContext as m, bareTypeConstructorOf as n, fieldSpecContext as o, modelCoordinateKey as p, collectResolvedFields as r, getAuthoringEntity as s, PSL_CHECK_ON_STI_VARIANT as t, interpretFieldAttribute as u, sqlAttributeSpecs as v, toNamedTypeFieldDescriptor as y };
1977
1943
 
1978
- //# sourceMappingURL=psl-field-resolution-ztVU6TV2-BSBajXoF.mjs.map
1944
+ //# sourceMappingURL=psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs","names":["describeTaggedLiteralFailure"],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-4U7Plpfb.mjs"],"sourcesContent":["import { n as getAttribute, o as storageName, t as formatDbAttributeMigrationMessage } from \"./psl-attribute-parsing-BCsFWsSp.mjs\";\nimport { bool, dataTypeValue, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, identifier, interpretAttribute, leafDiagnostic, list, mapArg, modelAttribute, nodePslSpan, numLiteral, oneOf, optional, record, referencedFieldRef, str, taggedLiteral, typeReferenceNode, writtenList, writtenScalar } from \"@internal/psl-parser\";\nimport { isValueObjectMember, storedAsListColumn } from \"@internal/sql-contract-ts/contract-builder\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { admittedForms, castTypedValue, describeExpected, describeRefusal, describeRefusedValueType, exactRewrite, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, readWrittenValue, tagForm, validateAuthoringHelperArguments, validateAuthoringTypeParams } from \"@internal/framework-components/authoring\";\nimport { describeTaggedLiteralFailure } from \"@internal/framework-components/control\";\nimport { instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled } from \"@internal/psl-parser/interpret\";\nimport { SQL_EXPRESSION_DATA_TYPE_ID, SQL_EXPRESSION_TAG, sqlTextFromCanonical } from \"@internal/sql-contract/sql-expression\";\nimport { checkSqlDefaultText, reservedSqlDefaultText } from \"@internal/sql-contract/validators\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { canonicalFormOf, codecForRef } from \"@internal/framework-components/codec\";\nimport { FunctionCallAst } from \"@internal/psl-parser/syntax\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/data-type-default.ts\n/** A written value the column's codec refuses. */\nconst PSL_INVALID_DEFAULT_LITERAL = \"PSL_INVALID_DEFAULT_LITERAL\";\n/** A written value whose data type the receiving type neither is nor casts from. */\nconst PSL_VALUE_TYPE_INCOMPATIBLE = \"PSL_VALUE_TYPE_INCOMPATIBLE\";\n/** A single value written as the default of a column that holds a list. */\nconst PSL_DEFAULT_LIST_EXPECTED = \"PSL_DEFAULT_LIST_EXPECTED\";\nfunction messageOf(error) {\n\treturn error instanceof Error ? error.message : String(error);\n}\nfunction refused(refusal, suggestedTypes) {\n\treturn {\n\t\tok: false,\n\t\trefusal,\n\t\tsuggestedTypes\n\t};\n}\nfunction readOneValue(dataTypes, written, elementIndex, suggestedTypes) {\n\tconst read = readWrittenValue(dataTypes, written);\n\treturn read.ok ? {\n\t\tok: true,\n\t\ttyped: read.value\n\t} : refused({\n\t\t...read.failure,\n\t\telementIndex\n\t}, suggestedTypes);\n}\n/** The column's `typeParams` as the codec reference carries them, so `vector(3)` checks its length. */\nfunction codecRefTypeParams(typeParams) {\n\treturn typeParams === void 0 ? void 0 : blindCast(typeParams);\n}\n/** A value in the canonical form of the column's values, when they have one. */\nfunction inCanonicalForm(toCanonicalForm, value, elementIndex, suggestedTypes) {\n\tif (toCanonicalForm === void 0) return {\n\t\tok: true,\n\t\tvalue\n\t};\n\ttry {\n\t\treturn {\n\t\t\tok: true,\n\t\t\tvalue: toCanonicalForm(value)\n\t\t};\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn {\n\t\t\tok: false,\n\t\t\trefusal: {\n\t\t\t\tkind: \"unreadable\",\n\t\t\t\tmessage: messageOf(error),\n\t\t\t\telementIndex\n\t\t\t},\n\t\t\tsuggestedTypes\n\t\t};\n\t}\n}\n/**\n* The column's codec descriptor, and `read`, which reads a value in its stored JSON form with the column's codec, built with the column's type parameters, and gives it the canonical form of the column's values.\n*/\nfunction storedValueReader(input) {\n\tconst descriptor = input.codecLookup.descriptorFor(input.column.codecId);\n\tconst codec = codecForRef(input.codecLookup, {\n\t\tcodecId: input.column.codecId,\n\t\t...ifDefined(\"typeParams\", codecRefTypeParams(input.column.typeParams))\n\t});\n\tif (codec === void 0 || descriptor === void 0) throw new InternalError(`Field \"${input.fieldPath}\": no codec descriptor is registered for \"${input.column.codecId}\", but the column was resolved from one.`);\n\tconst suggestedTypes = [descriptor.dataType];\n\tconst toCanonicalForm = canonicalFormOf(descriptor, input.dataTypeLookup);\n\tconst read = (written, elementIndex) => {\n\t\ttry {\n\t\t\tcodec.decodeJson(written);\n\t\t} catch (error) {\n\t\t\tif (isInternalError(error)) throw error;\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\trefusal: {\n\t\t\t\t\tkind: \"refused-by-codec\",\n\t\t\t\t\tcodecId: input.column.codecId,\n\t\t\t\t\tmessage: messageOf(error),\n\t\t\t\t\telementIndex\n\t\t\t\t},\n\t\t\t\tsuggestedTypes\n\t\t\t};\n\t\t}\n\t\treturn inCanonicalForm(toCanonicalForm, written, elementIndex, suggestedTypes);\n\t};\n\treturn {\n\t\tdescriptor,\n\t\tread\n\t};\n}\n/**\n* Reads a value already in its stored JSON form, such as one member of a JSON document default, with the column's codec, and gives it the canonical form of the column's values. Worded as {@link lowerDataTypeDefault} words the same refusals.\n*/\nfunction readStoredValue(input) {\n\tconst reading = storedValueReader(input).read(input.value, void 0);\n\treturn reading.ok ? reading : {\n\t\tok: false,\n\t\t...storedRefusalMessage(reading.refusal, `Field \"${input.fieldPath}\"`)\n\t};\n}\n/**\n* Read one `@default(...)` value for a column, refusing in parts so each contract source words its\n* own diagnostic. `isList` selects the check: a list column's elements are each read and cast\n* against the element codec's data type, while a scalar column takes a written list only through\n* its type's list cast — which is how `pgvector.Vector(3) @default([0.1, 0.2])` is read.\n*/\nfunction readDataTypeDefault(input) {\n\tconst { descriptor, read: readStored } = storedValueReader({\n\t\t...input,\n\t\tdataTypeLookup: input.dataTypes.lookup\n\t});\n\tconst columnType = descriptor.dataType;\n\tconst suggestedTypes = [columnType];\n\tconst readOne = (written, elementIndex) => {\n\t\tconst read = readOneValue(input.dataTypes, written, elementIndex, suggestedTypes);\n\t\tif (!read.ok) return read;\n\t\tconst cast = castTypedValue(input.dataTypes, columnType, read.typed);\n\t\tif (!cast.ok) return refused({\n\t\t\t...cast.failure,\n\t\t\telementIndex\n\t\t}, suggestedTypes);\n\t\treturn readStored(cast.value.value, elementIndex);\n\t};\n\tif (input.written.kind !== \"list\") {\n\t\tif (input.isList) return refused({\n\t\t\tkind: \"not-a-list\",\n\t\t\telementIndex: void 0\n\t\t}, suggestedTypes);\n\t\treturn readOne(input.written, void 0);\n\t}\n\tif (input.isList) {\n\t\tconst elements = [];\n\t\tfor (const [elementIndex, written] of input.written.elements.entries()) {\n\t\t\tif (written.kind === \"list\") return nestedList(elementIndex, suggestedTypes);\n\t\t\tconst element = readOne(written, elementIndex);\n\t\t\tif (!element.ok) return element;\n\t\t\telements.push(element.value);\n\t\t}\n\t\treturn {\n\t\t\tok: true,\n\t\t\tvalue: elements\n\t\t};\n\t}\n\treturn readListIntoScalar({\n\t\t...input,\n\t\twritten: input.written,\n\t\tcolumnType,\n\t\treadStored\n\t});\n}\nfunction nestedList(elementIndex, suggestedTypes) {\n\treturn refused({\n\t\tkind: \"unreadable\",\n\t\tmessage: \"a list holds values, not other lists\",\n\t\telementIndex\n\t}, suggestedTypes);\n}\n/** A written list on a column that is not a list: the column's type takes it through its list cast. */\nfunction readListIntoScalar(input) {\n\tconst declaration = input.dataTypes.lookup.get(input.columnType);\n\tconst listCast = declaration?.listCast;\n\tif (listCast === void 0) return refused({\n\t\tkind: \"no-list-cast\",\n\t\treceivingType: input.columnType,\n\t\tcasts: Object.keys(declaration?.casts ?? {}),\n\t\telementIndex: void 0\n\t}, [input.columnType]);\n\tconst elements = [];\n\tfor (const [elementIndex, written] of input.written.elements.entries()) {\n\t\tif (written.kind === \"list\") return nestedList(elementIndex, listCast.of);\n\t\tconst read = readOneValue(input.dataTypes, written, elementIndex, listCast.of);\n\t\tif (!read.ok) return read;\n\t\tif (!listCast.of.includes(read.typed.type)) return refused({\n\t\t\tkind: \"no-element-cast\",\n\t\t\treceivingType: input.columnType,\n\t\t\tvalueType: read.typed.type,\n\t\t\telementTypes: listCast.of,\n\t\t\telementIndex\n\t\t}, listCast.of);\n\t\telements.push(read.typed.value);\n\t}\n\ttry {\n\t\treturn input.readStored(listCast.cast(elements), void 0);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn refused({\n\t\t\tkind: \"unreadable\",\n\t\t\tmessage: messageOf(error),\n\t\t\telementIndex: void 0\n\t\t}, [input.columnType]);\n\t}\n}\n/** Where a diagnostic is about, for a message: `Field \"N.count\" at element 2`. */\nfunction location(subject, elementIndex) {\n\treturn elementIndex === void 0 ? subject : `${subject} at element ${elementIndex + 1}`;\n}\n/**\n* What may be written where every one of `types` is received, each form once: `a number`. A column\n* whose type nothing writes still takes a `sql` literal, which `@default` stores as a SQL expression.\n*/\nfunction formsOf(dataTypes, types) {\n\tconst forms = admittedForms(dataTypes, types);\n\treturn forms.length === 0 ? [tagForm(SQL_EXPRESSION_TAG)] : forms;\n}\n/** The exact rewrite of the written value a `no-cast` refusal is about, before list elements are renumbered to the source list. */\nfunction rewriteOf(refusal, written, dataTypes) {\n\tif (refusal.kind !== \"no-cast\") return void 0;\n\tconst refused = refusal.elementIndex === void 0 || written.kind !== \"list\" ? written : written.elements[refusal.elementIndex];\n\treturn refused === void 0 || refused.kind === \"list\" ? void 0 : exactRewrite(dataTypes, refusal.receivingType, refused);\n}\n/**\n* {@link readDataTypeDefault} worded as a PSL diagnostic's code, message and span: a cast-rule\n* refusal at the written value, or the element of a written list it is about; a refusal only\n* defaults have at the `@default` attribute.\n*/\nfunction lowerDataTypeDefault(input) {\n\tconst read = readDataTypeDefault(input);\n\tif (read.ok) return read;\n\tconst refusal = atSourceElement(read.refusal, input.sourceElementIndexes);\n\treturn {\n\t\tok: false,\n\t\t...refusalMessage(refusal, `Field \"${input.fieldPath}\"`, input.dataTypes, guidanceFor(read, input.written, input.dataTypes)),\n\t\tspan: refusalSpan(refusal, input.spans, input.fieldPath)\n\t};\n}\n/**\n* Reads one number literal written in a contract source outside a default, such as an enum member's value, from its source text for a codec, as {@link lowerDataTypeDefault} reads a default: the number's entry gives it a data type, the codec's data type takes it directly or through a cast, and the codec checks it. A refusal is worded for `subject`, and the caller reports it at its own span.\n*/\nfunction readWrittenNumberForCodec(input) {\n\tconst written = {\n\t\tkind: \"number\",\n\t\ttext: input.text\n\t};\n\tconst read = readDataTypeDefault({\n\t\twritten,\n\t\tisList: false,\n\t\tcolumn: { codecId: input.codecId },\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypes: input.dataTypes,\n\t\tfieldPath: input.subject\n\t});\n\treturn read.ok ? read : {\n\t\tok: false,\n\t\t...refusalMessage(read.refusal, input.subject, input.dataTypes, guidanceFor(read, written, input.dataTypes))\n\t};\n}\n/** What a refusal of `written` tells the author to write instead. */\nfunction guidanceFor(failure, written, dataTypes) {\n\treturn {\n\t\tforms: formsOf(dataTypes, failure.suggestedTypes),\n\t\trewrite: rewriteOf(failure.refusal, written, dataTypes)\n\t};\n}\nfunction atSourceElement(refusal, sourceElementIndexes) {\n\tif (refusal.elementIndex === void 0) return refusal;\n\tconst elementIndex = sourceElementIndexes?.[refusal.elementIndex];\n\treturn elementIndex === void 0 ? refusal : {\n\t\t...refusal,\n\t\telementIndex\n\t};\n}\nfunction codecRefusalMessage(refusal, subject) {\n\treturn {\n\t\tcode: PSL_INVALID_DEFAULT_LITERAL,\n\t\tmessage: `${location(subject, refusal.elementIndex)}: ${refusal.message}`\n\t};\n}\nfunction storedRefusalMessage(refusal, subject) {\n\tif (refusal.kind === \"refused-by-codec\") return codecRefusalMessage(refusal, subject);\n\treturn {\n\t\tcode: \"PSL_INVALID_LITERAL\",\n\t\tmessage: `${location(subject, refusal.elementIndex)}: ${refusal.message}`\n\t};\n}\n/** A refusal worded as a PSL diagnostic's code and message; `guidance` says what to write instead. */\nfunction refusalMessage(refusal, subject, dataTypes, guidance) {\n\tconst where = location(subject, refusal.elementIndex);\n\tswitch (refusal.kind) {\n\t\tcase \"not-a-list\": return {\n\t\t\tcode: PSL_DEFAULT_LIST_EXPECTED,\n\t\t\tmessage: `${where}: this column holds a list, so its default is a list literal, as in [1, 2]`\n\t\t};\n\t\tcase \"refused-by-codec\": return codecRefusalMessage(refusal, subject);\n\t\tcase \"no-list-cast\": return {\n\t\t\tcode: PSL_VALUE_TYPE_INCOMPATIBLE,\n\t\t\tmessage: `${where}: ${describeExpected(guidance.forms)}; got a list`\n\t\t};\n\t\tcase \"no-element-cast\": return {\n\t\t\tcode: PSL_VALUE_TYPE_INCOMPATIBLE,\n\t\t\tmessage: `${where}: ${describeRefusedValueType(refusal, dataTypes, guidance)}`\n\t\t};\n\t\tdefault: {\n\t\t\tconst { code, message } = describeRefusal(refusal, dataTypes, guidance);\n\t\t\treturn {\n\t\t\t\tcode,\n\t\t\t\tmessage: `${where}: ${message}`\n\t\t\t};\n\t\t}\n\t}\n}\nfunction refusalSpan(refusal, spans, fieldPath) {\n\tswitch (refusal.kind) {\n\t\tcase \"not-a-list\":\n\t\tcase \"refused-by-codec\": return spans.attribute;\n\t\tdefault: return writtenValueSpan(spans, refusal.elementIndex, fieldPath);\n\t}\n}\nfunction writtenValueSpan(spans, elementIndex, fieldPath) {\n\tif (elementIndex === void 0) return spans.value;\n\tconst span = spans.elements[elementIndex];\n\tif (span === void 0) throw new InternalError(`Field \"${fieldPath}\": a refused @default list element ${elementIndex + 1} has no written span.`);\n\treturn span;\n}\n//#endregion\n//#region src/default-function-registry.ts\nfunction formatSupportedFunctionList(registry) {\n\tconst signatures = Array.from(registry.entries()).sort(([a], [b]) => a.localeCompare(b)).flatMap(([functionName, entry]) => {\n\t\tconst usageSignatures = entry.usageSignatures?.filter((signature) => signature.length > 0);\n\t\treturn usageSignatures && usageSignatures.length > 0 ? usageSignatures : [`${functionName}()`];\n\t});\n\treturn signatures.length > 0 ? signatures.join(\", \") : \"none\";\n}\n/** The diagnostic message for a `dbgenerated(...)` call, which raw SQL tagged literals replaced. */\nfunction removedDbgeneratedMessage(registry) {\n\treturn `Default function \"dbgenerated\" was removed. Write the SQL as a tagged literal: @default(sql\\`<expression>\\`). Supported functions: ${formatSupportedFunctionList(registry)}.`;\n}\nfunction lowerDefaultFunctionWithRegistry(input) {\n\tconst entry = input.registry.get(input.call.fn);\n\tif (entry) {\n\t\tconst result = entry.lower({\n\t\t\tcall: input.call,\n\t\t\tcontext: input.context\n\t\t});\n\t\treturn result.ok ? result : {\n\t\t\t...result,\n\t\t\tkind: \"external\"\n\t\t};\n\t}\n\tconst supportedFunctionList = formatSupportedFunctionList(input.registry);\n\treturn {\n\t\tok: false,\n\t\tkind: \"owned\",\n\t\tdiagnostic: {\n\t\t\tcode: \"PSL_UNKNOWN_DEFAULT_FUNCTION\",\n\t\t\tmessage: `Default function \"${input.call.fn}\" is not supported in SQL PSL provider v1. Supported functions: ${supportedFunctionList}.`,\n\t\t\t...input.source.at(input.call.span)\n\t\t}\n\t};\n}\n//#endregion\n//#region src/sql-attribute-specs.ts\nfunction buildModelAttributeCtx(input) {\n\treturn {\n\t\tsources: input.sources,\n\t\tselfModel: input.selfModel,\n\t\tbinder: input.binder,\n\t\tsymbols: input.symbols\n\t};\n}\nfunction buildFieldAttributeCtx(input) {\n\treturn {\n\t\tsources: input.sources,\n\t\tselfModel: input.selfModel,\n\t\tfield: input.field,\n\t\tbinder: input.binder,\n\t\tsymbols: input.symbols\n\t};\n}\nfunction modelAttributeSpecsFrom(modelAttributesByName) {\n\tconst result = Object.create(null);\n\tfor (const [name, descriptor] of modelAttributesByName) result[name] = blindCast(descriptor.spec);\n\treturn result;\n}\nfunction interpretModelAttribute(input) {\n\tconst result = interpretAttribute(input.node, input.spec, buildModelAttributeCtx({\n\t\tsymbols: input.symbols,\n\t\tselfModel: input.model,\n\t\tsources: input.sources,\n\t\tbinder: input.binder\n\t}));\n\tif (!result.ok) {\n\t\tinput.diagnostics.push(...result.failure);\n\t\treturn;\n\t}\n\treturn result.value;\n}\nfunction interpretFieldAttribute(input) {\n\tconst result = interpretAttribute(input.node, input.spec, buildFieldAttributeCtx({\n\t\tsymbols: input.symbols,\n\t\tselfModel: input.model,\n\t\tfield: input.field,\n\t\tsources: input.sources,\n\t\tbinder: input.binder\n\t}));\n\tif (!result.ok) {\n\t\tinput.diagnostics.push(...result.failure);\n\t\treturn;\n\t}\n\treturn result.value;\n}\nfunction validateMappedName(value, ctx, attributeNode) {\n\treturn value.name === \"\" ? [leafDiagnostic(ctx, attributeNode, \"Mapped name must not be empty\")] : [];\n}\nconst mapModelSpec = modelAttribute(\"map\", {\n\tdocumentation: \"Maps this model to a database table name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty database table name.\"\n\t}],\n\trefine: validateMappedName\n});\nconst mapFieldSpec = fieldAttribute(\"map\", {\n\tdocumentation: \"Maps this field to a database column name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty database column name.\"\n\t}],\n\trefine: validateMappedName\n});\nfunction nullLiteral() {\n\tconst nullIdentifier = identifier(\"null\", { documentation: \"A null list element or nullable scalar default.\" });\n\treturn mapArg({\n\t\tkind: \"null\",\n\t\tlabel: \"null\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst result = nullIdentifier.parse(arg, ctx);\n\t\t\treturn result.ok ? ok(null) : result;\n\t\t}\n\t}, (_null, arg, ctx) => ({\n\t\tkind: \"null\",\n\t\tspan: nodePslSpan(arg.syntax, ctx.sources)\n\t}));\n}\nfunction defaultFunctionArm(name, signature) {\n\treturn mapArg(funcCall(name, signature), (call) => ({\n\t\tkind: \"default-function\",\n\t\tcall\n\t}));\n}\nfunction scalarDefaultArms(isList, dataTypes, defaultFunctionRegistry) {\n\tconst tagArms = (admits) => {\n\t\tconst tagsByDocumentation = /* @__PURE__ */ new Map();\n\t\tfor (const [dataType, entry] of Object.entries(dataTypes.entries)) {\n\t\t\tif (entry.written.kind !== \"tag\" || !admits(dataType)) continue;\n\t\t\tconst tags = tagsByDocumentation.get(entry.documentation);\n\t\t\tif (tags === void 0) tagsByDocumentation.set(entry.documentation, [entry.written.tag]);\n\t\t\telse tags.push(entry.written.tag);\n\t\t}\n\t\treturn [...tagsByDocumentation].map(([documentation, tags]) => writtenScalar(taggedLiteral(tags, { documentation })));\n\t};\n\tconst anyTag = () => tagArms(() => true);\n\tconst literal = () => oneOf(writtenScalar(str()), writtenScalar(numLiteral()), writtenScalar(bool()), nullLiteral(), ...tagArms((dataType) => dataType !== SQL_EXPRESSION_DATA_TYPE_ID));\n\tconst listArm = () => writtenList(literal());\n\tconst funcArms = [...defaultFunctionRegistry.entries()].map(([name, entry]) => defaultFunctionArm(name, blindCast(entry.signature)));\n\treturn isList ? [\n\t\tlistArm(),\n\t\t...funcArms,\n\t\t...anyTag()\n\t] : [\n\t\twrittenScalar(str()),\n\t\twrittenScalar(numLiteral()),\n\t\twrittenScalar(bool()),\n\t\tnullLiteral(),\n\t\t...funcArms,\n\t\t...anyTag(),\n\t\tlistArm()\n\t];\n}\n/**\n* The `@default` value arms, with a `dbgenerated(...)` call reported as removed before the arms\n* are tried, so the author is told what replaced it instead of being shown the list of arms.\n*/\nfunction defaultValueArm(arms, registry) {\n\tconst value = arms.length === 1 && arms[0].kind === \"list\" ? arms[0] : oneOf(...arms);\n\treturn {\n\t\t...value,\n\t\tparse: (arg, ctx) => FunctionCallAst.cast(arg.syntax)?.path().join(\".\") === \"dbgenerated\" ? notOk([leafDiagnostic(ctx, arg, removedDbgeneratedMessage(registry), \"PSL_UNKNOWN_DEFAULT_FUNCTION\")]) : value.parse(arg, ctx)\n\t};\n}\nfunction noEnumMember() {\n\treturn {\n\t\tkind: \"rejecting\",\n\t\tlabel: \"enum member\",\n\t\tmessage: \"Enum declares no members\",\n\t\tparse: (arg, ctx) => notOk([leafDiagnostic(ctx, arg, \"Enum declares no members\")])\n\t};\n}\nfunction enumMemberNames(ctx) {\n\tconst resolution = ctx.typeResolution;\n\tif (resolution?.kind !== \"block\" || resolution.symbol.keyword !== \"enum\") return void 0;\n\tconst block = resolution.symbol;\n\tconst names = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.entries) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0 || seen.has(key)) continue;\n\t\tseen.add(key);\n\t\tnames.push(key);\n\t}\n\treturn names;\n}\nfunction enumDefaultArms(members, enumName, isList) {\n\tconst [first, ...rest] = members;\n\tif (first === void 0) return [noEnumMember()];\n\tconst member = (name) => mapArg(identifier(name, { documentation: `The \\`${name}\\` member of enum \\`${enumName}\\`.` }), (parsed) => ({\n\t\tkind: \"member\",\n\t\tname: parsed\n\t}));\n\tif (isList) return [mapArg(list(oneOf(member(first), ...rest.map(member), nullLiteral())), (elements) => ({\n\t\tkind: \"member-list\",\n\t\telements\n\t}))];\n\treturn [member(first), ...rest.map(member)];\n}\nfunction defaultFieldSpec(ctx) {\n\tconst members = enumMemberNames(ctx);\n\treturn fieldAttribute(\"default\", {\n\t\tdocumentation: \"Supplies a default value when this field is omitted from a mutation.\",\n\t\tpositional: [{\n\t\t\tkey: \"value\",\n\t\t\ttype: defaultValueArm(members === void 0 ? scalarDefaultArms(ctx.field.list, ctx.dataTypes, ctx.defaultFunctionRegistry) : enumDefaultArms(members, ctx.field.typeName, ctx.field.list), ctx.defaultFunctionRegistry),\n\t\t\tdocumentation: \"A literal, enum member, or registered default function compatible with this field.\"\n\t\t}]\n\t});\n}\nconst idFieldSpec = fieldAttribute(\"id\", {\n\tdocumentation: \"Makes this field the primary key of the table.\",\n\tnamed: { map: {\n\t\ttype: optional(str()),\n\t\tdocumentation: \"The database primary-key constraint name.\"\n\t} }\n});\nconst uniqueFieldSpec = fieldAttribute(\"unique\", {\n\tdocumentation: \"Requires values in this field to be unique.\",\n\tnamed: { map: {\n\t\ttype: optional(str()),\n\t\tdocumentation: \"The database unique-constraint name.\"\n\t} }\n});\nconst noCheckKindArgument = () => oneOf(identifier(\"membership\", { documentation: \"Waives the generated check that values belong to the declared domain enum.\" }), identifier(\"elementNotNull\", { documentation: \"Waives the generated check that scalar-list elements are non-null.\" }));\n/**\n* `@noCheck` waives generated CHECK constraints on one column: bare for every\n* kind the column's shape derives, or naming concrete kinds. Two optional\n* positional slots cover the whole kind vocabulary; a third argument is\n* necessarily a duplicate and fails as excess arity.\n*/\nconst noCheckFieldSpec = fieldAttribute(\"noCheck\", {\n\tdocumentation: \"Waives generated CHECK constraints for this column. With no arguments, waives every generated kind.\",\n\tpositional: [{\n\t\tkey: \"first\",\n\t\ttype: optional(noCheckKindArgument()),\n\t\tdocumentation: \"The first generated check kind to waive: `membership` or `elementNotNull`.\"\n\t}, {\n\t\tkey: \"second\",\n\t\ttype: optional(noCheckKindArgument()),\n\t\tdocumentation: \"A second, distinct generated check kind to waive.\"\n\t}],\n\trefine: (value, ctx, attributeNode) => {\n\t\tif (value.first !== void 0 && value.first === value.second) return [leafDiagnostic(ctx, attributeNode, \"`@noCheck` names the same kind twice\")];\n\t\treturn [];\n\t}\n});\nconst idModelSpec = modelAttribute(\"id\", {\n\tdocumentation: \"Declares a compound primary key for this table.\",\n\tpositional: [{\n\t\tkey: \"fields\",\n\t\ttype: list(fieldRef(), {\n\t\t\tallowEmpty: false,\n\t\t\tunique: true\n\t\t}),\n\t\tdocumentation: \"The ordered, nonempty list of distinct primary-key fields.\"\n\t}],\n\tnamed: { map: {\n\t\ttype: optional(str()),\n\t\tdocumentation: \"The database primary-key constraint name.\"\n\t} }\n});\nconst uniqueModelSpec = modelAttribute(\"unique\", {\n\tdocumentation: \"Requires the combination of these fields to be unique.\",\n\tpositional: [{\n\t\tkey: \"fields\",\n\t\ttype: list(fieldRef(), {\n\t\t\tallowEmpty: false,\n\t\t\tunique: true\n\t\t}),\n\t\tdocumentation: \"The ordered, nonempty list of distinct fields in the unique constraint.\"\n\t}],\n\tnamed: { map: {\n\t\ttype: optional(str()),\n\t\tdocumentation: \"The database unique-constraint name.\"\n\t} }\n});\nconst PSL_INDEX_FIELDS_XOR_EXPRESSION = \"PSL_INDEX_FIELDS_XOR_EXPRESSION\";\nconst PSL_INDEX_EXPRESSION_REQUIRES_NAME = \"PSL_INDEX_EXPRESSION_REQUIRES_NAME\";\nconst PSL_INDEX_NAME_XOR_MAP = \"PSL_INDEX_NAME_XOR_MAP\";\nfunction indexModelSpec(ctx) {\n\treturn modelAttribute(\"index\", {\n\t\tdocumentation: \"Declares a database index over fields or a SQL expression, optionally restricted by a predicate.\",\n\t\tpositional: [{\n\t\t\tkey: \"fields\",\n\t\t\ttype: optional(list(fieldRef(), {\n\t\t\t\tallowEmpty: false,\n\t\t\t\tunique: true\n\t\t\t})),\n\t\t\tdocumentation: \"The ordered list of distinct indexed fields. Mutually exclusive with `expression`.\"\n\t\t}],\n\t\tnamed: {\n\t\t\texpression: {\n\t\t\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\t\t\tdocumentation: \"The SQL index expression. Requires `name` or `map` and cannot be combined with a fields list.\"\n\t\t\t},\n\t\t\twhere: {\n\t\t\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\t\t\tdocumentation: \"The SQL predicate restricting rows included in a partial index.\"\n\t\t\t},\n\t\t\tunique: {\n\t\t\t\ttype: optional(bool()),\n\t\t\t\tdocumentation: \"Whether the index enforces uniqueness.\"\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The index name. Mutually exclusive with `map`.\"\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The database index name. Mutually exclusive with `name`.\"\n\t\t\t},\n\t\t\ttype: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The target-specific index access method.\"\n\t\t\t},\n\t\t\toptions: {\n\t\t\t\ttype: optional(record(str())),\n\t\t\t\tdocumentation: \"Target-specific index options. Requires an explicit `type`.\"\n\t\t\t}\n\t\t},\n\t\trefine: (value, ctx, attributeNode) => {\n\t\t\tconst diagnostics = [];\n\t\t\tif (value.fields === void 0 === (value.expression === void 0)) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@index` requires exactly one of a fields list or an `expression` argument\", PSL_INDEX_FIELDS_XOR_EXPRESSION));\n\t\t\tif (value.expression !== void 0 && value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@index` with an `expression` argument requires a `name` or `map` argument (a default name cannot be derived from an expression)\", PSL_INDEX_EXPRESSION_REQUIRES_NAME));\n\t\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@index` takes at most one of `name` and `map`\", PSL_INDEX_NAME_XOR_MAP));\n\t\t\tif (value.options !== void 0 && value.type === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@index` options argument requires a type argument\"));\n\t\t\treturn diagnostics;\n\t\t}\n\t});\n}\nconst PSL_CHECK_REQUIRES_NAME_OR_MAP = \"PSL_CHECK_REQUIRES_NAME_OR_MAP\";\nconst PSL_CHECK_NAME_XOR_MAP = \"PSL_CHECK_NAME_XOR_MAP\";\nconst PSL_CHECK_EXPRESSION_EMPTY = \"PSL_CHECK_EXPRESSION_EMPTY\";\n/**\n* A single-table-inheritance variant (`@@base` with no own `@@map`) shares\n* its base model's storage table and has no table of its own to declare a\n* check on — raised from {@link interpretPslDocumentToSqlContract}, not from\n* this spec's own `refine`, because the rule needs the model's `@@base`\n* declaration, which a single attribute's `refine` cannot see.\n*/\nconst PSL_CHECK_ON_STI_VARIANT = \"PSL_CHECK_ON_STI_VARIANT\";\nfunction checkModelSpec(ctx) {\n\treturn modelAttribute(\"check\", {\n\t\tdocumentation: \"Declares a named database CHECK constraint on this table.\",\n\t\tnamed: {\n\t\t\texpression: {\n\t\t\t\ttype: dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes),\n\t\t\t\tdocumentation: \"The nonempty SQL predicate checked for each row.\"\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The constraint name. Exactly one of `name` and `map` is required.\"\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The database constraint name. Exactly one of `name` and `map` is required.\"\n\t\t\t}\n\t\t},\n\t\trefine: (value, ctx, attributeNode) => {\n\t\t\tconst diagnostics = [];\n\t\t\tif (sqlTextFromCanonical(value.expression.value).trim().length === 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@check` expression must not be empty — an empty predicate is not a constraint\", PSL_CHECK_EXPRESSION_EMPTY));\n\t\t\tif (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@check` requires a `name` or `map` argument (a default name cannot be derived — a check has no column tuple to name itself after)\", PSL_CHECK_REQUIRES_NAME_OR_MAP));\n\t\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@check` takes at most one of `name` and `map`\", PSL_CHECK_NAME_XOR_MAP));\n\t\t\treturn diagnostics;\n\t\t}\n\t});\n}\nconst controlModelSpec = modelAttribute(\"control\", {\n\tdocumentation: \"Sets how schema management treats this model’s storage.\",\n\tpositional: [{\n\t\tkey: \"policy\",\n\t\tdocumentation: \"The storage control policy: `managed`, `tolerated`, `external`, or `observed`.\",\n\t\ttype: oneOf(identifier(\"managed\", { documentation: \"Verifies the declared shape strictly and allows migrations to create, alter, or drop the storage object.\" }), identifier(\"tolerated\", { documentation: \"Verifies declared columns while allowing extra columns. Migrations may create missing storage, but never alter or drop existing storage.\" }), identifier(\"external\", { documentation: \"Verifies declared storage without creating, altering, or dropping it.\" }), identifier(\"observed\", { documentation: \"Reports storage differences as warnings rather than verification failures and never emits migration operations.\" }))\n\t}]\n});\nconst discriminatorModelSpec = modelAttribute(\"discriminator\", {\n\tdocumentation: \"Selects the field that identifies inheritance variants of this model.\",\n\tpositional: [{\n\t\tkey: \"field\",\n\t\ttype: fieldRef(),\n\t\tdocumentation: \"The discriminator field on this model.\"\n\t}]\n});\nfunction baseModelSpec() {\n\treturn modelAttribute(\"base\", {\n\t\tdocumentation: \"Declares this model as a variant of a base model.\",\n\t\tpositional: [{\n\t\t\tkey: \"base\",\n\t\t\ttype: entityRef({ kind: \"model\" }),\n\t\t\tdocumentation: \"The base model to inherit from.\"\n\t\t}, {\n\t\t\tkey: \"value\",\n\t\t\ttype: str(),\n\t\t\tdocumentation: \"The discriminator value identifying this variant.\"\n\t\t}]\n\t});\n}\nfunction relationAttributeSpan(ctx) {\n\tconst node = getAttribute(ctx.field.attributes, \"relation\")?.node;\n\tif (node !== void 0) return nodePslSpan(node.syntax, ctx.sources);\n\treturn ctx.field.span;\n}\nfunction relationInvariants(parsed, ctx) {\n\tif (parsed.fields !== void 0 !== (parsed.references !== void 0)) return [{\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_SYNTAX\",\n\t\tmessage: `Relation field \"${ctx.selfModel.name}.${ctx.field.name}\" requires fields and references arguments`,\n\t\t...diagnosticSource(ctx.sources, ctx.field.node.syntax).at(relationAttributeSpan(ctx))\n\t}];\n\treturn [];\n}\nconst referentialActionArgument = () => oneOf(identifier(\"NoAction\", { documentation: \"Rejects a change that would violate the foreign key when the constraint is checked; checking may be deferred when supported and configured.\" }), identifier(\"Restrict\", { documentation: \"Rejects deleting or updating a referenced row while referencing rows remain, without deferring the check.\" }), identifier(\"Cascade\", { documentation: \"Propagates deletion or key updates of a referenced row to its referencing rows.\" }), identifier(\"SetNull\", { documentation: \"Sets referencing foreign-key fields to null when the referenced row is deleted or its key changes. The fields must allow null.\" }), identifier(\"SetDefault\", { documentation: \"Sets referencing foreign-key fields to their defaults when the referenced row is deleted or its key changes. The resulting values must satisfy the foreign key.\" }));\nconst relationFieldSpec = fieldAttribute(\"relation\", {\n\tdocumentation: \"Defines the relation name, foreign-key fields, and referential actions for this relation.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: optional(str()),\n\t\tdocumentation: \"The relation name used to pair both sides. May also be supplied by name.\"\n\t}],\n\tnamed: {\n\t\tname: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The relation name used to pair both sides. Cannot also be supplied positionally.\"\n\t\t},\n\t\tfields: {\n\t\t\ttype: optional(list(fieldRef(), {\n\t\t\t\tallowEmpty: false,\n\t\t\t\tunique: true\n\t\t\t})),\n\t\t\tdocumentation: \"The ordered local foreign-key fields. Must be supplied together with `references`.\"\n\t\t},\n\t\treferences: {\n\t\t\ttype: optional(list(referencedFieldRef(), {\n\t\t\t\tallowEmpty: false,\n\t\t\t\tunique: true\n\t\t\t})),\n\t\t\tdocumentation: \"The corresponding fields on the referenced model. Must be supplied together with `fields`.\"\n\t\t},\n\t\tmap: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The database foreign-key constraint name.\"\n\t\t},\n\t\tonDelete: {\n\t\t\ttype: optional(referentialActionArgument()),\n\t\t\tdocumentation: \"The referential action when a referenced row is deleted.\"\n\t\t},\n\t\tonUpdate: {\n\t\t\ttype: optional(referentialActionArgument()),\n\t\t\tdocumentation: \"The referential action when a referenced key is updated.\"\n\t\t},\n\t\tindex: {\n\t\t\ttype: optional(oneOf(bool(), str())),\n\t\t\tdocumentation: \"Whether to create an index for the relation’s foreign-key fields (`false` for none), or the name of an index, unique constraint or primary key on this model to use instead. The name is the `name` or `map` it was given, or an index’s stored name, and its first columns must be the foreign-key fields in order.\"\n\t\t}\n\t},\n\trefine: relationInvariants\n});\nfunction modelSpecContext(input) {\n\treturn {\n\t\tsymbols: input.symbols,\n\t\tmodel: input.model,\n\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\tdataTypes: input.dataTypes\n\t};\n}\nfunction fieldSpecContext(input) {\n\tconst node = typeReferenceNode(input.field);\n\treturn {\n\t\tsymbols: input.symbols,\n\t\tmodel: input.model,\n\t\tfield: input.field,\n\t\ttypeResolution: node === void 0 ? void 0 : input.binder.symbolForNode(node),\n\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\tdataTypes: input.dataTypes\n\t};\n}\n/** Every entry is a factory over the spec context, whether or not its spec reads it. ADR 249. */\nconst sqlAttributeSpecs = {\n\tmodel: {\n\t\tmap: (_ctx) => mapModelSpec,\n\t\tid: (_ctx) => idModelSpec,\n\t\tunique: (_ctx) => uniqueModelSpec,\n\t\tindex: indexModelSpec,\n\t\tcheck: checkModelSpec,\n\t\tcontrol: (_ctx) => controlModelSpec,\n\t\tdiscriminator: (_ctx) => discriminatorModelSpec,\n\t\tbase: (_ctx) => baseModelSpec()\n\t},\n\tfield: {\n\t\tmap: (_ctx) => mapFieldSpec,\n\t\tid: (_ctx) => idFieldSpec,\n\t\tunique: (_ctx) => uniqueFieldSpec,\n\t\tnoCheck: (_ctx) => noCheckFieldSpec,\n\t\trelation: (_ctx) => relationFieldSpec,\n\t\tdefault: defaultFieldSpec\n\t}\n};\n//#endregion\n//#region src/value-object-default.ts\n/**\n* The value-object column's default as the document it holds, and in the form the column stores. A\n* column may store the document's JSON text, as `sqlite/json@1` does, so its codec reads the stored\n* value into the document the composite type describes. A list literal on a list of value objects\n* is read element by element; the column stores the list's document in its own form.\n*/\nfunction valueObjectDefaultDocument(input) {\n\tconst codec = codecForRef(input.codecLookup, { codecId: input.codecId });\n\tif (codec === void 0) return {\n\t\tdocument: input.stored,\n\t\tstored: input.stored\n\t};\n\tif (input.elementwise && Array.isArray(input.stored)) {\n\t\tconst document = input.stored.map((element) => readDocument(codec, element));\n\t\treturn {\n\t\t\tdocument,\n\t\t\tstored: codec.encodeJson(document)\n\t\t};\n\t}\n\treturn {\n\t\tdocument: readDocument(codec, input.stored),\n\t\tstored: input.stored\n\t};\n}\n/** The column's codec has already read `stored` while the default was lowered, so it reads again. */\nfunction readDocument(codec, stored) {\n\tif (stored === null) return null;\n\treturn blindCast(codec.decodeJson(stored));\n}\n/** Each way the default does not match the composite type. */\nfunction valueObjectDefaultMismatches(input) {\n\tconst mismatches = [];\n\tconst shape = (path, message) => mismatches.push({\n\t\tcode: PSL_VALUE_TYPE_INCOMPATIBLE,\n\t\tmessage: `Field \"${path}\": ${message}`\n\t});\n\tconst checkObject = (value, valueObjectName, path) => {\n\t\tconst valueObject = input.types.nodes.get(valueObjectName);\n\t\tconst declared = input.types.declaredMembers.get(valueObjectName);\n\t\tif (valueObject === void 0 || declared === void 0) throw new InternalError(`Field \"${path}\" is typed by the value object \"${valueObjectName}\", which the contract does not declare.`);\n\t\tif (!isJsonObject(value)) {\n\t\t\tshape(path, `a value of \"${valueObjectName}\" is a JSON object, not ${jsonKind(value)}`);\n\t\t\treturn;\n\t\t}\n\t\tfor (const key of Object.keys(value)) if (!declared.has(key)) shape(path, `\"${key}\" is not a member of \"${valueObjectName}\"`);\n\t\tfor (const member of valueObject.fields) checkMember(value[member.fieldName], member, `${path}.${member.fieldName}`);\n\t};\n\tconst checkMember = (value, member, path) => {\n\t\tif (value === void 0) {\n\t\t\tif (!member.nullable) shape(path, \"the member is required, and the default has no value for it\");\n\t\t\treturn;\n\t\t}\n\t\tif (value === null && member.nullable) return;\n\t\tif (member.many === true) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tshape(path, `the member is a list, so its value is a JSON array, not ${jsonKind(value)}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (const [index, element] of value.entries()) {\n\t\t\t\tif (element === null && member.elementNullable) continue;\n\t\t\t\tcheckOne(element, member, `${path}[${index}]`, \"an element of the member is not null\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcheckOne(value, member, path, \"the member is not optional, so its value is not null\");\n\t};\n\tconst checkOne = (value, member, path, notNull) => {\n\t\tif (isValueObjectMember(member)) {\n\t\t\tif (value === null) shape(path, notNull);\n\t\t\telse checkObject(value, member.valueObjectName, path);\n\t\t\treturn;\n\t\t}\n\t\tconst reading = readStoredValue({\n\t\t\tvalue,\n\t\t\tcolumn: member.descriptor,\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tdataTypeLookup: input.dataTypeLookup,\n\t\t\tfieldPath: path\n\t\t});\n\t\tif (!reading.ok) {\n\t\t\tif (value === null) shape(path, notNull);\n\t\t\telse mismatches.push({\n\t\t\t\tcode: reading.code,\n\t\t\t\tmessage: reading.message\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumMismatch = enumValueMismatch(value, member, path, input.codecLookup);\n\t\tif (enumMismatch !== void 0) mismatches.push(enumMismatch);\n\t};\n\tif (input.value === null) {\n\t\tif (input.nullable) return mismatches;\n\t\tshape(input.fieldPath, input.list ? \"the default of a list of value objects is a JSON array, not null\" : \"the default of a value object is a JSON object, not null\");\n\t\treturn mismatches;\n\t}\n\tif (input.list) {\n\t\tif (!Array.isArray(input.value)) {\n\t\t\tshape(input.fieldPath, `the default of a list of value objects is a JSON array, not ${jsonKind(input.value)}`);\n\t\t\treturn mismatches;\n\t\t}\n\t\tfor (const [index, element] of input.value.entries()) {\n\t\t\tif (element === null && input.elementNullable) continue;\n\t\t\tcheckObject(element, input.valueObjectName, `${input.fieldPath}[${index}]`);\n\t\t}\n\t\treturn mismatches;\n\t}\n\tif (!isJsonObject(input.value)) {\n\t\tshape(input.fieldPath, `the default of a value object is a JSON object, not ${jsonKind(input.value)}`);\n\t\treturn mismatches;\n\t}\n\tcheckObject(input.value, input.valueObjectName, input.fieldPath);\n\treturn mismatches;\n}\n/**\n* A member typed by an enum takes only the enum's values, in the form its codec stores them, as a model field of that enum takes only its members.\n*/\nfunction enumValueMismatch(value, member, path, codecLookup) {\n\tconst handle = member.enumTypeHandle;\n\tif (handle === void 0) return void 0;\n\tconst codec = codecLookup.get(handle.codecId);\n\tconst stored = handle.values.map((enumValue) => codec === void 0 ? enumValue : codec.encodeJson(enumValue));\n\tif (stored.some((storedValue) => storedValue === value)) return void 0;\n\treturn {\n\t\tcode: PSL_INVALID_DEFAULT_LITERAL,\n\t\tmessage: `Field \"${path}\": Expected one of: ${stored.map((storedValue) => JSON.stringify(storedValue)).join(\" | \")}`\n\t};\n}\nfunction isJsonObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction jsonKind(value) {\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return \"a JSON array\";\n\tif (typeof value === \"object\") return \"a JSON object\";\n\treturn `a JSON ${typeof value}`;\n}\n//#endregion\n//#region src/psl-column-resolution.ts\nfunction toNamedTypeFieldDescriptor(typeRef, descriptor) {\n\treturn {\n\t\tcodecId: descriptor.codecId,\n\t\ttypeRef\n\t};\n}\nfunction argumentSpan(call, descriptors, index) {\n\tif (index === void 0) return call.span;\n\tconst name = descriptors?.[index]?.name;\n\tconst named = call.args.find((arg) => arg.kind === \"named\" && arg.name === name);\n\tconst positional = call.args.filter((arg) => arg.kind === \"positional\")[index];\n\treturn (named ?? positional)?.span ?? call.span;\n}\n/**\n* Checks the type parameters a constructor or preset produced against its codec's parameter schema,\n* reporting a failure at the argument the failing parameter came from. Returns whether they passed.\n*/\nfunction checkPslTypeParams(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\ttry {\n\t\tvalidateAuthoringTypeParams(helperPath, input.template, input.typeParams, input.codecLookup.descriptorFor(input.template.codecId)?.paramsSchema);\n\t\treturn true;\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.subject} ${message}`,\n\t\t\t...input.source.at(argumentSpan(input.call, input.args, argumentIndexOf(error)))\n\t\t});\n\t\treturn false;\n\t}\n}\nfunction argumentIndexOf(error) {\n\tif (typeof error !== \"object\" || error === null || !(\"details\" in error)) return void 0;\n\tconst { details } = error;\n\tif (typeof details !== \"object\" || details === null || !(\"argumentIndex\" in details)) return;\n\treturn typeof details.argumentIndex === \"number\" ? details.argumentIndex : void 0;\n}\n/**\n* Walks `authoringContributions.entityTypes` segment-by-segment and returns\n* the entity type descriptor at the resolved path, or `undefined` if no\n* descriptor is registered.\n*\n* Used by the PSL interpreter to dispatch declarative entity-shaped\n* declarations (`enum`, future `namespace { … }`, …) through the\n* pack entity-type mechanism — the descriptor's `factory` (or\n* `template`) materialises the IR-class instance without the\n* interpreter knowing target-specific construction.\n*/\nfunction getAuthoringEntity(contributions, path) {\n\tlet current = contributions?.entityTypes;\n\tfor (const segment of path) {\n\t\tif (typeof current !== \"object\" || current === null || \"kind\" in current) return;\n\t\tcurrent = current[segment];\n\t}\n\treturn current !== void 0 && isAuthoringEntityTypeDescriptor(current) ? current : void 0;\n}\nfunction instantiatePslTypeConstructor(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `constructor \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\tlet output;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\toutput = instantiateAuthoringTypeConstructor(input.descriptor, args);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} constructor \"${helperPath}\" ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n\treturn checkPslTypeParams({\n\t\tcall: input.call,\n\t\tsubject: `${input.entityLabel} constructor \"${helperPath}\"`,\n\t\targs: input.descriptor.args,\n\t\ttemplate: input.descriptor.output,\n\t\ttypeParams: output.typeParams,\n\t\tcodecLookup: input.codecLookup,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source\n\t}) ? output : void 0;\n}\n/**\n* Structural check for a codec descriptor exposing the authoring-time\n* `columnFromEntity` hook a type constructor's `entityRefArg` resolves\n* through (e.g. the `pg/enum@1` codec descriptor). No casts.\n*/\nfunction hasColumnFromEntityHook(descriptor) {\n\treturn \"columnFromEntity\" in descriptor && typeof descriptor.columnFromEntity === \"function\";\n}\n/**\n* Resolves a type-constructor call whose descriptor declares an\n* `entityRefArg` (e.g. `pg.enum(AalLevel)`): extracts the call's sole\n* positional-argument ref string, resolves it against the field's\n* namespace's already-lowered extension entities (keyed by the declared\n* `entityRefArg.entityKind`, then block name), and converts the resolved\n* entity to column params via the `columnFromEntity` authoring hook on the\n* codec descriptor registered for `descriptor.output.codecId`. The\n* `typeParams.typeName` `columnFromEntity` returns is bare — schema\n* qualification (e.g. `auth.aal_level`) is a target concern, applied later\n* when the target builds the field's namespace. A `valueSet` ref is\n* attached when the same namespace derived a value-set under the same block\n* name (the generic `deriveValueSet` mechanism), scoped to the field's own\n* namespace.\n*/\nfunction resolveEntityRefTypeConstructorCall(input) {\n\tconst entityRefArg = input.descriptor.entityRefArg;\n\tif (entityRefArg === void 0) throw new InternalError(\"resolveEntityRefTypeConstructorCall called with a descriptor that does not declare an entityRefArg. This is an interpreter bug.\");\n\tconst helperPath = input.call.path.join(\".\");\n\tconst positionalArgs = input.call.args.filter((arg) => arg.kind === \"positional\");\n\tconst argument = positionalArgs[entityRefArg.index];\n\tconst ref = argument?.value;\n\tconst node = argument?.expression?.syntax;\n\tconst resolution = node === void 0 ? void 0 : input.binder?.symbolForNode(node);\n\tif (input.call.args.length !== 1 || positionalArgs.length !== 1 || ref === void 0 || input.binder !== void 0 && resolution === void 0) {\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} type constructor \"${helperPath}\" expects exactly one positional argument naming the referenced entity`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn NOT_RESOLVED;\n\t}\n\tlet entityName = ref;\n\tlet entityNamespaceId = input.namespaceId;\n\tconst reportUnknownRef = () => {\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_UNKNOWN_ENTITY_REF\",\n\t\t\tmessage: `${input.entityLabel} type constructor \"${helperPath}(${ref})\" does not resolve — no entity named \"${ref}\" was found in namespace \"${entityNamespaceId ?? \"(unspecified)\"}\"`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn NOT_RESOLVED;\n\t};\n\tif (resolution !== void 0) {\n\t\tif (resolution.kind === \"unresolved\") return NOT_RESOLVED;\n\t\tif (resolution.kind !== \"block\") return reportUnknownRef();\n\t\tentityName = resolution.symbol.name;\n\t\tentityNamespaceId = resolution.namespace.id;\n\t}\n\tconst entities = entityNamespaceId === void 0 ? void 0 : input.namespaceExtensionEntities?.get(entityNamespaceId);\n\tconst entity = entities?.[entityRefArg.entityKind]?.[entityName];\n\tif (entity === void 0) return reportUnknownRef();\n\tconst codecId = input.descriptor.output.codecId;\n\tconst codecDescriptor = input.codecLookup.descriptorFor(codecId);\n\tif (codecDescriptor === void 0 || !hasColumnFromEntityHook(codecDescriptor)) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Type constructor \"${helperPath}\" registers codecId \"${codecId}\" with an entity-ref argument, but its codec descriptor has no \"columnFromEntity\" authoring hook. This is a contributor bug in the pack registering \"${helperPath}\", not a user-schema error.`, { meta: {\n\t\thelperPath,\n\t\tcodecId\n\t} });\n\tconst resolved = codecDescriptor.columnFromEntity(entity);\n\tif (resolved === void 0) return reportUnknownRef();\n\tconst valueSet = entities?.[\"valueSet\"]?.[entityName] !== void 0 && entityNamespaceId !== void 0 ? {\n\t\tplane: \"storage\",\n\t\tentityKind: \"valueSet\",\n\t\tnamespaceId: entityNamespaceId,\n\t\tentityName\n\t} : void 0;\n\treturn {\n\t\tok: true,\n\t\tdescriptor: {\n\t\t\tcodecId,\n\t\t\t...resolved.typeParams !== void 0 ? { typeParams: resolved.typeParams } : {},\n\t\t\t...valueSet !== void 0 ? { valueSet } : {}\n\t\t}\n\t};\n}\nconst NOT_RESOLVED = { ok: false };\nfunction instantiateFieldTypeConstructor(input) {\n\tif (input.descriptor.entityRefArg !== void 0) return resolveEntityRefTypeConstructorCall({\n\t\tcall: input.call,\n\t\tdescriptor: input.descriptor,\n\t\tnamespaceId: input.namespaceId,\n\t\tnamespaceExtensionEntities: input.namespaceExtensionEntities,\n\t\tbinder: input.binder,\n\t\tcodecLookup: input.codecLookup,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tconst instantiated = instantiatePslTypeConstructor({\n\t\tcall: input.call,\n\t\tdescriptor: input.descriptor,\n\t\tcodecLookup: input.codecLookup,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\treturn instantiated === void 0 ? NOT_RESOLVED : {\n\t\tok: true,\n\t\tdescriptor: instantiated\n\t};\n}\nfunction instantiateFieldPreset(input) {\n\tconst instantiated = instantiatePslFieldPreset(input);\n\tif (!instantiated) return NOT_RESOLVED;\n\tif (!checkPslTypeParams({\n\t\tcall: input.call,\n\t\tsubject: `${input.entityLabel} preset \"${input.call.path.join(\".\")}\"`,\n\t\targs: input.descriptor.args,\n\t\ttemplate: input.descriptor.output,\n\t\ttypeParams: instantiated.descriptor.typeParams,\n\t\tcodecLookup: input.codecLookup,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source\n\t})) return NOT_RESOLVED;\n\tconst presetContributions = {\n\t\tnullable: instantiated.nullable,\n\t\tid: instantiated.id,\n\t\tunique: instantiated.unique,\n\t\t...instantiated.default !== void 0 ? { default: instantiated.default } : {},\n\t\t...instantiated.executionDefaults !== void 0 ? { executionDefaults: instantiated.executionDefaults } : {}\n\t};\n\treturn {\n\t\tok: true,\n\t\tdescriptor: instantiated.descriptor,\n\t\tpresetContributions\n\t};\n}\nfunction bareTypeConstructorOf(resolution) {\n\tif (resolution?.kind !== \"contributedType\") return void 0;\n\tconst { descriptor } = resolution.symbol;\n\treturn descriptor.kind === \"typeConstructor\" && isBareTypeConstructor(descriptor) ? descriptor : void 0;\n}\nfunction resolvedKindLabel(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"compositeType\": return \"composite type\";\n\t\tcase \"namedType\": return \"named type\";\n\t\tcase \"block\": return resolution.symbol.keyword;\n\t\tcase \"crossSpace\": return \"type of another contract space\";\n\t\tdefault: return resolution.kind;\n\t}\n}\nfunction resolveFieldTypeDescriptor(input) {\n\tconst { field, resolution, entityLabel, diagnostics } = input;\n\tif (field.malformedType || resolution === void 0) return NOT_RESOLVED;\n\tconst source = diagnosticSource(input.sources, field.node.syntax);\n\tconst unsupported = (message) => {\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_TYPE\",\n\t\t\tmessage,\n\t\t\t...source.at(field.span)\n\t\t});\n\t\treturn NOT_RESOLVED;\n\t};\n\tconst call = field.typeConstructor;\n\tswitch (resolution.kind) {\n\t\tcase \"unresolved\":\n\t\tcase \"namespace\":\n\t\tcase \"contributedNamespace\":\n\t\tcase \"mixin\": return NOT_RESOLVED;\n\t\tcase \"contributedType\": {\n\t\t\tconst { descriptor, path } = resolution.symbol;\n\t\t\tconst written = path.join(\".\");\n\t\t\tif (descriptor.kind === \"fieldPreset\") {\n\t\t\t\tif (call === void 0) {\n\t\t\t\t\treportPresetNotCalled({\n\t\t\t\t\t\tentityLabel,\n\t\t\t\t\t\tpresetPath: written,\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tspan: field.span,\n\t\t\t\t\t\tdiagnostics\n\t\t\t\t\t});\n\t\t\t\t\treturn NOT_RESOLVED;\n\t\t\t\t}\n\t\t\t\treturn instantiateFieldPreset({\n\t\t\t\t\tcall,\n\t\t\t\t\tdescriptor,\n\t\t\t\t\tcodecLookup: input.codecLookup,\n\t\t\t\t\tdiagnostics,\n\t\t\t\t\tsource,\n\t\t\t\t\tentityLabel\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (call !== void 0) return instantiateFieldTypeConstructor({\n\t\t\t\t...input,\n\t\t\t\tcall,\n\t\t\t\tdescriptor,\n\t\t\t\tsource\n\t\t\t});\n\t\t\tif (!isBareTypeConstructor(descriptor)) {\n\t\t\t\treportTypeConstructorNotCalled({\n\t\t\t\t\tentityLabel,\n\t\t\t\t\tpath: written,\n\t\t\t\t\tdescriptor,\n\t\t\t\t\tsource,\n\t\t\t\t\tspan: field.span,\n\t\t\t\t\tdiagnostics\n\t\t\t\t});\n\t\t\t\treturn NOT_RESOLVED;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\tdescriptor: instantiateAuthoringTypeConstructor(descriptor, [])\n\t\t\t};\n\t\t}\n\t\tcase \"field\":\n\t\tcase \"attribute\":\n\t\tcase \"parameter\":\n\t\tcase \"function\":\n\t\tcase \"constant\": throw new InternalError(`The type of ${entityLabel} resolved to a ${resolution.kind}; a type reference never names one. This is a binder bug.`);\n\t}\n\tif (call !== void 0) return unsupported(`${entityLabel} calls \"${call.path.join(\".\")}\", which is a ${resolvedKindLabel(resolution)}, not a type constructor. Remove the arguments.`);\n\tswitch (resolution.kind) {\n\t\tcase \"namedType\": {\n\t\t\tconst descriptor = input.namedTypeDescriptors.get(resolution.symbol);\n\t\t\treturn descriptor === void 0 ? NOT_RESOLVED : {\n\t\t\t\tok: true,\n\t\t\t\tdescriptor\n\t\t\t};\n\t\t}\n\t\tcase \"block\": {\n\t\t\tif (resolution.symbol.keyword !== \"enum\") return unsupported(`${entityLabel} is typed by the ${resolution.symbol.keyword} \"${resolution.symbol.name}\", which is not a column type.`);\n\t\t\tconst descriptor = input.enumTypeDescriptors.get(resolution.symbol);\n\t\t\treturn descriptor === void 0 ? NOT_RESOLVED : {\n\t\t\t\tok: true,\n\t\t\t\tdescriptor\n\t\t\t};\n\t\t}\n\t\tcase \"model\":\n\t\tcase \"compositeType\": return unsupported(`${entityLabel} is typed by the ${resolvedKindLabel(resolution)} \"${resolution.symbol.name}\", which is not a column type.`);\n\t\tcase \"crossSpace\": return unsupported(`${entityLabel} type \"${field.typeName}\" is a type of contract space \"${field.typeContractSpaceId}\"; only a relation field can name a type of another contract space.`);\n\t}\n}\nconst PSL_INVALID_DEFAULT_SQL = \"PSL_INVALID_DEFAULT_SQL\";\nconst TAGGED_LITERAL_CANONICALIZATION_CODES = {\n\tnul: \"PSL_TAGGED_LITERAL_NUL\",\n\t\"too-large\": \"PSL_TAGGED_LITERAL_TOO_LARGE\"\n};\n/**\n* Refuses a `null` element in the list default of a field whose list elements are not nullable,\n* at the first `null`. Returns whether it refused.\n*/\nfunction rejectStrictListNullDefault(input) {\n\tif (input.field.elementOptional) return false;\n\tconst nullElement = input.elements.find(isParsedNullLiteral);\n\tif (nullElement === void 0) return false;\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_DEFAULT_APPLICABILITY\",\n\t\tmessage: `Field \"${input.modelName}.${input.field.name}\" has strict list elements and cannot use null in a literal list default. Make the element type nullable or remove null from the default.`,\n\t\t...input.source.at(nullElement.span)\n\t});\n\treturn true;\n}\nfunction isParsedNullLiteral(element) {\n\treturn element.kind === \"null\";\n}\nfunction lowerDefaultForField(input) {\n\tconst node = getAttribute(input.field.attributes, \"default\")?.node;\n\tif (node === void 0) return {};\n\tconst source = diagnosticSource(input.sources, node.syntax);\n\tconst spec = sqlAttributeSpecs.field.default(fieldSpecContext({\n\t\tsymbols: input.symbolTable,\n\t\tmodel: input.model,\n\t\tfield: input.field,\n\t\tbinder: input.binder,\n\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\tdataTypes: input.dataTypes\n\t}));\n\tconst interpreted = interpretFieldAttribute({\n\t\tsymbols: input.symbolTable,\n\t\tnode,\n\t\tspec,\n\t\tmodel: input.model,\n\t\tfield: input.field,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tdiagnostics: input.diagnostics\n\t});\n\tif (interpreted === void 0) return {};\n\tconst value = interpreted.value;\n\tconst attributeSpan = nodePslSpan(node.syntax, input.sources);\n\tif (value.kind === \"null\") {\n\t\tif (!input.field.optional) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_DEFAULT_APPLICABILITY\",\n\t\t\t\tmessage: `Field \"${input.modelName}.${input.fieldName}\" is non-nullable and cannot use null as its literal default. Make the field nullable or use a non-null default.`,\n\t\t\t\t...source.at()\n\t\t\t});\n\t\t\treturn {};\n\t\t}\n\t\treturn { defaultValue: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: null,\n\t\t\tcanonical: true\n\t\t} };\n\t}\n\tif (value.kind === \"list\" && rejectStrictListNullDefault({\n\t\t...input,\n\t\telements: value.elements,\n\t\tsource\n\t})) return {};\n\tconst readsListElements = (written) => input.isListColumn || input.field.list && written.kind === \"list\";\n\tconst readAsLiteral = (written, spans, sourceElementIndexes) => {\n\t\tconst lowered = lowerDataTypeDefault({\n\t\t\twritten,\n\t\t\tspans,\n\t\t\tsourceElementIndexes,\n\t\t\tisList: readsListElements(written),\n\t\t\tcolumn: input.columnDescriptor,\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tdataTypes: input.dataTypes,\n\t\t\tfieldPath: `${input.modelName}.${input.fieldName}`\n\t\t});\n\t\tif (!lowered.ok) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: lowered.code,\n\t\t\t\tmessage: lowered.message,\n\t\t\t\t...source.at(lowered.span)\n\t\t\t});\n\t\t\treturn {};\n\t\t}\n\t\tlet restoredValue = lowered.value;\n\t\tif (value.kind === \"list\" && value.elements.some(isParsedNullLiteral) && Array.isArray(lowered.value)) {\n\t\t\tlet index = 0;\n\t\t\tconst nonNullValues = lowered.value;\n\t\t\trestoredValue = value.elements.map((element) => element.kind === \"null\" ? null : nonNullValues[index++] ?? null);\n\t\t}\n\t\tif (input.valueObjectDefault !== void 0) {\n\t\t\tconst { document, stored } = valueObjectDefaultDocument({\n\t\t\t\tstored: restoredValue,\n\t\t\t\telementwise: readsListElements(written) && !input.isListColumn,\n\t\t\t\tcodecId: input.columnDescriptor.codecId,\n\t\t\t\tcodecLookup: input.codecLookup\n\t\t\t});\n\t\t\tconst mismatches = valueObjectDefaultMismatches({\n\t\t\t\tfieldPath: `${input.modelName}.${input.fieldName}`,\n\t\t\t\tvalue: document,\n\t\t\t\tlist: input.field.list,\n\t\t\t\tnullable: input.field.optional,\n\t\t\t\telementNullable: input.field.elementOptional,\n\t\t\t\t...input.valueObjectDefault,\n\t\t\t\tcodecLookup: input.codecLookup,\n\t\t\t\tdataTypeLookup: input.dataTypes.lookup\n\t\t\t});\n\t\t\tfor (const { code, message } of mismatches) input.diagnostics.push({\n\t\t\t\tcode,\n\t\t\t\tmessage,\n\t\t\t\t...source.at()\n\t\t\t});\n\t\t\tif (mismatches.length > 0) return {};\n\t\t\treturn { defaultValue: {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: stored,\n\t\t\t\tcanonical: true\n\t\t\t} };\n\t\t}\n\t\treturn { defaultValue: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: restoredValue,\n\t\t\tcanonical: true\n\t\t} };\n\t};\n\tconst canonicalized = (scalar) => {\n\t\tif (scalar.written !== void 0) return scalar.written;\n\t\tinput.diagnostics.push({\n\t\t\tcode: TAGGED_LITERAL_CANONICALIZATION_CODES[scalar.reason],\n\t\t\tmessage: describeTaggedLiteralFailure(scalar.reason),\n\t\t\t...source.at(scalar.span)\n\t\t});\n\t};\n\tconst sqlExpressionDefault = (text, span) => {\n\t\tconst reserved = reservedSqlDefaultText(text);\n\t\tconst refusal = reserved === void 0 ? checkSqlDefaultText(text) : `Write @default(${reserved}()) instead of ${SQL_EXPRESSION_TAG}\\`${reserved}()\\`; ${reserved}() is a Prisma default function, not raw SQL.`;\n\t\tif (refusal !== void 0) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: PSL_INVALID_DEFAULT_SQL,\n\t\t\t\tmessage: refusal,\n\t\t\t\t...source.at(span)\n\t\t\t});\n\t\t\treturn {};\n\t\t}\n\t\treturn { defaultValue: {\n\t\t\tkind: \"function\",\n\t\t\texpression: text\n\t\t} };\n\t};\n\tif (value.kind === \"member\" || value.kind === \"member-list\") return {};\n\tif (input.columnDescriptor.valueSet !== void 0) {\n\t\tconst memberName = (element) => element.kind === \"scalar\" && element.written?.kind === \"string\" ? element.written.text : void 0;\n\t\tif (value.kind === \"scalar\") {\n\t\t\tconst member = memberName(value);\n\t\t\tif (member !== void 0) return { defaultValue: {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: member\n\t\t\t} };\n\t\t}\n\t\tif (value.kind === \"list\") {\n\t\t\tconst members = value.elements.map((element) => element.kind === \"null\" ? null : memberName(element));\n\t\t\tif (members.every((member) => member !== void 0)) return { defaultValue: {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: members\n\t\t\t} };\n\t\t}\n\t}\n\tif (value.kind === \"list\") {\n\t\tconst elements = [];\n\t\tconst sourceElementIndexes = [];\n\t\tfor (const [sourceIndex, element] of value.elements.entries()) {\n\t\t\tif (element.kind === \"null\") continue;\n\t\t\tconst written = canonicalized(element);\n\t\t\tif (written === void 0) return {};\n\t\t\telements.push(written);\n\t\t\tsourceElementIndexes.push(sourceIndex);\n\t\t}\n\t\treturn readAsLiteral({\n\t\t\tkind: \"list\",\n\t\t\telements\n\t\t}, {\n\t\t\tattribute: attributeSpan,\n\t\t\tvalue: value.span,\n\t\t\telements: value.elements.map((element) => element.span)\n\t\t}, sourceElementIndexes);\n\t}\n\tif (value.kind === \"scalar\") {\n\t\tconst written = canonicalized(value);\n\t\tif (written === void 0) return {};\n\t\tconst spans = {\n\t\t\tattribute: attributeSpan,\n\t\t\tvalue: value.span,\n\t\t\telements: []\n\t\t};\n\t\tif (written.kind !== \"tag\") return readAsLiteral(written, spans);\n\t\tconst read = readWrittenValue(input.dataTypes, written);\n\t\tif (read.ok && read.value.type === SQL_EXPRESSION_DATA_TYPE_ID) return sqlExpressionDefault(sqlTextFromCanonical(read.value.value), value.span);\n\t\treturn readAsLiteral(written, spans);\n\t}\n\tconst { call } = value;\n\tconst context = {\n\t\tsourceId: input.sources.sourceFileFor(node.syntax).filename,\n\t\tmodelName: input.modelName,\n\t\tfieldName: input.fieldName,\n\t\tcolumnCodecId: input.columnDescriptor.codecId\n\t};\n\tconst lowered = lowerDefaultFunctionWithRegistry({\n\t\tcall,\n\t\tregistry: input.defaultFunctionRegistry,\n\t\tcontext,\n\t\tsource\n\t});\n\tif (!lowered.ok) {\n\t\tif (lowered.kind === \"owned\") input.diagnostics.push(lowered.diagnostic);\n\t\telse input.diagnostics.pushExternal(lowered.diagnostic);\n\t\treturn {};\n\t}\n\tif (lowered.value.kind === \"storage\") return { defaultValue: lowered.value.defaultValue };\n\tconst generatorDescriptor = input.generatorDescriptorById.get(lowered.value.generated.id);\n\tif (!generatorDescriptor) {\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_DEFAULT_APPLICABILITY\",\n\t\t\tmessage: `Default generator \"${lowered.value.generated.id}\" is not available in the composed mutation default registry.`,\n\t\t\t...source.at(call.span)\n\t\t});\n\t\treturn {};\n\t}\n\tif (generatorDescriptor.applicableCodecIds === void 0) {\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_DEFAULT_APPLICABILITY\",\n\t\t\tmessage: `Default generator \"${generatorDescriptor.id}\" is not applicable to \"@default(...)\" lowering. Use the corresponding field preset (e.g. \\`temporal.${generatorDescriptor.id === \"timestampNow\" ? \"updatedAt\" : generatorDescriptor.id}()\\`) instead.`,\n\t\t\t...source.at(call.span)\n\t\t});\n\t\treturn {};\n\t}\n\tif (!generatorDescriptor.applicableCodecIds.includes(input.columnDescriptor.codecId)) {\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_DEFAULT_APPLICABILITY\",\n\t\t\tmessage: `Default generator \"${generatorDescriptor.id}\" is not applicable to \"${input.modelName}.${input.fieldName}\" with codecId \"${input.columnDescriptor.codecId}\".`,\n\t\t\t...source.at(call.span)\n\t\t});\n\t\treturn {};\n\t}\n\treturn { executionDefaults: { onCreate: lowered.value.generated } };\n}\n//#endregion\n//#region src/psl-field-resolution.ts\nfunction lowerEnumDefaultForField(input) {\n\tconst { field, model, enumHandle, diagnostics } = input;\n\tconst node = getAttribute(field.attributes, \"default\")?.node;\n\tif (node === void 0) return {};\n\tif (enumHandle.enumMembers.length === 0) return {};\n\tconst interpreted = interpretFieldAttribute({\n\t\tnode,\n\t\tspec: sqlAttributeSpecs.field.default(fieldSpecContext({\n\t\t\tsymbols: input.symbolTable,\n\t\t\tmodel,\n\t\t\tfield,\n\t\t\tbinder: input.binder,\n\t\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\t\tdataTypes: input.dataTypes\n\t\t})),\n\t\tsymbols: input.symbolTable,\n\t\tmodel,\n\t\tfield,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tdiagnostics\n\t});\n\tif (interpreted === void 0) return {};\n\tconst member = interpreted.value;\n\tif (member.kind === \"member-list\") {\n\t\tif (rejectStrictListNullDefault({\n\t\t\t...input,\n\t\t\telements: member.elements,\n\t\t\tsource: diagnosticSource(input.sources, node.syntax)\n\t\t})) return {};\n\t\treturn { defaultValue: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: blindCast(member.elements.map((entry) => entry.kind === \"null\" ? null : enumHandle.enumMembers.find((candidate) => candidate.name === entry.name)?.value))\n\t\t} };\n\t}\n\tinvariant(member.kind === \"member\", \"the enum @default grammar admits only member identifiers\");\n\tconst match = enumHandle.enumMembers.find((m) => m.name === member.name);\n\tif (!match) return {};\n\treturn { defaultValue: {\n\t\tkind: \"literal\",\n\t\tvalue: blindCast(match.value)\n\t} };\n}\nconst MODEL_COORDINATE_SEPARATOR = \"\\0\";\nfunction modelCoordinateKey(namespaceId, modelName) {\n\treturn `${namespaceId}${MODEL_COORDINATE_SEPARATOR}${modelName}`;\n}\nconst REMOVED_ATTRIBUTE_RULES = /* @__PURE__ */ new Map([[\"updatedAt\", {\n\thint: \"Use `temporal.updatedAt()` as a field-preset call instead.\",\n\tsuppressWhen: (field) => field.typeConstructor?.path[0] === \"temporal\"\n}]]);\n{\n\tconst overlap = [...REMOVED_ATTRIBUTE_RULES.keys()].filter((name) => Object.hasOwn(sqlAttributeSpecs.field, name));\n\tif (overlap.length > 0) throw new InternalError(`Registered SQL field attributes and REMOVED_ATTRIBUTE_RULES must not overlap. Names in both: ${overlap.join(\", \")}`);\n}\nfunction describeUnsupportedSqlAttribute(sources) {\n\treturn ({ attribute, level, owner, field }) => {\n\t\tif (owner.kind === \"compositeType\") return void 0;\n\t\tif (owner.kind === \"mixin\" && owner.keyword === \"type\") return void 0;\n\t\tif (level === \"model\") {\n\t\t\tconst source = diagnosticSource(sources, owner.node.syntax);\n\t\t\treturn {\n\t\t\t\tcode: \"PSL_UNSUPPORTED_MODEL_ATTRIBUTE\",\n\t\t\t\tmessage: `${owner.kind === \"mixin\" ? \"Mixin\" : \"Model\"} \"${owner.name}\" uses unsupported attribute \"@@${attribute.name}\"`,\n\t\t\t\t...source.at(attribute.span)\n\t\t\t};\n\t\t}\n\t\tif (field === void 0) return void 0;\n\t\tconst source = diagnosticSource(sources, field.node.syntax);\n\t\tif (attribute.name.startsWith(\"db.\")) return {\n\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_ATTRIBUTE\",\n\t\t\tmessage: formatDbAttributeMigrationMessage(attribute),\n\t\t\t...source.at(attribute.span)\n\t\t};\n\t\tconst baseMessage = `Field \"${owner.name}.${field.name}\" uses unsupported attribute \"@${attribute.name}\"`;\n\t\tconst removedRule = REMOVED_ATTRIBUTE_RULES.get(attribute.name);\n\t\treturn {\n\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_ATTRIBUTE\",\n\t\t\tmessage: removedRule && !removedRule.suppressWhen(field) ? `${baseMessage}. ${removedRule.hint}` : baseMessage,\n\t\t\t...source.at(attribute.span)\n\t\t};\n\t};\n}\nfunction extractFieldConstraintNames(input) {\n\tconst idAttribute = getAttribute(input.field.attributes, \"id\");\n\tconst uniqueAttribute = getAttribute(input.field.attributes, \"unique\");\n\tconst idNode = getAttribute(input.field.attributes, \"id\")?.node;\n\tconst idName = idNode === void 0 ? void 0 : interpretFieldAttribute({\n\t\tnode: idNode,\n\t\tsymbols: input.symbolTable,\n\t\tspec: sqlAttributeSpecs.field.id(input.specContext),\n\t\tmodel: input.model,\n\t\tfield: input.field,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tdiagnostics: input.diagnostics\n\t})?.map;\n\tconst uniqueNode = getAttribute(input.field.attributes, \"unique\")?.node;\n\treturn {\n\t\tidAttribute,\n\t\tuniqueAttribute,\n\t\tidName,\n\t\tuniqueName: uniqueNode === void 0 ? void 0 : interpretFieldAttribute({\n\t\t\tnode: uniqueNode,\n\t\t\tsymbols: input.symbolTable,\n\t\t\tspec: sqlAttributeSpecs.field.unique(input.specContext),\n\t\t\tmodel: input.model,\n\t\t\tfield: input.field,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tdiagnostics: input.diagnostics\n\t\t})?.map\n\t};\n}\n/**\n* Interprets a field's `@noCheck` attribute and resolves it against the\n* column's shape: the bare form becomes every kind the shape derives, and a\n* named kind that can never apply is a spec-validation diagnostic on the\n* attribute node. Returns the concrete kinds in canonical ascending order —\n* the only form the definition tree carries.\n*/\nfunction lowerNoCheckForField(input) {\n\tconst node = getAttribute(input.field.attributes, \"noCheck\")?.node;\n\tif (node === void 0) return void 0;\n\tconst interpreted = interpretFieldAttribute({\n\t\tnode,\n\t\tspec: sqlAttributeSpecs.field.noCheck(input.specContext),\n\t\tsymbols: input.symbolTable,\n\t\tmodel: input.model,\n\t\tfield: input.field,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tdiagnostics: input.diagnostics\n\t});\n\tif (interpreted === void 0) return void 0;\n\tconst span = getAttribute(input.field.attributes, \"noCheck\")?.span ?? input.field.span;\n\tconst subject = `Field \"${input.model.name}.${input.field.name}\"`;\n\tconst derivable = [];\n\tif (input.isListColumn && !input.elementNullable) derivable.push(\"elementNotNull\");\n\tif (input.isDomainEnum) derivable.push(\"membership\");\n\tconst authored = [interpreted.first, interpreted.second].filter((kind) => kind === \"membership\" || kind === \"elementNotNull\");\n\tif (authored.length === 0) {\n\t\tif (derivable.length === 0) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\tmessage: `${subject} @noCheck waives nothing — this column's shape derives no generated checks`,\n\t\t\t\t...diagnosticSource(input.sources, input.field.node.syntax).at(span)\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn derivable;\n\t}\n\tfor (const kind of authored) if (!derivable.includes(kind)) {\n\t\tconst explanation = kind === \"membership\" ? \"membership checks are derived only from enum value sets\" : \"element-non-null checks are derived only for lists whose elements are semantically non-null\";\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${subject} @noCheck(${kind}) does not apply — ${explanation}`,\n\t\t\t...diagnosticSource(input.sources, input.field.node.syntax).at(span)\n\t\t});\n\t\treturn;\n\t}\n\treturn [...authored].sort();\n}\nfunction collectResolvedFields(input) {\n\tconst { model, symbolTable, enumTypeDescriptors, namedTypeDescriptors, valueObjectTypes, authoringContributions, binder, targetId, defaultFunctionRegistry, dataTypes, generatorDescriptorById, diagnostics, sources, scalarColumnDescriptors, enumHandles, capabilities, namespaceId, namespaceExtensionEntities, codecLookup } = input;\n\tconst resolvedFields = [];\n\tconst valueObjectStorageTypeName = authoringContributions?.valueObjectStorageType;\n\tconst declaredControlPolicy = getAttribute(model.attributes, \"control\")?.args.find((arg) => arg.kind === \"positional\")?.value.trim();\n\tconst modelDerivesChecks = declaredControlPolicy === void 0 || declaredControlPolicy === \"managed\";\n\tfor (const field of Object.values(model.fields)) {\n\t\tconst source = diagnosticSource(sources, field.node.syntax);\n\t\tconst fieldTypeReference = typeReferenceNode(field);\n\t\tconst fieldTypeResolution = fieldTypeReference === void 0 ? void 0 : binder.symbolForNode(fieldTypeReference);\n\t\tconst isModelField = fieldTypeResolution?.kind === \"model\";\n\t\tif (field.list && isModelField) continue;\n\t\tconst relationAttribute = getAttribute(field.attributes, \"relation\");\n\t\tif (isModelField && relationAttribute) continue;\n\t\tif (field.typeContractSpaceId !== void 0 && relationAttribute) continue;\n\t\tif (isModelField) continue;\n\t\tconst valueObjectName = fieldTypeResolution?.kind === \"compositeType\" ? fieldTypeResolution.symbol.name : void 0;\n\t\tconst isValueObjectField = valueObjectName !== void 0;\n\t\tconst isListField = field.list;\n\t\tconst isListColumn = storedAsListColumn({\n\t\t\tlist: isListField,\n\t\t\ttypedByValueObject: isValueObjectField\n\t\t});\n\t\tlet descriptor;\n\t\tlet presetContributions;\n\t\tconst resolveInput = {\n\t\t\tfield,\n\t\t\tresolution: fieldTypeResolution,\n\t\t\tenumTypeDescriptors,\n\t\t\tnamedTypeDescriptors,\n\t\t\tdiagnostics,\n\t\t\tsources,\n\t\t\tentityLabel: `Field \"${model.name}.${field.name}\"`,\n\t\t\t...ifDefined(\"namespaceId\", namespaceId),\n\t\t\t...ifDefined(\"namespaceExtensionEntities\", namespaceExtensionEntities),\n\t\t\tbinder,\n\t\t\tcodecLookup\n\t\t};\n\t\tif (isValueObjectField) {\n\t\t\tif (valueObjectStorageTypeName === void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_TYPE\",\n\t\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" is typed by the composite type \"${field.typeName}\", but the adapter of the stack declares no storage type for value objects, so the field has no column to be stored in.`,\n\t\t\t\t\t...source.at(field.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdescriptor = scalarColumnDescriptors.get(valueObjectStorageTypeName);\n\t\t\tif (descriptor === void 0) throw new InternalError(`The stack declares \"${valueObjectStorageTypeName}\" as its value-object storage type, but it is not one of the stack's scalar types; the control stack checks this when it is assembled.`);\n\t\t} else if (isListField) {\n\t\t\tif (capabilities[\"sql\"]?.[\"scalarList\"] !== true) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_SCALAR_LIST_UNSUPPORTED_TARGET\",\n\t\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" is a scalar list, but target \"${targetId}\" does not support scalar lists (the adapter does not report the \"scalarList\" capability). Remove the list or author it against a target that supports scalar lists.`,\n\t\t\t\t\t...source.at(field.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst resolved = resolveFieldTypeDescriptor(resolveInput);\n\t\t\tif (!resolved.ok) continue;\n\t\t\tif (resolved.presetContributions) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_PRESET_NOT_LIST\",\n\t\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" uses a field-preset call as a list element type. Presets cannot be list elements; remove \"[]\" or use a scalar type.`,\n\t\t\t\t\t...source.at(field.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdescriptor = resolved.descriptor;\n\t\t} else {\n\t\t\tconst resolved = resolveFieldTypeDescriptor(resolveInput);\n\t\t\tif (!resolved.ok) continue;\n\t\t\tdescriptor = resolved.descriptor;\n\t\t\tpresetContributions = resolved.presetContributions;\n\t\t}\n\t\tif (!descriptor) continue;\n\t\tif (presetContributions && field.optional) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_PRESET_NOT_OPTIONAL\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" uses a field-preset call and cannot be optional. Remove \"?\" or use a different field type.`,\n\t\t\t\t...source.at(field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst defaultAttribute = getAttribute(field.attributes, \"default\");\n\t\tif (presetContributions && defaultAttribute) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_PRESET_AND_DEFAULT_CONFLICT\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" uses a field-preset call and cannot also declare @default(...). The preset already specifies the default value.`,\n\t\t\t\t...source.at(defaultAttribute.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst enumHandle = fieldTypeResolution?.kind === \"block\" ? enumHandles.get(fieldTypeResolution.symbol) : void 0;\n\t\tconst loweredDefault = defaultAttribute ? enumHandle ? lowerEnumDefaultForField({\n\t\t\tmodelName: model.name,\n\t\t\tfieldName: field.name,\n\t\t\tfield,\n\t\t\tmodel,\n\t\t\tsymbolTable,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tenumHandle,\n\t\t\tdefaultFunctionRegistry,\n\t\t\tdataTypes,\n\t\t\tdiagnostics\n\t\t}) : lowerDefaultForField({\n\t\t\tmodelName: model.name,\n\t\t\tfieldName: field.name,\n\t\t\tfield,\n\t\t\tmodel,\n\t\t\tsymbolTable,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tcolumnDescriptor: descriptor,\n\t\t\tisListColumn,\n\t\t\tvalueObjectDefault: valueObjectName === void 0 ? void 0 : {\n\t\t\t\tvalueObjectName,\n\t\t\t\ttypes: valueObjectTypes\n\t\t\t},\n\t\t\tgeneratorDescriptorById,\n\t\t\tdefaultFunctionRegistry,\n\t\t\tdataTypes,\n\t\t\tcodecLookup,\n\t\t\tdiagnostics\n\t\t}) : {};\n\t\tconst loweredOnCreate = loweredDefault.executionDefaults?.onCreate;\n\t\tif (isListField && loweredDefault.defaultValue?.kind === \"function\" && loweredDefault.defaultValue.expression === \"autoincrement()\") {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_LIST_AUTOINCREMENT_UNSUPPORTED\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" is a list and cannot use autoincrement(); it is a Prisma marker for a sequence-backed scalar column, not SQL.`,\n\t\t\t\t...source.at(defaultAttribute?.span ?? field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isListField && loweredOnCreate) {\n\t\t\tconst defaultExpression = defaultAttribute?.args.find((arg) => arg.kind === \"positional\")?.value.trim() ?? \"this function\";\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_LIST_EXECUTION_DEFAULT_UNSUPPORTED\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" is a list and cannot use an execution default (\"${defaultExpression}\"). Lists have no per-element execution-default semantics; use a literal list @default or remove the default.`,\n\t\t\t\t...source.at(defaultAttribute?.span ?? field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (field.optional && loweredOnCreate) {\n\t\t\tconst generatorDescription = loweredOnCreate.kind === \"generator\" ? `\"${loweredOnCreate.id}\"` : \"for this field\";\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_DEFAULT_FUNCTION_ARGUMENT\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" cannot be optional when using execution default ${generatorDescription}. Remove \"?\" or use a storage default.`,\n\t\t\t\t...source.at(defaultAttribute?.span ?? field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst mappedColumnName = storageName(field, input.physicalNames);\n\t\tconst specContext = fieldSpecContext({\n\t\t\tsymbols: symbolTable,\n\t\t\tmodel,\n\t\t\tfield,\n\t\t\tbinder,\n\t\t\tdefaultFunctionRegistry,\n\t\t\tdataTypes\n\t\t});\n\t\tconst { idAttribute, uniqueAttribute, idName, uniqueName } = extractFieldConstraintNames({\n\t\t\tsymbolTable: input.symbolTable,\n\t\t\tmodel,\n\t\t\tfield,\n\t\t\tspecContext,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tdiagnostics\n\t\t});\n\t\tlet isIdField = Boolean(idAttribute);\n\t\tif (idAttribute && isListField) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_LIST_ID_UNSUPPORTED\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" is a list and cannot be a primary key. Remove @id; a list cannot be an identity column.`,\n\t\t\t\t...source.at(idAttribute.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (idAttribute && field.optional) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" @id cannot be optional; primary key columns must be NOT NULL`,\n\t\t\t\t...source.at(idAttribute.span)\n\t\t\t});\n\t\t\tisIdField = false;\n\t\t}\n\t\tif (presetContributions && idAttribute && !presetContributions.id) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_PRESET_AND_ID_CONFLICT\",\n\t\t\t\tmessage: `Field \"${model.name}.${field.name}\" uses a field-preset call and cannot also declare @id. Use a preset that contributes id semantics, or drop @id.`,\n\t\t\t\t...source.at(idAttribute.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst fieldExecutionDefaults = presetContributions?.executionDefaults ?? loweredDefault.executionDefaults;\n\t\tconst fieldDefaultValue = presetContributions?.default ?? loweredDefault.defaultValue;\n\t\tconst noCheckKinds = modelDerivesChecks ? lowerNoCheckForField({\n\t\t\tsymbolTable: input.symbolTable,\n\t\t\tmodel,\n\t\t\tfield,\n\t\t\tspecContext,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tisListColumn,\n\t\t\telementNullable: field.elementOptional,\n\t\t\tisDomainEnum: enumHandle !== void 0,\n\t\t\tdiagnostics\n\t\t}) : void 0;\n\t\tresolvedFields.push({\n\t\t\tfield,\n\t\t\tcolumnName: mappedColumnName,\n\t\t\tdescriptor,\n\t\t\tnullable: presetContributions?.nullable ?? field.optional,\n\t\t\t...ifDefined(\"defaultValue\", fieldDefaultValue),\n\t\t\t...ifDefined(\"executionDefaults\", fieldExecutionDefaults),\n\t\t\tisId: isIdField || Boolean(presetContributions?.id),\n\t\t\tisUnique: Boolean(uniqueAttribute) || Boolean(presetContributions?.unique),\n\t\t\t...ifDefined(\"idName\", idName),\n\t\t\t...ifDefined(\"uniqueName\", uniqueName),\n\t\t\t...ifDefined(\"many\", isListField ? true : void 0),\n\t\t\t...ifDefined(\"noCheck\", noCheckKinds),\n\t\t\t...ifDefined(\"elementNullable\", field.elementOptional ? true : void 0),\n\t\t\t...ifDefined(\"valueObjectTypeName\", valueObjectName),\n\t\t\t...ifDefined(\"enumTypeHandle\", enumHandle)\n\t\t});\n\t}\n\treturn resolvedFields;\n}\n//#endregion\nexport { readDataTypeDefault as _, getAuthoringEntity as a, resolveFieldTypeDescriptor as c, fieldSpecContext as d, interpretFieldAttribute as f, sqlAttributeSpecs as g, modelSpecContext as h, bareTypeConstructorOf as i, toNamedTypeFieldDescriptor as l, modelAttributeSpecsFrom as m, describeUnsupportedSqlAttribute as n, instantiateFieldTypeConstructor as o, interpretModelAttribute as p, modelCoordinateKey as r, instantiatePslTypeConstructor as s, collectResolvedFields as t, PSL_CHECK_ON_STI_VARIANT as u, readWrittenNumberForCodec as v, contractError as y };\n\n//# sourceMappingURL=psl-field-resolution-4U7Plpfb.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;AAIA,MAAM,8BAA8B;;AAEpC,MAAM,8BAA8B;;AAEpC,MAAM,4BAA4B;AAClC,SAAS,UAAU,OAAO;CACzB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC7D;AACA,SAAS,QAAQ,SAAS,gBAAgB;CACzC,OAAO;EACN,IAAI;EACJ;EACA;CACD;AACD;AACA,SAAS,aAAa,WAAW,SAAS,cAAc,gBAAgB;CACvE,MAAM,OAAO,iBAAiB,WAAW,OAAO;CAChD,OAAO,KAAK,KAAK;EAChB,IAAI;EACJ,OAAO,KAAK;CACb,IAAI,QAAQ;EACX,GAAG,KAAK;EACR;CACD,GAAG,cAAc;AAClB;;AAEA,SAAS,mBAAmB,YAAY;CACvC,OAAO,eAAe,KAAK,IAAI,KAAK,IAAI,UAAU,UAAU;AAC7D;;AAEA,SAAS,gBAAgB,iBAAiB,OAAO,cAAc,gBAAgB;CAC9E,IAAI,oBAAoB,KAAK,GAAG,OAAO;EACtC,IAAI;EACJ;CACD;CACA,IAAI;EACH,OAAO;GAC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AAS,UAAU,MAAM,KAAK,GAAG,MAAM,KAAK;IAC5C,GAAG,OAAO,GAAG,YAAY,IAAI;GAC9B,CAAC;GACD,YAAY;EACb;EACA,IAAI,uBAAuB,eAAe,CAAC,oBAAoB,IAAI;GAClE,YAAY,KAAK;IAChB,MAAM;IACN,SAAS,UAAU,MAAM,KAAK,GAAG,MAAM,KAAK;IAC5C,GAAG,OAAO,GAAG,YAAY,IAAI;GAC9B,CAAC;GACD;EACD;EACA,MAAM,yBAAyB,qBAAqB,qBAAqB,eAAe;EACxF,MAAM,oBAAoB,qBAAqB,WAAW,eAAe;EACzE,MAAM,eAAe,qBAAqB,qBAAqB;GAC9D,aAAa,MAAM;GACnB;GACA;GACA;GACA,SAAS,MAAM;GACf,QAAQ,MAAM;GACd;GACA,iBAAiB,MAAM;GACvB,cAAc,eAAe,KAAK;GAClC;EACD,CAAC,IAAI,KAAK;EACV,eAAe,KAAK;GACnB;GACA,YAAY;GACZ;GACA,UAAU,qBAAqB,YAAY,MAAM;GACjD,GAAG,UAAU,gBAAgB,iBAAiB;GAC9C,GAAG,UAAU,qBAAqB,sBAAsB;GACxD,MAAM,aAAa,QAAQ,qBAAqB,EAAE;GAClD,UAAU,QAAQ,eAAe,KAAK,QAAQ,qBAAqB,MAAM;GACzE,GAAG,UAAU,UAAU,MAAM;GAC7B,GAAG,UAAU,cAAc,UAAU;GACrC,GAAG,UAAU,QAAQ,cAAc,OAAO,KAAK,CAAC;GAChD,GAAG,UAAU,WAAW,YAAY;GACpC,GAAG,UAAU,mBAAmB,MAAM,kBAAkB,OAAO,KAAK,CAAC;GACrE,GAAG,UAAU,uBAAuB,eAAe;GACnD,GAAG,UAAU,kBAAkB,UAAU;EAC1C,CAAC;CACF;CACA,OAAO;AACR"}
@@ -1,4 +1,4 @@
1
- import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-_gF1Un8p.mjs";
1
+ import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-DlC2yTK1.mjs";
2
2
  import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
3
3
  import { a as snakeToCamelCase, i as needsEscaping, n as escapeName, o as snakeToPascalCase, r as hasSeparators, t as escapeIfNeeded } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
4
4
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -198,4 +198,4 @@ function addRelationField(map, tableName, field) {
198
198
  //#endregion
199
199
  export { pluralize as a, toModelName as c, inferRelations as i, deriveBackRelationFieldName as n, toEnumName as o, deriveRelationFieldName as r, toFieldName as s, buildChildRelationField as t };
200
200
 
201
- //# sourceMappingURL=psl-infer-DHO72J_m.mjs.map
201
+ //# sourceMappingURL=psl-infer-CG0_wra6.mjs.map