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

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 (281) hide show
  1. package/dist/{aggregate-descriptor-registry-DrJ1vHEo.mjs → aggregate-descriptor-registry-Dd7Uj7DJ.mjs} +3 -3
  2. package/dist/{aggregate-descriptor-registry-DrJ1vHEo.mjs.map → aggregate-descriptor-registry-Dd7Uj7DJ.mjs.map} +1 -1
  3. package/dist/{ast-BDwGvnKK.mjs → ast-CBO3PEJF.mjs} +73 -47
  4. package/dist/ast-CBO3PEJF.mjs.map +1 -0
  5. package/dist/{ast-BoM9T1b2.d.mts → ast-Dzsat0Zb.d.mts} +27 -26
  6. package/dist/ast-Dzsat0Zb.d.mts.map +1 -0
  7. package/dist/{attribute-specs-D7EhHD08.d.mts → attribute-specs-2I2xuKEa.d.mts} +4 -3
  8. package/dist/attribute-specs-2I2xuKEa.d.mts.map +1 -0
  9. package/dist/{authored-check-naming-CO3GA46Y.mjs → authored-check-naming-CIX7Bbyh.mjs} +3 -3
  10. package/dist/{authored-check-naming-CO3GA46Y.mjs.map → authored-check-naming-CIX7Bbyh.mjs.map} +1 -1
  11. package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts} +2 -2
  12. package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts.map → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts.map} +1 -1
  13. package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs} +2 -2
  14. package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs.map → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map} +1 -1
  15. package/dist/builder.d.mts +3 -3
  16. package/dist/builder__runtime.d.mts +7 -7
  17. package/dist/builder__runtime.mjs +2 -2
  18. package/dist/builder__types.d.mts +5 -5
  19. package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs → codec-descriptor-registry-4kw8FPpo.mjs} +2 -2
  20. package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs.map → codec-descriptor-registry-4kw8FPpo.mjs.map} +1 -1
  21. package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts} +3 -3
  22. package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts.map → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts.map} +1 -1
  23. package/dist/collection-methods-DQAFcGEB.d.mts +1 -0
  24. package/dist/{config-types-ni1nb_HA.mjs → config-types-ComQZUlA.mjs} +2 -2
  25. package/dist/{config-types-ni1nb_HA.mjs.map → config-types-ComQZUlA.mjs.map} +1 -1
  26. package/dist/{contract-builder-CH0AIjsv.d.mts → contract-builder-De_fyZGT.d.mts} +6 -6
  27. package/dist/{contract-builder-CH0AIjsv.d.mts.map → contract-builder-De_fyZGT.d.mts.map} +1 -1
  28. package/dist/{contract-builder-CiYVj56_.mjs → contract-builder-fQ3gkIR5.mjs} +5 -5
  29. package/dist/{contract-builder-CiYVj56_.mjs.map → contract-builder-fQ3gkIR5.mjs.map} +1 -1
  30. package/dist/contract-emitter.mjs +1 -1
  31. package/dist/contract-prisma7__provider.d.mts +12 -6
  32. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  33. package/dist/contract-prisma7__provider.mjs +48 -43
  34. package/dist/contract-prisma7__provider.mjs.map +1 -1
  35. package/dist/contract-psl.d.mts +2 -2
  36. package/dist/contract-psl.d.mts.map +1 -1
  37. package/dist/contract-psl.mjs +1 -1
  38. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  39. package/dist/contract-psl__attribute-specs.mjs +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 +2 -2
  43. package/dist/contract-ts.mjs +4 -4
  44. package/dist/contract-ts__config-types.mjs +1 -1
  45. package/dist/contract-ts__contract-builder.d.mts +2 -2
  46. package/dist/contract-ts__contract-builder.mjs +3 -3
  47. package/dist/contract.d.mts +6 -6
  48. package/dist/contract.mjs +15 -15
  49. package/dist/contract__authored-check-naming.mjs +1 -1
  50. package/dist/contract__data-type-support.d.mts +2 -2
  51. package/dist/contract__data-type-support.mjs +2 -2
  52. package/dist/contract__data-type.d.mts +2 -2
  53. package/dist/contract__data-type.mjs +3 -3
  54. package/dist/contract__entity-kinds.mjs +1 -1
  55. package/dist/contract__factories.mjs +1 -1
  56. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  57. package/dist/contract__foreign-key-materialization.mjs +2 -2
  58. package/dist/contract__index-naming.mjs +1 -1
  59. package/dist/contract__sql-expression.d.mts +2 -2
  60. package/dist/contract__sql-expression.mjs +2 -2
  61. package/dist/contract__types.mjs +3 -3
  62. package/dist/contract__validators.d.mts +1 -1
  63. package/dist/contract__validators.mjs +2 -2
  64. package/dist/{control-DXqMl_gd.mjs → control-ClahTAD-.mjs} +246 -40
  65. package/dist/control-ClahTAD-.mjs.map +1 -0
  66. package/dist/{control-adapter-CkFfBVei-DGf1LihO.d.mts → control-adapter-BCopdpsT-DIHCWbq_.d.mts} +9 -26
  67. package/dist/control-adapter-BCopdpsT-DIHCWbq_.d.mts.map +1 -0
  68. package/dist/control-adapter-BsSf5pqM.d.mts +1 -0
  69. package/dist/{control-CPg4LwJV.d.mts → control-mpACqp72.d.mts} +72 -39
  70. package/dist/control-mpACqp72.d.mts.map +1 -0
  71. package/dist/{data-type-CYsho6Yd.d.mts → data-type-B8N33s-_.d.mts} +14 -7
  72. package/dist/data-type-B8N33s-_.d.mts.map +1 -0
  73. package/dist/{numeral-text-Cqu87pVe-DJCqBaSC.mjs → data-type-DKk8Unnz.mjs} +2 -2
  74. package/dist/data-type-DKk8Unnz.mjs.map +1 -0
  75. package/dist/{data-type-support-CfhpAKLX.mjs → data-type-support-C5-XxxeB.mjs} +11 -24
  76. package/dist/data-type-support-C5-XxxeB.mjs.map +1 -0
  77. package/dist/{data-type-support-4TcZuD7d.d.mts → data-type-support-CBcYhSkD.d.mts} +12 -16
  78. package/dist/data-type-support-CBcYhSkD.d.mts.map +1 -0
  79. package/dist/{db-BmrN9nRS-CzyybGKR.d.mts → db-BmrN9nRS-xynLbnAy.d.mts} +10 -10
  80. package/dist/{db-BmrN9nRS-CzyybGKR.d.mts.map → db-BmrN9nRS-xynLbnAy.d.mts.map} +1 -1
  81. package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts → ddl-types-CoP6yAw9-BDp3W_5g.d.mts} +4 -4
  82. package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts.map → ddl-types-CoP6yAw9-BDp3W_5g.d.mts.map} +1 -1
  83. package/dist/{default-mapping-B8_APB1M-CWcTmSQW.d.mts → default-mapping-CEISdj2g-DF1LzGBR.d.mts} +7 -5
  84. package/dist/default-mapping-CEISdj2g-DF1LzGBR.d.mts.map +1 -0
  85. package/dist/{derived-checks-Cgx_VgS3-CmFqNFgU.mjs → derived-checks-CrvMQTJF-DlxFFtNM.mjs} +18 -18
  86. package/dist/derived-checks-CrvMQTJF-DlxFFtNM.mjs.map +1 -0
  87. package/dist/{diff-CVVGktZG.d.mts → diff-Bd9ILpZL.d.mts} +20 -7
  88. package/dist/diff-Bd9ILpZL.d.mts.map +1 -0
  89. package/dist/diff-DZ82XaGR.mjs +21 -0
  90. package/dist/diff-DZ82XaGR.mjs.map +1 -0
  91. package/dist/{dist-Cg2lL1hR.mjs → dist-DAHIT4AS.mjs} +2 -2
  92. package/dist/{dist-Cg2lL1hR.mjs.map → dist-DAHIT4AS.mjs.map} +1 -1
  93. package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs} +3 -3
  94. package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs.map → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs.map} +1 -1
  95. package/dist/exports-DVsHk8HP-DrH_2a-H.mjs +2371 -0
  96. package/dist/exports-DVsHk8HP-DrH_2a-H.mjs.map +1 -0
  97. package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts → expression-BzrfOiPC-3NqR8UzK.d.mts} +4 -4
  98. package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts.map → expression-BzrfOiPC-3NqR8UzK.d.mts.map} +1 -1
  99. package/dist/expression-CeerCjQG.d.mts +2 -0
  100. package/dist/{expression-CNBCbbzU-DOXKUxQs.d.mts → expression-sOY1120I-DOykEQlw.d.mts} +4 -4
  101. package/dist/expression-sOY1120I-DOykEQlw.d.mts.map +1 -0
  102. package/dist/{factories-vDQ3S5gW.mjs → factories-DkD3nMYt.mjs} +3 -3
  103. package/dist/{factories-vDQ3S5gW.mjs.map → factories-DkD3nMYt.mjs.map} +1 -1
  104. package/dist/family.d.mts +14 -14
  105. package/dist/family.mjs +8 -8
  106. package/dist/family__control-adapter.d.mts +2 -2
  107. package/dist/family__control.d.mts +5 -5
  108. package/dist/family__control.mjs +4 -4
  109. package/dist/family__diff.d.mts +1 -2
  110. package/dist/family__diff.mjs +2 -2
  111. package/dist/family__ir.d.mts +1 -1
  112. package/dist/family__ir.mjs +1 -1
  113. package/dist/family__migration.d.mts +1 -1
  114. package/dist/family__pack.d.mts +1 -1
  115. package/dist/family__pack.mjs +2 -2
  116. package/dist/family__psl-build.d.mts +2 -2
  117. package/dist/family__psl-build.mjs +1 -1
  118. package/dist/family__psl-infer.d.mts +1 -1
  119. package/dist/family__psl-infer.mjs +1 -1
  120. package/dist/{foreign-key-materialization-DJ6uhBba.d.mts → foreign-key-materialization-DCaDnUs-.d.mts} +3 -3
  121. package/dist/{foreign-key-materialization-DJ6uhBba.d.mts.map → foreign-key-materialization-DCaDnUs-.d.mts.map} +1 -1
  122. package/dist/{foreign-key-materialization-DibQ9Hjg.mjs → foreign-key-materialization-DfNPQL9G.mjs} +4 -4
  123. package/dist/{foreign-key-materialization-DibQ9Hjg.mjs.map → foreign-key-materialization-DfNPQL9G.mjs.map} +1 -1
  124. package/dist/{functions-DSwXxsTg.d.mts → functions-Cp8soSAv.d.mts} +3 -3
  125. package/dist/{functions-DSwXxsTg.d.mts.map → functions-Cp8soSAv.d.mts.map} +1 -1
  126. package/dist/{index-C8jUgdUh.d.mts → index-BxlXOVeT.d.mts} +30 -23
  127. package/dist/{index-C8jUgdUh.d.mts.map → index-BxlXOVeT.d.mts.map} +1 -1
  128. package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs → index-equivalence-DswCiq5l-BsphajRC.mjs} +2 -2
  129. package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs.map → index-equivalence-DswCiq5l-BsphajRC.mjs.map} +1 -1
  130. package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs → index-naming-BOcJT1B3-18gQUduD.mjs} +2 -2
  131. package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs.map → index-naming-BOcJT1B3-18gQUduD.mjs.map} +1 -1
  132. package/dist/index-reference-CWppFpUV.d.mts +1 -0
  133. package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts → index-reference-DJaQLZA3-DxmYkkX-.d.mts} +3 -3
  134. package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts.map → index-reference-DJaQLZA3-DxmYkkX-.d.mts.map} +1 -1
  135. package/dist/{interpreter-CvmBTYyI-DNl-jr2E.mjs → interpreter-CFj2aTEP-BHL3TOqk.mjs} +13 -11
  136. package/dist/interpreter-CFj2aTEP-BHL3TOqk.mjs.map +1 -0
  137. package/dist/{ir-D0Vpm5O9.d.mts → ir-DgNo535E.d.mts} +4 -2
  138. package/dist/ir-DgNo535E.d.mts.map +1 -0
  139. package/dist/ir-I-xciGUH.mjs.map +1 -1
  140. package/dist/middleware-IqWk9Eff.d.mts +1 -0
  141. package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts → middleware-oCT0RWkt-AFlRNCOD.d.mts} +3 -3
  142. package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts.map → middleware-oCT0RWkt-AFlRNCOD.d.mts.map} +1 -1
  143. package/dist/{migration-ESRa6312.d.mts → migration-lg_VgP_F.d.mts} +2 -2
  144. package/dist/{migration-ESRa6312.d.mts.map → migration-lg_VgP_F.d.mts.map} +1 -1
  145. package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs → naming-bM5qm5PY-DdginUhA.mjs} +2 -2
  146. package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs.map → naming-bM5qm5PY-DdginUhA.mjs.map} +1 -1
  147. package/dist/{opaque-sql-BWxbqe5a-GGKfyakq.mjs → opaque-sql-Dset3kln-BzzXoO94.mjs} +3 -3
  148. package/dist/opaque-sql-Dset3kln-BzzXoO94.mjs.map +1 -0
  149. package/dist/orm-client.d.mts +28 -60
  150. package/dist/orm-client.d.mts.map +1 -1
  151. package/dist/orm-client.mjs +564 -233
  152. package/dist/orm-client.mjs.map +1 -1
  153. package/dist/{pack-BtGENS4_.d.mts → pack-CyjyMUN0.d.mts} +3 -3
  154. package/dist/{pack-BtGENS4_.d.mts.map → pack-CyjyMUN0.d.mts.map} +1 -1
  155. package/dist/plan-BZpZafiQ.d.mts +2 -0
  156. package/dist/{plan-cGEaSXHv-yuz43WrR.d.mts → plan-Cbed2eDu-BZM3geSm.d.mts} +3 -3
  157. package/dist/plan-Cbed2eDu-BZM3geSm.d.mts.map +1 -0
  158. package/dist/{psl-build-PXVtl8gM.d.mts → psl-build-BHQfP1_C.d.mts} +5 -5
  159. package/dist/{psl-build-PXVtl8gM.d.mts.map → psl-build-BHQfP1_C.d.mts.map} +1 -1
  160. package/dist/{psl-build-8bx9WTUt.mjs → psl-build-BsJ6eChh.mjs} +118 -84
  161. package/dist/psl-build-BsJ6eChh.mjs.map +1 -0
  162. package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts} +2 -2
  163. package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts.map → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts.map} +1 -1
  164. package/dist/{psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs → psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs} +76 -66
  165. package/dist/psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map +1 -0
  166. package/dist/{psl-infer-g040TwAr.d.mts → psl-infer-B6iemK9i.d.mts} +4 -4
  167. package/dist/{psl-infer-g040TwAr.d.mts.map → psl-infer-B6iemK9i.d.mts.map} +1 -1
  168. package/dist/{psl-infer-CG0_wra6.mjs → psl-infer-HPi_YMeE.mjs} +2 -2
  169. package/dist/{psl-infer-CG0_wra6.mjs.map → psl-infer-HPi_YMeE.mjs.map} +1 -1
  170. package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts} +5 -5
  171. package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts.map → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts.map} +1 -1
  172. package/dist/query-lane-context-Dpep1Fzy.d.mts +1 -0
  173. package/dist/relational-core.d.mts +12 -12
  174. package/dist/relational-core.mjs +2 -2
  175. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  176. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  177. package/dist/relational-core__ast.d.mts +3 -3
  178. package/dist/relational-core__ast.mjs +2 -2
  179. package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
  180. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  181. package/dist/relational-core__collection-methods.d.mts +2 -2
  182. package/dist/relational-core__contract-free.d.mts +3 -3
  183. package/dist/relational-core__contract-free.mjs +2 -2
  184. package/dist/relational-core__contract-free.mjs.map +1 -1
  185. package/dist/relational-core__expression.d.mts +3 -3
  186. package/dist/relational-core__functions.d.mts +1 -1
  187. package/dist/relational-core__index-reference.d.mts +2 -2
  188. package/dist/relational-core__middleware.d.mts +2 -2
  189. package/dist/relational-core__plan.d.mts +3 -3
  190. package/dist/relational-core__query-lane-context.d.mts +2 -2
  191. package/dist/relational-core__types.d.mts +2 -2
  192. package/dist/runtime.d.mts +5 -5
  193. package/dist/runtime.mjs +1 -2289
  194. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  195. package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts → schema-differ-DmP74bB8-BGA6fzOv.d.mts} +4 -4
  196. package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts.map → schema-differ-DmP74bB8-BGA6fzOv.d.mts.map} +1 -1
  197. package/dist/schema-ir.d.mts +2 -2
  198. package/dist/schema-ir.mjs +2 -2
  199. package/dist/schema-ir__naming.mjs +1 -1
  200. package/dist/schema-ir__types.d.mts +3 -3
  201. package/dist/schema-ir__types.mjs +2 -2
  202. package/dist/{schema-verify-DIfHSB4I-wt28gB9e.mjs → schema-verify-BwRdzbHb-B9vFrm3T.mjs} +22 -6
  203. package/dist/schema-verify-BwRdzbHb-B9vFrm3T.mjs.map +1 -0
  204. package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs → serialized-index-52COq1yV-CUJ2F65u.mjs} +3 -3
  205. package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs.map → serialized-index-52COq1yV-CUJ2F65u.mjs.map} +1 -1
  206. package/dist/{sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs → sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs} +12 -7
  207. package/dist/sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs.map +1 -0
  208. package/dist/{data-type-DU0mtme5.mjs → sql-data-type-Dabuwxet-BljsNjBu.mjs} +32 -13
  209. package/dist/sql-data-type-Dabuwxet-BljsNjBu.mjs.map +1 -0
  210. package/dist/{sql-execution-plan-C7XauPPu-BgBp89vP.d.mts → sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts} +3 -3
  211. package/dist/sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts.map +1 -0
  212. package/dist/{sql-expression-BWrjmY6M.d.mts → sql-expression-BAtH-2UU.d.mts} +6 -6
  213. package/dist/sql-expression-BAtH-2UU.d.mts.map +1 -0
  214. package/dist/{sql-expression-DSRILiU2.mjs → sql-expression-BJCuy-WI.mjs} +15 -9
  215. package/dist/sql-expression-BJCuy-WI.mjs.map +1 -0
  216. package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs → storage-table-DN36E2yE-0ncS821l.mjs} +2 -2
  217. package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs.map → storage-table-DN36E2yE-0ncS821l.mjs.map} +1 -1
  218. package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts → transaction-state-DR3nKTmH-n_12DsnU.d.mts} +9 -9
  219. package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts.map → transaction-state-DR3nKTmH-n_12DsnU.d.mts.map} +1 -1
  220. package/dist/types-BLyhYk6B.d.mts +1 -0
  221. package/dist/{types-DvhckjSz-Cm0Oodhr.mjs → types-CaVn_xxe-D9WdU3Iy.mjs} +81 -157
  222. package/dist/types-CaVn_xxe-D9WdU3Iy.mjs.map +1 -0
  223. package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts → types-Cv5t6_Ly-CcBWTpfM.d.mts} +6 -6
  224. package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts.map → types-Cv5t6_Ly-CcBWTpfM.d.mts.map} +1 -1
  225. package/dist/{types-Sh5HuaZE-BwZNUDEi.d.mts → types-DVaVM20q-B-QcMIOa.d.mts} +9 -20
  226. package/dist/types-DVaVM20q-B-QcMIOa.d.mts.map +1 -0
  227. package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts → types-DaYtBAYT-B22gkh5z.d.mts} +5 -5
  228. package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts.map → types-DaYtBAYT-B22gkh5z.d.mts.map} +1 -1
  229. package/dist/{types-GS3fwvoX.mjs → types-M_FeBD9w.mjs} +2 -2
  230. package/dist/{types-GS3fwvoX.mjs.map → types-M_FeBD9w.mjs.map} +1 -1
  231. package/dist/types-_7TbRpPw.d.mts +1 -0
  232. package/dist/{types-C-z8HyiZ-1Nhw0pHj.d.mts → types-c1iIhJep-DdMj6TNl.d.mts} +49 -51
  233. package/dist/types-c1iIhJep-DdMj6TNl.d.mts.map +1 -0
  234. package/dist/{validators-DlpO67uZ.mjs → validators-Bvfk0aN7.mjs} +14 -11
  235. package/dist/validators-Bvfk0aN7.mjs.map +1 -0
  236. package/dist/{validators-R-Wsy5Rr.d.mts → validators-CTZ-hU2l.d.mts} +4 -1
  237. package/dist/validators-CTZ-hU2l.d.mts.map +1 -0
  238. package/package.json +18 -18
  239. package/dist/ast-BDwGvnKK.mjs.map +0 -1
  240. package/dist/ast-BoM9T1b2.d.mts.map +0 -1
  241. package/dist/attribute-specs-D7EhHD08.d.mts.map +0 -1
  242. package/dist/collection-methods-CyUXbXVw.d.mts +0 -1
  243. package/dist/control-CPg4LwJV.d.mts.map +0 -1
  244. package/dist/control-DXqMl_gd.mjs.map +0 -1
  245. package/dist/control-adapter-CkFfBVei-DGf1LihO.d.mts.map +0 -1
  246. package/dist/control-adapter-DDjgBMy3.d.mts +0 -1
  247. package/dist/data-type-CYsho6Yd.d.mts.map +0 -1
  248. package/dist/data-type-DU0mtme5.mjs.map +0 -1
  249. package/dist/data-type-support-4TcZuD7d.d.mts.map +0 -1
  250. package/dist/data-type-support-CfhpAKLX.mjs.map +0 -1
  251. package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +0 -1
  252. package/dist/derived-checks-Cgx_VgS3-CmFqNFgU.mjs.map +0 -1
  253. package/dist/diff-B16bL_IR.mjs +0 -13
  254. package/dist/diff-B16bL_IR.mjs.map +0 -1
  255. package/dist/diff-CVVGktZG.d.mts.map +0 -1
  256. package/dist/expression-CNBCbbzU-DOXKUxQs.d.mts.map +0 -1
  257. package/dist/expression-DUYovBa6.d.mts +0 -2
  258. package/dist/index-reference-DGQdSRjQ.d.mts +0 -1
  259. package/dist/interpreter-CvmBTYyI-DNl-jr2E.mjs.map +0 -1
  260. package/dist/ir-D0Vpm5O9.d.mts.map +0 -1
  261. package/dist/middleware-Bp-R5o9E.d.mts +0 -1
  262. package/dist/numeral-text-Cqu87pVe-DJCqBaSC.mjs.map +0 -1
  263. package/dist/opaque-sql-BWxbqe5a-GGKfyakq.mjs.map +0 -1
  264. package/dist/plan-DdpaNNu1.d.mts +0 -2
  265. package/dist/plan-cGEaSXHv-yuz43WrR.d.mts.map +0 -1
  266. package/dist/psl-build-8bx9WTUt.mjs.map +0 -1
  267. package/dist/psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs.map +0 -1
  268. package/dist/query-lane-context-C4xq68Mr.d.mts +0 -1
  269. package/dist/runtime.mjs.map +0 -1
  270. package/dist/schema-verify-DIfHSB4I-wt28gB9e.mjs.map +0 -1
  271. package/dist/sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs.map +0 -1
  272. package/dist/sql-execution-plan-C7XauPPu-BgBp89vP.d.mts.map +0 -1
  273. package/dist/sql-expression-BWrjmY6M.d.mts.map +0 -1
  274. package/dist/sql-expression-DSRILiU2.mjs.map +0 -1
  275. package/dist/types-BSBsW0qR.d.mts +0 -1
  276. package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +0 -1
  277. package/dist/types-CJK7FBdw.d.mts +0 -1
  278. package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +0 -1
  279. package/dist/types-Sh5HuaZE-BwZNUDEi.d.mts.map +0 -1
  280. package/dist/validators-DlpO67uZ.mjs.map +0 -1
  281. package/dist/validators-R-Wsy5Rr.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index-naming-BOcJT1B3-CeEoP8t3.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/index-naming-BOcJT1B3.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { a as rendersIndexBody } from \"./index-types-pC_5vADQ.mjs\";\nimport { flushAuthoringWarnings } from \"@internal/framework-components/authoring\";\nimport { assertWireNamePrefixLength, computeIndexContentHash, defaultIndexName } from \"@internal/sql-schema-ir/naming\";\n//#region src/index-naming.ts\n/**\n* Narrows the opaque payload a contributed model attribute returns under\n* `index` (see `AuthoringModelAttributeIndexOutput`). The framework hands the\n* value through untyped because an index's shape belongs to the family; this\n* is the SQL family's boundary check. It proves the structure only — the\n* name/map and expression rules stay where `@@index` enforces them, in\n* {@link lowerAuthoredIndex}.\n*/\nfunction isAuthoredIndexInput(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = { ...value };\n\tif (typeof candidate[\"expression\"] === \"string\" === (Array.isArray(candidate[\"columns\"]) && candidate[\"columns\"].every((element) => typeof element === \"string\"))) return false;\n\tif (!isOptionalString(candidate[\"where\"])) return false;\n\tif (!isOptionalString(candidate[\"map\"])) return false;\n\tif (!isOptionalString(candidate[\"name\"])) return false;\n\tif (candidate[\"unique\"] !== void 0 && typeof candidate[\"unique\"] !== \"boolean\") return false;\n\tif (candidate[\"type\"] === void 0) return candidate[\"options\"] === void 0;\n\tif (typeof candidate[\"type\"] !== \"string\") return false;\n\tconst options = candidate[\"options\"];\n\treturn options === void 0 || typeof options === \"object\" && options !== null && !Array.isArray(options);\n}\nfunction isOptionalString(value) {\n\treturn value === void 0 || typeof value === \"string\";\n}\nconst EXACT_NAME_BODY_PREAMBLE = \"Drift detection compares the authored SQL text byte-for-byte against Postgres's reprinted form, which is only reliable when the text was captured by contract infer.\";\n/**\n* Per-subject remediation: an index or check moves to wire naming via\n* `name:`; a policy has no such parameter — dropping `@@map` makes the\n* block's head the wire prefix.\n*/\nconst EXACT_NAME_BODY_REMEDIATION = {\n\tindex: \"For hand-authored definitions, use name: and let Prisma 8 manage the physical name; to migrate an adopted object to wire naming, replace map: with name: (keeping the body text unchanged) and apply the resulting rename migration.\",\n\tpolicy: \"For hand-authored definitions, drop @@map and let the policy block's head name the policy; to migrate an adopted policy to wire naming, remove @@map (keeping the body text unchanged) and apply the resulting rename migration.\",\n\tcheck: \"For hand-authored definitions, use name: and let Prisma 8 manage the physical name; to migrate an adopted check to wire naming, replace map: with name: (keeping the body text unchanged) and apply the resulting rename migration.\"\n};\n/** What the user actually wrote, per subject: index and check `map:`, policy `@@map`. */\nconst EXACT_NAME_FEATURE = {\n\tindex: \"map:\",\n\tpolicy: \"@@map\",\n\tcheck: \"map:\"\n};\nconst EXACT_NAME_BODY_WARNING_CODE = \"PN_EXACT_NAME_BODY_COMPARISON\";\n/**\n* Mints the exact-name body-comparison warning for a `map:`-named object\n* carrying a hand-authorable SQL body — fully formed, so the transport and\n* the flush stay generic. `subject` distinguishes the index, policy, and\n* check callers that mint this same warning; the feature name and the\n* remediation are subject-specific end to end, so a batched summary\n* (grouped on code + summary) is true of every object it covers.\n*/\nfunction exactNameBodyWarning(subject, exactName) {\n\tconst item = `${subject} \"${exactName}\"`;\n\tconst feature = EXACT_NAME_FEATURE[subject];\n\tconst tail = `with a SQL body. ${EXACT_NAME_BODY_PREAMBLE} ${EXACT_NAME_BODY_REMEDIATION[subject]}`;\n\treturn {\n\t\tcode: EXACT_NAME_BODY_WARNING_CODE,\n\t\tmessage: `${item} uses ${feature} ${tail}`,\n\t\titem,\n\t\tsummary: `objects use ${feature} ${tail}`\n\t};\n}\n/**\n* Lowers an authored index into the name-identified entity `contract.json`\n* persists: exact mode adopts `map` verbatim (no prefix, no hash); wire\n* mode appends the content-hash suffix to the authored or default prefix.\n* The cross-field guards are the shared enforcement backstop for both\n* authoring surfaces (PSL pre-empts them with span-anchored diagnostics).\n*/\nfunction lowerAuthoredIndex(tableName, authored, warnings, indexTypes) {\n\tif (authored.columns === void 0 === (authored.expression === void 0)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": an index takes either fields (columns) or an expression — exactly one, not both.`);\n\tif (authored.map !== void 0 && authored.name !== void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index \"${authored.map}\" on table \"${tableName}\": map and name are mutually exclusive — map adopts an exact physical name, name is a wire prefix.`);\n\tif (authored.expression !== void 0 && authored.name === void 0 && authored.map === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": an expression index requires an explicit name (name:) or exact physical name (map:) — a default name cannot be derived from an expression.`);\n\tif (authored.options !== void 0 && authored.type === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": options requires an explicit type — an index with options but no type cannot round-trip through contract infer (the emitted type: would change the wire name).`);\n\tconst unique = authored.unique ?? false;\n\tif (authored.map !== void 0) {\n\t\tconst typeEntry = authored.type === void 0 ? void 0 : indexTypes?.get(authored.type);\n\t\tif (authored.expression !== void 0 || authored.where !== void 0 || typeEntry !== void 0 && rendersIndexBody(typeEntry)) {\n\t\t\tconst warning = exactNameBodyWarning(\"index\", authored.map);\n\t\t\tif (warnings !== void 0) warnings.push(warning);\n\t\t\telse flushAuthoringWarnings([warning]);\n\t\t}\n\t\tconst carried = {\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: authored.map\n\t\t\t},\n\t\t\twhere: authored.where,\n\t\t\tunique,\n\t\t\ttype: authored.type,\n\t\t\toptions: authored.options\n\t\t};\n\t\treturn authored.expression !== void 0 ? {\n\t\t\t...carried,\n\t\t\texpression: authored.expression\n\t\t} : {\n\t\t\t...carried,\n\t\t\tcolumns: authored.columns ?? []\n\t\t};\n\t}\n\tconst prefix = authored.name ?? defaultIndexName(tableName, authored.columns ?? []);\n\tassertWireNamePrefixLength(prefix, \"index prefix\");\n\tconst carried = {\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix,\n\t\t\thash: computeIndexContentHash({\n\t\t\t\t...authored.columns !== void 0 && { columns: authored.columns },\n\t\t\t\t...authored.expression !== void 0 && { expression: authored.expression },\n\t\t\t\t...authored.where !== void 0 && { where: authored.where },\n\t\t\t\tunique,\n\t\t\t\t...authored.type !== void 0 && { type: authored.type },\n\t\t\t\t...authored.options !== void 0 && { options: authored.options }\n\t\t\t})\n\t\t},\n\t\twhere: authored.where,\n\t\tunique,\n\t\ttype: authored.type,\n\t\toptions: authored.options\n\t};\n\treturn authored.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: authored.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: authored.columns ?? []\n\t};\n}\n//#endregion\nexport { isAuthoredIndexInput as n, lowerAuthoredIndex as r, exactNameBodyWarning as t };\n\n//# sourceMappingURL=index-naming-BOcJT1B3.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,qBAAqB,OAAO;CACpC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY,EAAE,GAAG,MAAM;CAC7B,IAAI,OAAO,UAAU,kBAAkB,cAAc,MAAM,QAAQ,UAAU,UAAU,KAAK,UAAU,UAAU,CAAC,OAAO,YAAY,OAAO,YAAY,QAAQ,IAAI,OAAO;CAC1K,IAAI,CAAC,iBAAiB,UAAU,QAAQ,GAAG,OAAO;CAClD,IAAI,CAAC,iBAAiB,UAAU,MAAM,GAAG,OAAO;CAChD,IAAI,CAAC,iBAAiB,UAAU,OAAO,GAAG,OAAO;CACjD,IAAI,UAAU,cAAc,KAAK,KAAK,OAAO,UAAU,cAAc,WAAW,OAAO;CACvF,IAAI,UAAU,YAAY,KAAK,GAAG,OAAO,UAAU,eAAe,KAAK;CACvE,IAAI,OAAO,UAAU,YAAY,UAAU,OAAO;CAClD,MAAM,UAAU,UAAU;CAC1B,OAAO,YAAY,KAAK,KAAK,OAAO,YAAY,YAAY,YAAY,QAAQ,CAAC,MAAM,QAAQ,OAAO;AACvG;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,UAAU,KAAK,KAAK,OAAO,U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AAqB,SAAS,SAAS,GAAG;GAC1D,IAAI,aAAa,KAAK,GAAG,SAAS,KAAK,OAAO;QACzC,uBAAuB,CAAC,OAAO,CAAC;EACtC;EACA,MAAM,UAAU;GACf,QAAQ;IACP,MAAM;IACN,MAAM,SAAS;GAChB;GACA,OAAO,SAAS;GAChB;GACA,MAAM,SAAS;GACf,SAAS,SAAS;EACnB;EACA,OAAO,SAAS,eAAe,KAAK,IAAI;GACvC,GAAG;GACH,YAAY,SAAS;EACtB,IAAI;GACH,GAAG;GACH,SAAS,SAAS,WAAW,CAAC;EAC/B;CACD;CACA,MAAM,SAAS,SAAS,QAAQ,iBAAiB,WAAW,SAAS,WAAW,CAAC,CAAC;CAClF,2BAA2B,QAAQ,cAAc;CACjD,MAAM,UAAU;EACf,QAAQ;GACP,MAAM;GACN;GACA,MAAM,wBAAwB;IAC7B,GAAG,SAAS,YAAY,KAAK,KAAK,EAAE,SAAS,SAAS,QAAQ;IAC9D,GAAG,SAAS,eAAe,KAAK,KAAK,EAAE,YAAY,SAAS,WAAW;IACvE,GAAG,SAAS,UAAU,KAAK,KAAK,EAAE,OAAO,SAAS,MAAM;IACxD;IACA,GAAG,SAAS,SAAS,KAAK,KAAK,EAAE,MAAM,SAAS,KAAK;IACrD,GAAG,SAAS,YAAY,KAAK,KAAK,EAAE,SAAS,SAAS,QAAQ;GAC/D,CAAC;EACF;EACA,OAAO,SAAS;EAChB;EACA,MAAM,SAAS;EACf,SAAS,SAAS;CACnB;CACA,OAAO,SAAS,eAAe,KAAK,IAAI;EACvC,GAAG;EACH,YAAY,SAAS;CACtB,IAAI;EACH,GAAG;EACH,SAAS,SAAS,WAAW,CAAC;CAC/B;AACD"}
1
+ {"version":3,"file":"index-naming-BOcJT1B3-18gQUduD.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/index-naming-BOcJT1B3.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { a as rendersIndexBody } from \"./index-types-pC_5vADQ.mjs\";\nimport { flushAuthoringWarnings } from \"@internal/framework-components/authoring\";\nimport { assertWireNamePrefixLength, computeIndexContentHash, defaultIndexName } from \"@internal/sql-schema-ir/naming\";\n//#region src/index-naming.ts\n/**\n* Narrows the opaque payload a contributed model attribute returns under\n* `index` (see `AuthoringModelAttributeIndexOutput`). The framework hands the\n* value through untyped because an index's shape belongs to the family; this\n* is the SQL family's boundary check. It proves the structure only — the\n* name/map and expression rules stay where `@@index` enforces them, in\n* {@link lowerAuthoredIndex}.\n*/\nfunction isAuthoredIndexInput(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = { ...value };\n\tif (typeof candidate[\"expression\"] === \"string\" === (Array.isArray(candidate[\"columns\"]) && candidate[\"columns\"].every((element) => typeof element === \"string\"))) return false;\n\tif (!isOptionalString(candidate[\"where\"])) return false;\n\tif (!isOptionalString(candidate[\"map\"])) return false;\n\tif (!isOptionalString(candidate[\"name\"])) return false;\n\tif (candidate[\"unique\"] !== void 0 && typeof candidate[\"unique\"] !== \"boolean\") return false;\n\tif (candidate[\"type\"] === void 0) return candidate[\"options\"] === void 0;\n\tif (typeof candidate[\"type\"] !== \"string\") return false;\n\tconst options = candidate[\"options\"];\n\treturn options === void 0 || typeof options === \"object\" && options !== null && !Array.isArray(options);\n}\nfunction isOptionalString(value) {\n\treturn value === void 0 || typeof value === \"string\";\n}\nconst EXACT_NAME_BODY_PREAMBLE = \"Drift detection compares the authored SQL text byte-for-byte against Postgres's reprinted form, which is only reliable when the text was captured by contract infer.\";\n/**\n* Per-subject remediation: an index or check moves to wire naming via\n* `name:`; a policy has no such parameter — dropping `@@map` makes the\n* block's head the wire prefix.\n*/\nconst EXACT_NAME_BODY_REMEDIATION = {\n\tindex: \"For hand-authored definitions, use name: and let Prisma 8 manage the physical name; to migrate an adopted object to wire naming, replace map: with name: (keeping the body text unchanged) and apply the resulting rename migration.\",\n\tpolicy: \"For hand-authored definitions, drop @@map and let the policy block's head name the policy; to migrate an adopted policy to wire naming, remove @@map (keeping the body text unchanged) and apply the resulting rename migration.\",\n\tcheck: \"For hand-authored definitions, use name: and let Prisma 8 manage the physical name; to migrate an adopted check to wire naming, replace map: with name: (keeping the body text unchanged) and apply the resulting rename migration.\"\n};\n/** What the user actually wrote, per subject: index and check `map:`, policy `@@map`. */\nconst EXACT_NAME_FEATURE = {\n\tindex: \"map:\",\n\tpolicy: \"@@map\",\n\tcheck: \"map:\"\n};\nconst EXACT_NAME_BODY_WARNING_CODE = \"PN_EXACT_NAME_BODY_COMPARISON\";\n/**\n* Mints the exact-name body-comparison warning for a `map:`-named object\n* carrying a hand-authorable SQL body — fully formed, so the transport and\n* the flush stay generic. `subject` distinguishes the index, policy, and\n* check callers that mint this same warning; the feature name and the\n* remediation are subject-specific end to end, so a batched summary\n* (grouped on code + summary) is true of every object it covers.\n*/\nfunction exactNameBodyWarning(subject, exactName) {\n\tconst item = `${subject} \"${exactName}\"`;\n\tconst feature = EXACT_NAME_FEATURE[subject];\n\tconst tail = `with a SQL body. ${EXACT_NAME_BODY_PREAMBLE} ${EXACT_NAME_BODY_REMEDIATION[subject]}`;\n\treturn {\n\t\tcode: EXACT_NAME_BODY_WARNING_CODE,\n\t\tmessage: `${item} uses ${feature} ${tail}`,\n\t\titem,\n\t\tsummary: `objects use ${feature} ${tail}`\n\t};\n}\n/**\n* Lowers an authored index into the name-identified entity `contract.json`\n* persists: exact mode adopts `map` verbatim (no prefix, no hash); wire\n* mode appends the content-hash suffix to the authored or default prefix.\n* The cross-field guards are the shared enforcement backstop for both\n* authoring surfaces (PSL pre-empts them with span-anchored diagnostics).\n*/\nfunction lowerAuthoredIndex(tableName, authored, warnings, indexTypes) {\n\tif (authored.columns === void 0 === (authored.expression === void 0)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": an index takes either fields (columns) or an expression — exactly one, not both.`);\n\tif (authored.map !== void 0 && authored.name !== void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index \"${authored.map}\" on table \"${tableName}\": map and name are mutually exclusive — map adopts an exact physical name, name is a wire prefix.`);\n\tif (authored.expression !== void 0 && authored.name === void 0 && authored.map === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": an expression index requires an explicit name (name:) or exact physical name (map:) — a default name cannot be derived from an expression.`);\n\tif (authored.options !== void 0 && authored.type === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Index on table \"${tableName}\": options requires an explicit type — an index with options but no type cannot round-trip through contract infer (the emitted type: would change the wire name).`);\n\tconst unique = authored.unique ?? false;\n\tif (authored.map !== void 0) {\n\t\tconst typeEntry = authored.type === void 0 ? void 0 : indexTypes?.get(authored.type);\n\t\tif (authored.expression !== void 0 || authored.where !== void 0 || typeEntry !== void 0 && rendersIndexBody(typeEntry)) {\n\t\t\tconst warning = exactNameBodyWarning(\"index\", authored.map);\n\t\t\tif (warnings !== void 0) warnings.push(warning);\n\t\t\telse flushAuthoringWarnings([warning]);\n\t\t}\n\t\tconst carried = {\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: authored.map\n\t\t\t},\n\t\t\twhere: authored.where,\n\t\t\tunique,\n\t\t\ttype: authored.type,\n\t\t\toptions: authored.options\n\t\t};\n\t\treturn authored.expression !== void 0 ? {\n\t\t\t...carried,\n\t\t\texpression: authored.expression\n\t\t} : {\n\t\t\t...carried,\n\t\t\tcolumns: authored.columns ?? []\n\t\t};\n\t}\n\tconst prefix = authored.name ?? defaultIndexName(tableName, authored.columns ?? []);\n\tassertWireNamePrefixLength(prefix, \"index prefix\");\n\tconst carried = {\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix,\n\t\t\thash: computeIndexContentHash({\n\t\t\t\t...authored.columns !== void 0 && { columns: authored.columns },\n\t\t\t\t...authored.expression !== void 0 && { expression: authored.expression },\n\t\t\t\t...authored.where !== void 0 && { where: authored.where },\n\t\t\t\tunique,\n\t\t\t\t...authored.type !== void 0 && { type: authored.type },\n\t\t\t\t...authored.options !== void 0 && { options: authored.options }\n\t\t\t})\n\t\t},\n\t\twhere: authored.where,\n\t\tunique,\n\t\ttype: authored.type,\n\t\toptions: authored.options\n\t};\n\treturn authored.expression !== void 0 ? {\n\t\t...carried,\n\t\texpression: authored.expression\n\t} : {\n\t\t...carried,\n\t\tcolumns: authored.columns ?? []\n\t};\n}\n//#endregion\nexport { isAuthoredIndexInput as n, lowerAuthoredIndex as r, exactNameBodyWarning as t };\n\n//# sourceMappingURL=index-naming-BOcJT1B3.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,qBAAqB,OAAO;CACpC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY,EAAE,GAAG,MAAM;CAC7B,IAAI,OAAO,UAAU,kBAAkB,cAAc,MAAM,QAAQ,UAAU,UAAU,KAAK,UAAU,UAAU,CAAC,OAAO,YAAY,OAAO,YAAY,QAAQ,IAAI,OAAO;CAC1K,IAAI,CAAC,iBAAiB,UAAU,QAAQ,GAAG,OAAO;CAClD,IAAI,CAAC,iBAAiB,UAAU,MAAM,GAAG,OAAO;CAChD,IAAI,CAAC,iBAAiB,UAAU,OAAO,GAAG,OAAO;CACjD,IAAI,UAAU,cAAc,KAAK,KAAK,OAAO,UAAU,cAAc,WAAW,OAAO;CACvF,IAAI,UAAU,YAAY,KAAK,GAAG,OAAO,UAAU,eAAe,KAAK;CACvE,IAAI,OAAO,UAAU,YAAY,UAAU,OAAO;CAClD,MAAM,UAAU,UAAU;CAC1B,OAAO,YAAY,KAAK,KAAK,OAAO,YAAY,YAAY,YAAY,QAAQ,CAAC,MAAM,QAAQ,OAAO;AACvG;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,UAAU,KAAK,KAAK,OAAO,UAAU;AAC7C;AACA,MAAM,2BAA2B;;;;;;AAMjC,MAAM,8BAA8B;CACnC,OAAO;CACP,QAAQ;CACR,OAAO;AACR;;AAEA,MAAM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;EACA,MAAM,UAAU;GACf,QAAQ;IACP,MAAM;IACN,MAAM,SAAS;GAChB;GACA,OAAO,SAAS;GAChB;GACA,MAAM,SAAS;GACf,SAAS,SAAS;EACnB;EACA,OAAO,SAAS,eAAe,KAAK,IAAI;GACvC,GAAG;GACH,YAAY,SAAS;EACtB,IAAI;GACH,GAAG;GACH,SAAS,SAAS,WAAW,CAAC;EAC/B;CACD;CACA,MAAM,SAAS,SAAS,QAAQ,iBAAiB,WAAW,SAAS,WAAW,CAAC,CAAC;CAClF,2BAA2B,QAAQ,cAAc;CACjD,MAAM,UAAU;EACf,QAAQ;GACP,MAAM;GACN;GACA,MAAM,wBAAwB;IAC7B,GAAG,SAAS,YAAY,KAAK,KAAK,EAAE,SAAS,SAAS,QAAQ;IAC9D,GAAG,SAAS,eAAe,KAAK,KAAK,EAAE,YAAY,SAAS,WAAW;IACvE,GAAG,SAAS,UAAU,KAAK,KAAK,EAAE,OAAO,SAAS,MAAM;IACxD;IACA,GAAG,SAAS,SAAS,KAAK,KAAK,EAAE,MAAM,SAAS,KAAK;IACrD,GAAG,SAAS,YAAY,KAAK,KAAK,EAAE,SAAS,SAAS,QAAQ;GAC/D,CAAC;EACF;EACA,OAAO,SAAS;EAChB;EACA,MAAM,SAAS;EACf,SAAS,SAAS;CACnB;CACA,OAAO,SAAS,eAAe,KAAK,IAAI;EACvC,GAAG;EACH,YAAY,SAAS;CACtB,IAAI;EACH,GAAG;EACH,SAAS,SAAS,WAAW,CAAC;CAC/B;AACD"}
@@ -0,0 +1 @@
1
+ import "./index-reference-DJaQLZA3-DxmYkkX-.mjs";
@@ -1,7 +1,7 @@
1
1
  import { t as Index } from "./sql-index-ByAAE7K8-BpbPBWPD.mjs";
2
2
  import "./types-DMfBh16_.mjs";
3
- import { S as StorageColumnScopeField, o as Expression, x as ScopeField } from "./expression-Ck1wys3N-Cdc7eUQS.mjs";
4
- //#region ../../../2-sql/4-lanes/relational-core/dist/index-reference-DJX-CNsb.d.mts
3
+ import { S as StorageColumnScopeField, o as Expression, x as ScopeField } from "./expression-BzrfOiPC-3NqR8UzK.mjs";
4
+ //#region ../../../2-sql/4-lanes/relational-core/dist/index-reference-DJaQLZA3.d.mts
5
5
  //#region src/index-reference.d.ts
6
6
  /**
7
7
  * An index of a table as a query reads it: its columns, bound to the table's alias, its type and its options. A query operation that searches what an index covers, such as Postgres's `fullTextMatches`, takes it in place of the columns and settings the index was built with.
@@ -64,4 +64,4 @@ declare function uniqueIndexNamesOfType(indexes: ReadonlyArray<NamedIndex>, type
64
64
  declare function createIndexReferences(input: IndexReferencesInput): Readonly<Record<string, IndexReference>>;
65
65
  //#endregion
66
66
  export { createIndexReferences as a, UniqueIndexNamesOfType as i, IndexReferencesInput as n, uniqueIndexNamesOfType as o, TableIndexReferences as r, IndexReference as t };
67
- //# sourceMappingURL=index-reference-DJX-CNsb-D5uoBnH_.d.mts.map
67
+ //# sourceMappingURL=index-reference-DJaQLZA3-DxmYkkX-.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-reference-DJX-CNsb-D5uoBnH_.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/index-reference-DJX-CNsb.d.mts"],"mappings":";;;;;;;;UAMU,eAAe,gBAAgB,SAAS,eAAe,WAAW,gBAAgB,SAAS,eAAe,WAAW,eAAe,sDAAsD,gBAAgB,SAAS,uCAAuC,SAAS;;WAElQ,SAAS;WACT,MAAM;WACN,SAAS;;;KAGf,kBAAkB,KAAK;WACjB,cAAc;IACrB,SAAS;WACF,YAAY;IACnB;KACC,uBAAuB,SAAS,KAAK;WAC/B,eAAe;gBACV,UAAU,uBAAuB,qBAAqB,UAAU,QAAQ;WAC7E;WACA;IACP,WAAW,wBAAwB,QAAQ,+BAA+B;KACzE,YAAY,KAAK;WACX,YAAY;IACnB;KACC,eAAe,KAAK;WACd,eAAe,gBAAgB;IACtC;;KAEC,aAAa,GAAG,OAAO,oBAAoB,kBAAkB,WAAW,MAAM;KAC9E,QAAQ,GA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,QAAQ;WAC/E,MAAM;mBACE,QAAQ,aAAa,GAAG,gBAAgB,OAAO,kBAAkB,QAAQ;WACjF,MAAM;;;;;KAKZ,qBAAqB,SAAS;WACxB,yBAAyB;WACzB,eAAe;gBACV,OAAO,kBAAkB,mBAAmB,QAAQ,aAAa,GAAG,gBAAgB,MAAM,eAAe,uBAAuB,SAAS,aAAa,GAAG,OAAO,YAAY,aAAa,GAAG,OAAO,eAAe,aAAa,GAAG;UACxO;WACC;WACA;WACA;aACE,SAAS,cAAc,KAAK;;;WAG9B,SAAS,uBAAuB,WAAW;;KAEjD,aAAa,KAAK;;iBAEN,uBAAuB,SAAS,cAAc,aAAa;;;;iBAI3D,sBAAsB,OAAO,uBAAuB,SAAS,eAAe"}
@@ -1,12 +1,12 @@
1
- import { n as isAuthoredIndexInput } from "./index-naming-BOcJT1B3-CeEoP8t3.mjs";
1
+ import { n as isAuthoredIndexInput } from "./index-naming-BOcJT1B3-18gQUduD.mjs";
2
2
  import { n as providesPslEntityPlacement } from "./entity-handle-lowering-hook-B3atrRKX.mjs";
3
- import "./foreign-key-materialization-DibQ9Hjg.mjs";
4
- import { m as sqlTextFromCanonical } from "./sql-expression-DSRILiU2.mjs";
5
- import { d as resolvedTypeParams, t as CODEC_INSTANCE_KIND } from "./types-GS3fwvoX.mjs";
3
+ import "./foreign-key-materialization-DfNPQL9G.mjs";
4
+ import { p as sqlTextFromStored } from "./sql-expression-BJCuy-WI.mjs";
5
+ import { d as resolvedTypeParams, t as CODEC_INSTANCE_KIND } from "./types-M_FeBD9w.mjs";
6
6
  import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
7
- import { n as buildSqlContractFromDefinition } from "./derived-checks-Cgx_VgS3-CmFqNFgU.mjs";
7
+ import { n as buildSqlContractFromDefinition } from "./derived-checks-CrvMQTJF-DlxFFtNM.mjs";
8
8
  import { i as mapFieldNamesToColumns, n as getAttribute, o as storageName, r as getNamedArgument, t as formatDbAttributeMigrationMessage } from "./psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs";
9
- import { _ as resolveFieldTypeDescriptor, d as interpretModelAttribute, f as modelAttributeSpecsFrom, g as readWrittenNumberForCodec, i as contractError, l as instantiatePslTypeConstructor, m as modelSpecContext, n as bareTypeConstructorOf, o as fieldSpecContext, p as modelCoordinateKey, r as collectResolvedFields, s as getAuthoringEntity, t as PSL_CHECK_ON_STI_VARIANT, u as interpretFieldAttribute, v as sqlAttributeSpecs, y as toNamedTypeFieldDescriptor } from "./psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs";
9
+ import { _ as resolveFieldTypeDescriptor, d as interpretModelAttribute, f as modelAttributeSpecsFrom, g as readWrittenNumberForCodec, i as contractError, l as instantiatePslTypeConstructor, m as modelSpecContext, n as bareTypeConstructorOf, o as fieldSpecContext, p as modelCoordinateKey, r as collectResolvedFields, s as getAuthoringEntity, t as PSL_CHECK_ON_STI_VARIANT, u as interpretFieldAttribute, v as sqlAttributeSpecs, y as toNamedTypeFieldDescriptor } from "./psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs";
10
10
  import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
11
11
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
12
12
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -21,7 +21,7 @@ import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions
21
21
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
22
22
  import { contributedTypeOf, createPslDiagnosticCollector, diagnosticSource, findBlockDescriptor, interpretExtensionBlocks, nodePslSpan, typeReferenceNode } from "@prisma/orm-framework/psl-parser";
23
23
  import { claimedBlockKeywords, enumMemberAttributeDiagnostics, fkRelationPairKey, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
24
- //#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-CvmBTYyI.mjs
24
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-CFj2aTEP.mjs
25
25
  function baseColumnDescriptor(resolution, enumTypeDescriptors) {
26
26
  if (resolution?.kind === "block") return enumTypeDescriptors.get(resolution.symbol);
27
27
  const scalar = bareTypeConstructorOf(resolution);
@@ -701,6 +701,7 @@ function buildModelNodeFromPsl(input) {
701
701
  symbolTable: input.symbolTable,
702
702
  enumTypeDescriptors: input.enumTypeDescriptors,
703
703
  namedTypeDescriptors: input.namedTypeDescriptors,
704
+ namedTypes: input.namedTypes,
704
705
  valueObjectTypes: input.valueObjectTypes,
705
706
  authoringContributions: input.authoringContributions,
706
707
  targetId: input.targetId,
@@ -943,8 +944,8 @@ function buildModelNodeFromPsl(input) {
943
944
  }
944
945
  indexNodes.push(blindCast({
945
946
  ...ifDefined("columns", columnNames),
946
- ...ifDefined("expression", parsed.expression === void 0 ? void 0 : sqlTextFromCanonical(parsed.expression.value)),
947
- where: parsed.where === void 0 ? void 0 : sqlTextFromCanonical(parsed.where.value),
947
+ ...ifDefined("expression", parsed.expression === void 0 ? void 0 : sqlTextFromStored(parsed.expression.value.value)),
948
+ where: parsed.where === void 0 ? void 0 : sqlTextFromStored(parsed.where.value.value),
948
949
  unique: parsed.unique,
949
950
  name: parsed.name,
950
951
  map: parsed.map,
@@ -974,7 +975,7 @@ function buildModelNodeFromPsl(input) {
974
975
  });
975
976
  if (parsed === void 0) continue;
976
977
  checkNodes.push({
977
- expression: sqlTextFromCanonical(parsed.expression.value),
978
+ expression: sqlTextFromStored(parsed.expression.value.value),
978
979
  name: parsed.name,
979
980
  map: parsed.map
980
981
  });
@@ -1987,6 +1988,7 @@ function interpretPslDocumentToSqlContract(input) {
1987
1988
  valueObjectTypes,
1988
1989
  enumTypeDescriptors: allEnumTypeDescriptors,
1989
1990
  namedTypeDescriptors: namedTypeResult.namedTypeDescriptors,
1991
+ namedTypes: namedTypeResult.storageTypes,
1990
1992
  composedExtensionContracts,
1991
1993
  familyId: input.target.familyId,
1992
1994
  targetId: input.target.targetId,
@@ -2172,4 +2174,4 @@ function interpretPslDocumentToSqlContract(input) {
2172
2174
  //#endregion
2173
2175
  export { normalizeReferentialAction as a, interpretPslDocumentToSqlContract as i, buildEntityTypesByDiscriminator as n, indexFkRelations as r, applyBackrelationCandidates as t };
2174
2176
 
2175
- //# sourceMappingURL=interpreter-CvmBTYyI-DNl-jr2E.mjs.map
2177
+ //# sourceMappingURL=interpreter-CFj2aTEP-BHL3TOqk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpreter-CFj2aTEP-BHL3TOqk.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/interpreter-CFj2aTEP.mjs"],"sourcesContent":["import { i as mapFieldNamesToColumns, n as getAttribute, o as storageName, r as getNamedArgument, t as formatDbAttributeMigrationMessage } from \"./psl-attribute-parsing-BCsFWsSp.mjs\";\nimport { a as getAuthoringEntity, c as resolveFieldTypeDescriptor, d as fieldSpecContext, f as interpretFieldAttribute, g as sqlAttributeSpecs, h as modelSpecContext, i as bareTypeConstructorOf, l as toNamedTypeFieldDescriptor, m as modelAttributeSpecsFrom, p as interpretModelAttribute, r as modelCoordinateKey, s as instantiatePslTypeConstructor, t as collectResolvedFields, u as PSL_CHECK_ON_STI_VARIANT, v as readWrittenNumberForCodec, y as contractError } from \"./psl-field-resolution-o9sXqIlE.mjs\";\nimport { t as defaultTableName } from \"./default-table-name-BfFY8qYR.mjs\";\nimport { contributedTypeOf, createPslDiagnosticCollector, diagnosticSource, findBlockDescriptor, interpretExtensionBlocks, nodePslSpan, typeReferenceNode } from \"@internal/psl-parser\";\nimport { CODEC_INSTANCE_KIND, resolvedTypeParams } from \"@internal/sql-contract/types\";\nimport { buildSqlContractFromDefinition } from \"@internal/sql-contract-ts/contract-builder\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { instantiateAuthoringEntityType, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringModelAttributeDescriptor } from \"@internal/framework-components/authoring\";\nimport { claimedBlockKeywords, enumMemberAttributeDiagnostics, fkRelationPairKey, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic } from \"@internal/psl-parser/interpret\";\nimport { sqlTextFromStored } from \"@internal/sql-contract/sql-expression\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { NamespaceDeclarationAst } from \"@internal/psl-parser/syntax\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { crossRef } from \"@internal/contract/types\";\nimport { resolveToOneRelationNullable } from \"@internal/contract-authoring\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { providesPslEntityPlacement } from \"@internal/sql-contract/entity-handle-lowering-hook\";\nimport { FOREIGN_KEY_INDEX_UNRESOLVED } from \"@internal/sql-contract/foreign-key-materialization\";\nimport { isAuthoredIndexInput } from \"@internal/sql-contract/index-naming\";\nimport { deriveValueSetFromEntity } from \"@internal/sql-contract/value-set-derivation-hook\";\n//#region src/psl-named-type-resolution.ts\nfunction baseColumnDescriptor(resolution, enumTypeDescriptors) {\n\tif (resolution?.kind === \"block\") return enumTypeDescriptors.get(resolution.symbol);\n\tconst scalar = bareTypeConstructorOf(resolution);\n\treturn scalar === void 0 ? void 0 : instantiateAuthoringTypeConstructor(scalar, []);\n}\nfunction validateNamedTypeAttributes(input) {\n\tlet hasUnsupportedNamedTypeAttribute = false;\n\tfor (const attribute of input.declaration.attributes) {\n\t\tif (attribute.name.startsWith(\"db.\")) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_ATTRIBUTE\",\n\t\t\t\tmessage: formatDbAttributeMigrationMessage(attribute),\n\t\t\t\t...input.source.at(attribute.span)\n\t\t\t});\n\t\t\thasUnsupportedNamedTypeAttribute = true;\n\t\t\tcontinue;\n\t\t}\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_ATTRIBUTE\",\n\t\t\tmessage: `Named type \"${input.declaration.name}\" uses unsupported attribute \"${attribute.name}\"`,\n\t\t\t...input.source.at(attribute.span)\n\t\t});\n\t\thasUnsupportedNamedTypeAttribute = true;\n\t}\n\treturn hasUnsupportedNamedTypeAttribute;\n}\nfunction resolveNamedTypeDeclarations(input) {\n\tconst storageTypeEntries = [];\n\tconst namedTypeDescriptors = /* @__PURE__ */ new Map();\n\tconst storageTypeOf = (descriptor) => ({\n\t\tkind: CODEC_INSTANCE_KIND,\n\t\tcodecId: descriptor.codecId,\n\t\ttypeParams: descriptor.typeParams ?? {}\n\t});\n\tfor (const declaration of input.declarations) {\n\t\tconst source = diagnosticSource(input.source.sources, declaration.node.syntax);\n\t\tconst reference = typeReferenceNode(declaration);\n\t\tconst resolution = reference === void 0 ? void 0 : input.binder.symbolForNode(reference);\n\t\tif (declaration.isConstructor) {\n\t\t\tconst typeConstructor = declaration.typeConstructor;\n\t\t\tif (typeConstructor === void 0) {\n\t\t\t\tinput.diagnostics.push({\n\t\t\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_BASE\",\n\t\t\t\t\tmessage: `Named type \"${declaration.name}\" must declare a base type or constructor`,\n\t\t\t\t\t...source.at(declaration.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (validateNamedTypeAttributes({\n\t\t\t\tdeclaration,\n\t\t\t\tsource,\n\t\t\t\tdiagnostics: input.diagnostics\n\t\t\t})) continue;\n\t\t\tconst descriptor = resolution?.kind === \"contributedType\" && resolution.symbol.descriptor.kind === \"typeConstructor\" ? resolution.symbol.descriptor : void 0;\n\t\t\tif (!descriptor) {\n\t\t\t\tinput.diagnostics.push({\n\t\t\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_CONSTRUCTOR\",\n\t\t\t\t\tmessage: `Named type \"${declaration.name}\" references unsupported constructor \"${typeConstructor.path.join(\".\")}\"`,\n\t\t\t\t\t...source.at(typeConstructor.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst storageType = instantiatePslTypeConstructor({\n\t\t\t\tcall: typeConstructor,\n\t\t\t\tdescriptor,\n\t\t\t\tcodecLookup: input.codecLookup,\n\t\t\t\tdiagnostics: input.diagnostics,\n\t\t\t\tsource,\n\t\t\t\tentityLabel: `Named type \"${declaration.name}\"`\n\t\t\t});\n\t\t\tif (!storageType) continue;\n\t\t\tnamedTypeDescriptors.set(declaration, toNamedTypeFieldDescriptor(declaration.name, storageType));\n\t\t\tstorageTypeEntries.push([declaration.name, storageTypeOf(storageType)]);\n\t\t\tcontinue;\n\t\t}\n\t\tconst baseType = declaration.baseType;\n\t\tif (baseType === void 0) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_BASE\",\n\t\t\t\tmessage: `Named type \"${declaration.name}\" must declare a base type or constructor`,\n\t\t\t\t...source.at(declaration.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst baseDescriptor = baseColumnDescriptor(resolution, input.enumTypeDescriptors);\n\t\tif (!baseDescriptor) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_NAMED_TYPE_BASE\",\n\t\t\t\tmessage: `Named type \"${declaration.name}\" references unsupported base type \"${baseType}\"`,\n\t\t\t\t...source.at(declaration.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (validateNamedTypeAttributes({\n\t\t\tdeclaration,\n\t\t\tsource,\n\t\t\tdiagnostics: input.diagnostics\n\t\t})) continue;\n\t\tconst descriptor = toNamedTypeFieldDescriptor(declaration.name, baseDescriptor);\n\t\tnamedTypeDescriptors.set(declaration, descriptor);\n\t\tstorageTypeEntries.push([declaration.name, storageTypeOf(baseDescriptor)]);\n\t}\n\treturn {\n\t\tstorageTypes: Object.fromEntries(storageTypeEntries),\n\t\tnamedTypeDescriptors\n\t};\n}\n//#endregion\n//#region src/psl-relation-resolution.ts\nconst REFERENTIAL_ACTION_MAP = {\n\tNoAction: \"noAction\",\n\tRestrict: \"restrict\",\n\tCascade: \"cascade\",\n\tSetNull: \"setNull\",\n\tSetDefault: \"setDefault\",\n\tnoAction: \"noAction\",\n\trestrict: \"restrict\",\n\tcascade: \"cascade\",\n\tsetNull: \"setNull\",\n\tsetDefault: \"setDefault\"\n};\nfunction modelName(key) {\n\treturn typeof key === \"string\" ? key : key.name;\n}\nfunction normalizeReferentialAction(actionToken) {\n\treturn REFERENTIAL_ACTION_MAP[actionToken];\n}\nfunction interpretRelationAttribute(input) {\n\tconst node = getAttribute(input.field.attributes, \"relation\")?.node;\n\tif (node === void 0) return void 0;\n\treturn interpretFieldAttribute({\n\t\tsymbols: input.symbols,\n\t\tnode,\n\t\tspec: sqlAttributeSpecs.field.relation(input.specContext),\n\t\tmodel: input.selfModel,\n\t\tfield: input.field,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tdiagnostics: input.diagnostics\n\t});\n}\nfunction indexFkRelations(input) {\n\tconst modelRelations = /* @__PURE__ */ new Map();\n\tconst fkRelationsByPair = /* @__PURE__ */ new Map();\n\tconst fkRelationsByDeclaringModel = /* @__PURE__ */ new Map();\n\tfor (const relation of input.fkRelationMetadata) {\n\t\tconst declaringFkRelations = fkRelationsByDeclaringModel.get(relation.declaringModelName);\n\t\tif (declaringFkRelations) declaringFkRelations.push(relation);\n\t\telse fkRelationsByDeclaringModel.set(relation.declaringModelName, [relation]);\n\t\tconst existing = modelRelations.get(relation.declaringModelName);\n\t\tconst current = existing ?? [];\n\t\tif (!existing) modelRelations.set(relation.declaringModelName, current);\n\t\tcurrent.push({\n\t\t\tfieldName: relation.declaringFieldName,\n\t\t\ttoModel: modelName(relation.targetModelName),\n\t\t\ttoTable: relation.targetTableName,\n\t\t\t...ifDefined(\"toNamespaceId\", relation.targetNamespaceId),\n\t\t\tcardinality: \"N:1\",\n\t\t\tnullable: relation.nullable,\n\t\t\ton: {\n\t\t\t\tparentTable: relation.declaringTableName,\n\t\t\t\tparentColumns: relation.localColumns,\n\t\t\t\tchildTable: relation.targetTableName,\n\t\t\t\tchildColumns: relation.referencedColumns\n\t\t\t}\n\t\t});\n\t\tlet targets = fkRelationsByPair.get(relation.declaringModelName);\n\t\tif (!targets) {\n\t\t\ttargets = /* @__PURE__ */ new Map();\n\t\t\tfkRelationsByPair.set(relation.declaringModelName, targets);\n\t\t}\n\t\tconst pairRelations = targets.get(relation.targetModelName);\n\t\tif (pairRelations) pairRelations.push(relation);\n\t\telse targets.set(relation.targetModelName, [relation]);\n\t}\n\treturn {\n\t\tmodelRelations,\n\t\tfkRelationsByPair,\n\t\tfkRelationsByDeclaringModel\n\t};\n}\nfunction idColumnsAreExactlyFkPair(idColumns, parentColumns, childColumns) {\n\tif (idColumns.length !== parentColumns.length + childColumns.length) return false;\n\tconst fkColumns = /* @__PURE__ */ new Set([...parentColumns, ...childColumns]);\n\tif (fkColumns.size !== parentColumns.length + childColumns.length) return false;\n\treturn idColumns.every((column) => fkColumns.has(column));\n}\n/**\n* Reorders the child FK's junction columns into the target model's id-column\n* order. Returns undefined unless the FK references exactly the target's full\n* id, because downstream consumers pair `through.childColumns` positionally\n* against the target id columns — an FK referencing anything else (a non-id\n* unique, a partial id) would produce a silently wrong join.\n*/\nfunction childColumnsInTargetIdOrder(childFk, targetIdColumns) {\n\tif (childFk.referencedColumns.length !== targetIdColumns.length) return;\n\tconst localByReferenced = /* @__PURE__ */ new Map();\n\tfor (const [index, referencedColumn] of childFk.referencedColumns.entries()) {\n\t\tconst localColumn = childFk.localColumns[index];\n\t\tif (localColumn === void 0) return;\n\t\tlocalByReferenced.set(referencedColumn, localColumn);\n\t}\n\tif (localByReferenced.size !== targetIdColumns.length) return;\n\tconst ordered = [];\n\tfor (const idColumn of targetIdColumns) {\n\t\tconst localColumn = localByReferenced.get(idColumn);\n\t\tif (localColumn === void 0) return;\n\t\tordered.push(localColumn);\n\t}\n\treturn ordered;\n}\n/**\n* Finds explicit junction models that connect a bare backrelation list field\n* to its target model: a model whose composite id columns are exactly the FK\n* columns of one relation back to the candidate's model (the parent side) and\n* one relation to the candidate's target model (the child side). The child\n* FK must reference exactly the target model's id columns; its junction\n* columns are carried in target-id order on the pair. A relation name on the\n* list field pins the parent-side FK relation, which is how self-referential\n* many-to-many sides are disambiguated.\n*\n* Alongside the recognised pairs, returns junction-shaped near-misses (models\n* that link both sides but were declined) so the caller can emit a\n* junction-specific diagnostic instead of the generic orphaned-list message.\n*/\nfunction findJunctionFkPairs(input) {\n\tconst targetIdColumns = input.modelIdColumns.get(input.candidate.targetModelName);\n\tif (!targetIdColumns || targetIdColumns.length === 0) return {\n\t\tpairs: [],\n\t\tnearMisses: []\n\t};\n\tconst pairs = [];\n\tconst nearMisses = [];\n\tfor (const [junctionModelName, junctionFks] of input.fkRelationsByDeclaringModel) {\n\t\tconst idColumns = input.modelIdColumns.get(junctionModelName);\n\t\tfor (const parentFk of junctionFks) {\n\t\t\tif (parentFk.targetModelName !== input.candidate.modelName) continue;\n\t\t\tif (input.candidate.relationName !== void 0 && parentFk.relationName !== input.candidate.relationName) continue;\n\t\t\tfor (const childFk of junctionFks) {\n\t\t\t\tif (childFk === parentFk || childFk.targetModelName !== input.candidate.targetModelName) continue;\n\t\t\t\tif (!idColumns || !idColumnsAreExactlyFkPair(idColumns, parentFk.localColumns, childFk.localColumns)) {\n\t\t\t\t\tnearMisses.push({\n\t\t\t\t\t\tjunctionModelName: modelName(junctionModelName),\n\t\t\t\t\t\treason: \"id-not-fk-covering\"\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst orderedChildColumns = childColumnsInTargetIdOrder(childFk, targetIdColumns);\n\t\t\t\tif (!orderedChildColumns) {\n\t\t\t\t\tnearMisses.push({\n\t\t\t\t\t\tjunctionModelName: modelName(junctionModelName),\n\t\t\t\t\t\treason: \"target-fk-not-id\"\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tpairs.push({\n\t\t\t\t\tparentFk,\n\t\t\t\t\tchildFk,\n\t\t\t\t\tchildColumnsInTargetIdOrder: orderedChildColumns\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tpairs,\n\t\tnearMisses\n\t};\n}\nfunction junctionNearMissDiagnostic(candidate, nearMiss, sources) {\n\tconst source = diagnosticSource(sources, candidate.field.node.syntax);\n\tconst listField = `${modelName(candidate.modelName)}.${candidate.field.name}`;\n\tconst targetModelName = modelName(candidate.targetModelName);\n\tconst data = {\n\t\tlistField,\n\t\tjunctionModel: nearMiss.junctionModelName,\n\t\ttargetModel: targetModelName\n\t};\n\tif (nearMiss.reason === \"target-fk-not-id\") return {\n\t\tcode: \"PSL_JUNCTION_TARGET_FK_NOT_ID\",\n\t\tmessage: `Backrelation list field \"${listField}\" found junction model \"${nearMiss.junctionModelName}\", but its foreign key to \"${targetModelName}\" does not reference \"${targetModelName}\"'s @id. The junction's target-side foreign key must reference \"${targetModelName}\"'s full @id columns for many-to-many recognition.`,\n\t\t...source.at(candidate.field.span),\n\t\tdata\n\t};\n\treturn {\n\t\tcode: \"PSL_JUNCTION_ID_NOT_FK_COVERING\",\n\t\tmessage: `Backrelation list field \"${listField}\" found junction-shaped model \"${nearMiss.junctionModelName}\" linking \"${modelName(candidate.modelName)}\" and \"${targetModelName}\", but its id does not cover exactly its foreign-key columns. Declare @@id([...]) on \"${nearMiss.junctionModelName}\" listing exactly the two foreign-key columns for many-to-many recognition.`,\n\t\t...source.at(candidate.field.span),\n\t\tdata\n\t};\n}\nfunction manyToManyRelationNode(candidate, pair) {\n\treturn {\n\t\tfieldName: candidate.field.name,\n\t\ttoModel: modelName(pair.childFk.targetModelName),\n\t\ttoTable: pair.childFk.targetTableName,\n\t\t...ifDefined(\"toNamespaceId\", pair.childFk.targetNamespaceId),\n\t\tcardinality: \"N:M\",\n\t\ton: {\n\t\t\tparentTable: candidate.tableName,\n\t\t\tparentColumns: pair.parentFk.referencedColumns,\n\t\t\tchildTable: pair.parentFk.declaringTableName,\n\t\t\tchildColumns: pair.parentFk.localColumns\n\t\t},\n\t\tthrough: {\n\t\t\ttable: pair.parentFk.declaringTableName,\n\t\t\t...ifDefined(\"namespaceId\", pair.parentFk.declaringNamespaceId),\n\t\t\tparentColumns: pair.parentFk.localColumns,\n\t\t\tchildColumns: pair.childColumnsInTargetIdOrder\n\t\t}\n\t};\n}\nfunction relationsForModel(modelRelations, modelName) {\n\tconst existing = modelRelations.get(modelName);\n\tif (existing) return existing;\n\tconst created = [];\n\tmodelRelations.set(modelName, created);\n\treturn created;\n}\n/**\n* A set of columns is unique when it exactly matches one of the model's unique\n* column sets — its primary key, any single- or multi-column `@unique` /\n* `@@unique` constraint, or a unique index over plain columns with no `where`\n* clause. Set equality (not subset) is required: a singular back-relation means\n* at most one child per parent, which a unique constraint covering exactly the\n* FK columns guarantees.\n*/\nfunction fkColumnsAreUnique(localColumns, uniqueColumnSets) {\n\tconst local = new Set(localColumns);\n\treturn uniqueColumnSets.some((columns) => columns.length === local.size && columns.every((column) => local.has(column)));\n}\nfunction applyBackrelationCandidates(input) {\n\tfor (const candidate of input.backrelationCandidates) {\n\t\tconst source = diagnosticSource(input.sources, candidate.field.node.syntax);\n\t\tconst pairMatches = input.fkRelationsByPair.get(candidate.targetModelName)?.get(candidate.modelName) ?? [];\n\t\tconst matches = candidate.relationName ? pairMatches.filter((relation) => relation.relationName === candidate.relationName) : [...pairMatches];\n\t\tif (matches.length === 0) {\n\t\t\tconst invalidIndex = input.invalidFkPairings.findIndex((pairing) => {\n\t\t\t\tif (pairing.relationName !== candidate.relationName) return false;\n\t\t\t\tif (\"pairKey\" in pairing) return typeof candidate.targetModelName === \"string\" && typeof candidate.modelName === \"string\" && pairing.pairKey === fkRelationPairKey(candidate.targetModelName, candidate.modelName);\n\t\t\t\treturn pairing.declaringModel === candidate.targetModelName && pairing.targetModel === candidate.modelName;\n\t\t\t});\n\t\t\tif (invalidIndex !== -1) {\n\t\t\t\tinput.invalidFkPairings.splice(invalidIndex, 1);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (candidate.isList) {\n\t\t\t\tconst { pairs: junctionPairs, nearMisses } = findJunctionFkPairs({\n\t\t\t\t\tcandidate,\n\t\t\t\t\tfkRelationsByDeclaringModel: input.fkRelationsByDeclaringModel,\n\t\t\t\t\tmodelIdColumns: input.modelIdColumns\n\t\t\t\t});\n\t\t\t\tconst junctionPair = junctionPairs[0];\n\t\t\t\tif (junctionPairs.length === 1 && junctionPair) {\n\t\t\t\t\trelationsForModel(input.modelRelations, candidate.modelName).push(manyToManyRelationNode(candidate, junctionPair));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (junctionPairs.length > 1) {\n\t\t\t\t\tinput.diagnostics.push({\n\t\t\t\t\t\tcode: \"PSL_AMBIGUOUS_BACKRELATION\",\n\t\t\t\t\t\tmessage: `Backrelation list field \"${modelName(candidate.modelName)}.${candidate.field.name}\" matches multiple junction FK pairs for a many-to-many relation. Add @relation(name: \"...\") (or @relation(\"...\")) to the list field and the junction FK-side relation pointing back at \"${modelName(candidate.modelName)}\" to disambiguate.`,\n\t\t\t\t\t\t...source.at(candidate.field.span)\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst nearMiss = nearMisses[0];\n\t\t\t\tif (nearMiss) {\n\t\t\t\t\tinput.diagnostics.push(junctionNearMissDiagnostic(candidate, nearMiss, input.sources));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_ORPHANED_BACKRELATION\",\n\t\t\t\tmessage: `Backrelation field \"${modelName(candidate.modelName)}.${candidate.field.name}\" has no matching FK-side relation on model \"${modelName(candidate.targetModelName)}\". Add @relation(fields: [...], references: [...]) on the FK-side relation${candidate.isList ? \" or use an explicit join model for many-to-many\" : \"\"}.`,\n\t\t\t\t...source.at(candidate.field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (matches.length > 1) {\n\t\t\tinput.diagnostics.push({\n\t\t\t\tcode: \"PSL_AMBIGUOUS_BACKRELATION\",\n\t\t\t\tmessage: `Backrelation field \"${modelName(candidate.modelName)}.${candidate.field.name}\" matches multiple FK-side relations on model \"${modelName(candidate.targetModelName)}\". Add @relation(name: \"...\") (or @relation(\"...\")) to both sides to disambiguate.`,\n\t\t\t\t...source.at(candidate.field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tinvariant(matches.length === 1, \"Backrelation matching requires exactly one match\");\n\t\tconst matched = matches[0];\n\t\tassertDefined(matched, \"Backrelation matching requires a defined relation match\");\n\t\tif (!candidate.isList) {\n\t\t\tconst uniqueColumnSets = input.modelUniqueColumnSets.get(matched.declaringModelName) ?? [];\n\t\t\tif (!fkColumnsAreUnique(matched.localColumns, uniqueColumnSets)) {\n\t\t\t\tinput.diagnostics.push({\n\t\t\t\t\tcode: \"PSL_NON_UNIQUE_BACKRELATION\",\n\t\t\t\t\tmessage: `Backrelation field \"${modelName(candidate.modelName)}.${candidate.field.name}\" is singular, but the matching FK on \"${modelName(matched.declaringModelName)}\" (fields ${matched.localColumns.map((column) => `\"${column}\"`).join(\", \")}) is not unique. A singular back-relation implies at most one related row; add @unique (or @@unique([...])) to the FK fields, or make \"${candidate.field.name}\" a list.`,\n\t\t\t\t\t...source.at(candidate.field.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (!candidate.isList && !candidate.field.optional) input.diagnostics.push(requiredOneToOneBackrelationDiagnostic({\n\t\t\tmodelName: modelName(candidate.modelName),\n\t\t\tfield: candidate.field,\n\t\t\ttargetModelName: modelName(candidate.targetModelName),\n\t\t\tsources: input.sources,\n\t\t\trecordNoun: \"row\"\n\t\t}));\n\t\trelationsForModel(input.modelRelations, candidate.modelName).push({\n\t\t\tfieldName: candidate.field.name,\n\t\t\ttoModel: modelName(matched.declaringModelName),\n\t\t\ttoTable: matched.declaringTableName,\n\t\t\t...ifDefined(\"toNamespaceId\", matched.declaringNamespaceId),\n\t\t\t...candidate.isList ? { cardinality: \"1:N\" } : {\n\t\t\t\tcardinality: \"1:1\",\n\t\t\t\tnullable: true\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tparentTable: candidate.tableName,\n\t\t\t\tparentColumns: matched.referencedColumns,\n\t\t\t\tchildTable: matched.declaringTableName,\n\t\t\t\tchildColumns: matched.localColumns\n\t\t\t}\n\t\t});\n\t}\n}\nfunction validateBackrelationFieldAttributes(input) {\n\tconst source = diagnosticSource(input.sources, input.field.node.syntax);\n\tlet valid = true;\n\tfor (const attribute of input.field.attributes) {\n\t\tif (attribute.name === \"relation\") continue;\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_ATTRIBUTE\",\n\t\t\tmessage: `Field \"${input.modelName}.${input.field.name}\" uses unsupported attribute \"@${attribute.name}\"`,\n\t\t\t...source.at(attribute.span)\n\t\t});\n\t\tvalid = false;\n\t}\n\treturn valid;\n}\n//#endregion\n//#region src/interpreter.ts\nfunction buildComposedExtensionPackRefs(target, extensionIds, extensionPackRefs = []) {\n\tif (extensionIds.length === 0) return;\n\tconst extensionPackRefById = new Map(extensionPackRefs.map((packRef) => [packRef.id, packRef]));\n\treturn Object.fromEntries(extensionIds.map((extensionId) => [extensionId, extensionPackRefById.get(extensionId) ?? {\n\t\tkind: \"extension\",\n\t\tid: extensionId,\n\t\tfamilyId: target.familyId,\n\t\ttargetId: target.targetId,\n\t\tversion: \"0.0.1\"\n\t}]));\n}\nfunction compareStrings(left, right) {\n\tif (left < right) return -1;\n\tif (left > right) return 1;\n\treturn 0;\n}\nfunction declarationsHoldingModels(namespace) {\n\tconst declarations = /* @__PURE__ */ new Set();\n\tfor (const model of Object.values(namespace.models)) {\n\t\tconst written = model.node.syntax.findAncestor(NamespaceDeclarationAst.cast);\n\t\tif (written !== void 0) declarations.add(written.syntax);\n\t}\n\treturn declarations;\n}\nfunction validateNamespaceBlocksForSqlTarget(input) {\n\tif (input.targetId === \"sqlite\") {\n\t\tfor (const namespace of input.namespaces) for (const { node, span } of namespace.declarations) input.diagnostics.push({\n\t\t\tcode: \"PSL_UNSUPPORTED_NAMESPACE_BLOCK\",\n\t\t\tmessage: `SQLite does not support \\`namespace ${node.name()?.name() ?? namespace.name} { … }\\` blocks (SQLite has no schema concept; declare models at the document top level instead).`,\n\t\t\t...diagnosticSource(input.sources, node.syntax).at(span)\n\t\t});\n\t\treturn;\n\t}\n\tif (input.targetId === \"postgres\") {\n\t\tconst unboundNamespace = input.namespaces.find((namespace) => namespace.id === UNBOUND_NAMESPACE_ID && Object.keys(namespace.models).length > 0);\n\t\tconst hasSibling = input.namespaces.some((namespace) => namespace.id !== UNBOUND_NAMESPACE_ID && namespace.declarations.length > 0);\n\t\tif (unboundNamespace !== void 0 && hasSibling) {\n\t\t\tconst holdingModels = declarationsHoldingModels(unboundNamespace);\n\t\t\tfor (const { node, span } of unboundNamespace.declarations) {\n\t\t\t\tif (!holdingModels.has(node.syntax)) continue;\n\t\t\t\tinput.diagnostics.push({\n\t\t\t\t\tcode: \"PSL_RESERVED_NAMESPACE_NAME\",\n\t\t\t\t\tmessage: \"Namespace \\\"unbound\\\" is reserved for the late-binding sentinel mapping; a `namespace unbound { … }` containing models cannot appear alongside other named namespace blocks. Use `namespace unbound { … }` alone (no sibling named namespaces) for late-binding multi-tenant contracts.\",\n\t\t\t\t\t...diagnosticSource(input.sources, node.syntax).at(span)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n/**\n* Walks the flat `entityTypes` namespace tree in `authoringContributions` and\n* returns a map from discriminator string to the matching descriptor. The\n* interpreter uses this to dispatch parsed extension blocks to their factory\n* without naming any specific discriminator value (generic, by-discriminator).\n*/\nfunction buildEntityTypesByDiscriminator(contributions) {\n\tconst result = /* @__PURE__ */ new Map();\n\tconst namespace = contributions?.entityTypes;\n\tif (namespace === void 0) return result;\n\tconst walk = (node) => {\n\t\tfor (const value of Object.values(node)) if (isAuthoringEntityTypeDescriptor(value)) result.set(value.discriminator, value);\n\t\telse if (typeof value === \"object\" && value !== null) walk(value);\n\t};\n\twalk(namespace);\n\treturn result;\n}\n/**\n* The `PSL_DUPLICATE_ATTRIBUTE` diagnostic for a model attribute declared\n* more than once on one model. Shared by the built-in `@@control` path and\n* the contributed-model-attribute path so the code and wording stay in one\n* place. `name` is the bare attribute name (`control`, `rls`, …).\n*/\nfunction duplicateModelAttributeDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_DUPLICATE_ATTRIBUTE\",\n\t\tmessage: `\\`@@${input.name}\\` declared more than once on model \"${input.modelName}\".`,\n\t\t...input.source.at(input.span)\n\t};\n}\nfunction isResolvedModelReference(value) {\n\tif (typeof value !== \"object\" || value === null || !(\"declaration\" in value)) return false;\n\tconst declaration = value.declaration;\n\treturn typeof declaration === \"object\" && declaration !== null && \"kind\" in declaration && declaration.kind === \"model\";\n}\nfunction validateBlockModelAttributeRequirements(input) {\n\tfor (const [blockSymbol, envelope] of input.parsedBlocks) {\n\t\tconst requirement = findBlockDescriptor(input.pslBlockDescriptors, blockSymbol.keyword)?.requiresModelAttribute;\n\t\tif (requirement === void 0) continue;\n\t\tconst target = envelope.values[requirement.parameter];\n\t\tif (!isResolvedModelReference(target)) continue;\n\t\tconst model = target.declaration;\n\t\tif (model.attributes.some((attribute) => attribute.name === requirement.attribute)) continue;\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_EXTENSION_TARGET_MODEL_MISSING_ATTRIBUTE\",\n\t\t\tmessage: `\\`${blockSymbol.keyword}\\` block \"${envelope.name}\" targets model \"${model.name}\", which does not declare \\`@@${requirement.attribute}\\`. Add \\`@@${requirement.attribute}\\` to model \"${model.name}\".`,\n\t\t\t...diagnosticSource(input.sources, blockSymbol.node.syntax).at(envelope.parameterSpans[requirement.parameter] ?? envelope.span)\n\t\t});\n\t}\n}\n/**\n* Walks the flat `modelAttributes` namespace tree in `authoringContributions`\n* and returns a map from bare `@@` attribute name to the matching\n* descriptor. The model-attribute loop in `buildModelNodeFromPsl` uses this\n* to dispatch a contributed attribute without naming any specific attribute.\n*/\nfunction buildModelAttributesByName(contributions) {\n\tconst result = /* @__PURE__ */ new Map();\n\tconst namespace = contributions?.modelAttributes;\n\tif (namespace === void 0) return result;\n\tconst walk = (node) => {\n\t\tfor (const value of Object.values(node)) if (isAuthoringModelAttributeDescriptor(value)) result.set(value.attribute, value);\n\t\telse if (typeof value === \"object\" && value !== null) walk(value);\n\t};\n\twalk(namespace);\n\treturn result;\n}\n/**\n* This pass is intentionally generic: no discriminator value is named here.\n* The factory (registered by the target pack) owns all block-specific logic.\n*/\nfunction lowerExtensionBlocksForNamespace(blocks, ownerNamespaceId, entityTypesByDiscriminator, entityContext, parsedBlocks, modelCoordinateOf, sources) {\n\tconst rows = [];\n\tfor (const blockSymbol of Object.values(blocks)) {\n\t\tconst envelope = parsedBlocks.get(blockSymbol);\n\t\tif (envelope === void 0) continue;\n\t\tconst descriptor = entityTypesByDiscriminator.get(envelope.kind);\n\t\tif (descriptor === void 0) continue;\n\t\tlet resolvedModelRefs;\n\t\tfor (const [paramName, value] of Object.entries(envelope.values)) {\n\t\t\tif (!isResolvedModelReference(value)) continue;\n\t\t\tconst coordinate = modelCoordinateOf(value.declaration);\n\t\t\tinvariant(coordinate !== void 0, `model mappings cover every collected model; \\`${envelope.keyword}\\` block \"${envelope.name}\" selected model \"${value.declaration.name}\" in \\`${paramName}\\` without a storage coordinate`);\n\t\t\tresolvedModelRefs = {\n\t\t\t\t...resolvedModelRefs ?? {},\n\t\t\t\t[paramName]: coordinate\n\t\t\t};\n\t\t}\n\t\tconst annotatedBlock = {\n\t\t\t...envelope,\n\t\t\tnamespaceId: ownerNamespaceId,\n\t\t\t...resolvedModelRefs !== void 0 ? { resolvedModelRefs } : {}\n\t\t};\n\t\tconst entity = instantiateAuthoringEntityType(descriptor.discriminator, descriptor, [annotatedBlock], {\n\t\t\t...entityContext,\n\t\t\tsourceId: sources.sourceFileFor(blockSymbol.node.syntax).filename\n\t\t});\n\t\tif (entity === void 0) continue;\n\t\tconst namespaceId = providesPslEntityPlacement(descriptor.output) ? descriptor.output.pslPlacement(entity).namespaceId : ownerNamespaceId;\n\t\trows.push({\n\t\t\tnamespaceId,\n\t\t\tentityKind: descriptor.discriminator,\n\t\t\tkey: envelope.name,\n\t\t\tentity\n\t\t});\n\t\tconst derivedValueSet = deriveValueSetFromEntity(descriptor.output, entity);\n\t\tif (derivedValueSet !== void 0) rows.push({\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"valueSet\",\n\t\t\tkey: envelope.name,\n\t\t\tentity: derivedValueSet\n\t\t});\n\t}\n\treturn rows;\n}\nfunction processEnumDeclarations(input) {\n\tconst enumHandles = /* @__PURE__ */ new Map();\n\tconst enumTypeDescriptors = /* @__PURE__ */ new Map();\n\tif (input.enumBlocks.length === 0) return {\n\t\tenumHandles,\n\t\tenumTypeDescriptors\n\t};\n\tconst enumDescriptor = getAuthoringEntity(input.authoringContributions, [\"enum\"]);\n\tif (!enumDescriptor) {\n\t\tfor (const symbol of input.enumBlocks) input.diagnostics.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_FACTORY\",\n\t\t\tmessage: `enum \"${symbol.name}\" requires an \"enum\" entityType factory in the active authoring contributions`,\n\t\t\t...diagnosticSource(input.source.sources, symbol.node.syntax).at(symbol.span)\n\t\t});\n\t\treturn {\n\t\t\tenumHandles,\n\t\t\tenumTypeDescriptors\n\t\t};\n\t}\n\tfor (const symbol of input.enumBlocks) {\n\t\tconst envelope = input.parsedBlocks.get(symbol);\n\t\tinput.diagnostics.push(...enumMemberAttributeDiagnostics(symbol, input.source.sources));\n\t\tif (envelope === void 0) continue;\n\t\tconst handle = instantiateAuthoringEntityType(\"enum\", enumDescriptor, [envelope], {\n\t\t\t...input.entityContext,\n\t\t\tsourceId: input.source.sources.sourceFileFor(symbol.node.syntax).filename\n\t\t});\n\t\tif (handle === void 0 || handle === null) continue;\n\t\tenumHandles.set(symbol, handle);\n\t\tenumTypeDescriptors.set(symbol, { codecId: handle.codecId });\n\t}\n\treturn {\n\t\tenumHandles,\n\t\tenumTypeDescriptors\n\t};\n}\n/**\n* The owning side of a relation is the one that declares `fields`/`references` on its\n* `@relation` attribute — those name the FK columns. A singular model-typed field whose\n* `@relation` carries only a name (or nothing at all) is the back side: infer prints exactly\n* that shape for a 1:1 back-relation whenever the FK needs disambiguating (two FKs between the\n* same table pair, or a self-referencing unique FK). Checking for the attribute's mere presence\n* would misclassify that back side as the owning side.\n*/\nfunction relationAttributeDeclaresOwningSide(relationAttribute) {\n\treturn getNamedArgument(relationAttribute, \"fields\") !== void 0 || getNamedArgument(relationAttribute, \"references\") !== void 0;\n}\nfunction relationNullabilityMismatch(relationField, localColumns, resolvedFields) {\n\treturn resolveToOneRelationNullable({\n\t\tdeclaredNullable: relationField.optional,\n\t\tlocalFieldNullability: resolvedFields.filter((resolvedField) => localColumns.includes(resolvedField.columnName)).map((resolvedField) => resolvedField.nullable),\n\t\townsReference: true\n\t}).contradiction !== void 0;\n}\nfunction relationNullabilityMismatchDiagnostic(modelName, relationAttribute, source) {\n\tconst fieldLabel = `Relation field \"${modelName}.${relationAttribute.field.name}\"`;\n\treturn {\n\t\tcode: \"PSL_RELATION_NULLABILITY_MISMATCH\",\n\t\tmessage: relationAttribute.field.optional ? `${fieldLabel} is optional but every field in @relation(fields: [...]) is required. Make one of those fields optional with \"?\" or remove \"?\" from \"${relationAttribute.field.name}\".` : `${fieldLabel} is required but a field in @relation(fields: [...]) is optional. Add \"?\" to \"${relationAttribute.field.name}\" or make those fields required.`,\n\t\t...source.at(relationAttribute.field.span)\n\t};\n}\nfunction buildModelNodeFromPsl(input) {\n\tconst { model, diagnostics } = input;\n\tconst source = diagnosticSource(input.sources, model.node.syntax);\n\tconst tableName = storageName(model, input.physicalNames);\n\tconst specContext = modelSpecContext({\n\t\tsymbols: input.symbolTable,\n\t\tmodel,\n\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\tdataTypes: input.dataTypes\n\t});\n\tconst modelNamespaceId = input.namespaceId;\n\tconst resolvedFields = collectResolvedFields({\n\t\tmodel,\n\t\tphysicalNames: input.physicalNames,\n\t\tsymbolTable: input.symbolTable,\n\t\tenumTypeDescriptors: input.enumTypeDescriptors,\n\t\tnamedTypeDescriptors: input.namedTypeDescriptors,\n\t\tnamedTypes: input.namedTypes,\n\t\tvalueObjectTypes: input.valueObjectTypes,\n\t\tauthoringContributions: input.authoringContributions,\n\t\ttargetId: input.targetId,\n\t\tdefaultFunctionRegistry: input.defaultFunctionRegistry,\n\t\tdataTypes: input.dataTypes,\n\t\tgeneratorDescriptorById: input.generatorDescriptorById,\n\t\tdiagnostics,\n\t\tsources: input.sources,\n\t\tbinder: input.binder,\n\t\tscalarColumnDescriptors: input.scalarColumnDescriptors,\n\t\tenumHandles: input.enumHandles,\n\t\tcapabilities: input.capabilities,\n\t\tnamespaceId: modelNamespaceId,\n\t\t...ifDefined(\"namespaceExtensionEntities\", input.namespaceExtensionEntities),\n\t\tcodecLookup: input.codecLookup\n\t});\n\tconst inlineIdFields = resolvedFields.filter((field) => field.isId);\n\tif (inlineIdFields.length > 1) diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `Model \"${model.name}\" cannot declare inline @id on multiple fields; use model-level @@id([...]) for composite identity`,\n\t\t...source.at(model.span)\n\t});\n\tconst singleInlineIdField = inlineIdFields.length === 1 ? inlineIdFields[0] : void 0;\n\tlet primaryKey = singleInlineIdField ? {\n\t\tcolumns: [singleInlineIdField.columnName],\n\t\t...ifDefined(\"name\", singleInlineIdField.idName)\n\t} : void 0;\n\tconst hasInlinePrimaryKey = primaryKey !== void 0;\n\tlet blockPrimaryKeyDeclared = false;\n\tlet controlPolicyDeclared = false;\n\tlet controlPolicy;\n\tconst declaredContributedModelAttributes = /* @__PURE__ */ new Set();\n\tconst modelAttributeEntities = {};\n\tconst resultBackrelationCandidates = [];\n\tfor (const field of Object.values(model.fields)) {\n\t\tconst backrelationTarget = backrelationTargetSymbol(field, input.binder);\n\t\tif (backrelationTarget === void 0) continue;\n\t\tconst relationAttribute = getAttribute(field.attributes, \"relation\");\n\t\tif (!field.list && relationAttribute && relationAttributeDeclaresOwningSide(relationAttribute)) continue;\n\t\tconst attributesValid = validateBackrelationFieldAttributes({\n\t\t\tmodelName: model.name,\n\t\t\tfield,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tdiagnostics\n\t\t});\n\t\tlet relationName;\n\t\tif (relationAttribute) {\n\t\t\tconst parsedRelation = interpretRelationAttribute({\n\t\t\t\tselfModel: model,\n\t\t\t\tfield,\n\t\t\t\tspecContext: fieldSpecContext({\n\t\t\t\t\t...specContext,\n\t\t\t\t\tfield,\n\t\t\t\t\tbinder: input.binder\n\t\t\t\t}),\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (!parsedRelation) continue;\n\t\t\tif (parsedRelation.fields || parsedRelation.references) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\t\tmessage: `Backrelation list field \"${model.name}.${field.name}\" cannot declare fields/references; define them on the FK-side relation field`,\n\t\t\t\t\t...source.at(relationAttribute.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (parsedRelation.onDelete || parsedRelation.onUpdate || parsedRelation.index !== void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\t\tmessage: `Backrelation list field \"${model.name}.${field.name}\" cannot declare onDelete/onUpdate/index; define them on the FK-side relation field`,\n\t\t\t\t\t...source.at(relationAttribute.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\trelationName = parsedRelation.name;\n\t\t}\n\t\tif (!attributesValid) continue;\n\t\tresultBackrelationCandidates.push({\n\t\t\tmodelName: model,\n\t\t\ttableName,\n\t\t\tfield,\n\t\t\ttargetModelName: backrelationTarget,\n\t\t\tisList: field.list,\n\t\t\t...ifDefined(\"relationName\", relationName)\n\t\t});\n\t}\n\tconst relationAttributes = Object.values(model.fields).map((field) => ({\n\t\tfield,\n\t\trelation: getAttribute(field.attributes, \"relation\")\n\t})).filter((entry) => Boolean(entry.relation));\n\tconst uniqueConstraints = resolvedFields.filter((field) => field.isUnique).map((field) => ({\n\t\tcolumns: [field.columnName],\n\t\t...ifDefined(\"name\", field.uniqueName)\n\t}));\n\tconst indexNodes = [];\n\tconst checkNodes = [];\n\tconst foreignKeyNodes = [];\n\tfor (const modelAttribute of model.attributes) {\n\t\tif (!Object.hasOwn(sqlAttributeSpecs.model, modelAttribute.name) && !input.modelAttributesByName.has(modelAttribute.name)) continue;\n\t\tif (modelAttribute.name === \"map\") continue;\n\t\tif (modelAttribute.name === \"discriminator\" || modelAttribute.name === \"base\") continue;\n\t\tif (modelAttribute.name === \"control\") {\n\t\t\tif (controlPolicyDeclared) {\n\t\t\t\tdiagnostics.push(duplicateModelAttributeDiagnostic({\n\t\t\t\t\tname: \"control\",\n\t\t\t\t\tmodelName: model.name,\n\t\t\t\t\tsource,\n\t\t\t\t\tspan: modelAttribute.span\n\t\t\t\t}));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcontrolPolicyDeclared = true;\n\t\t\tconst node = modelAttribute.node;\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: sqlAttributeSpecs.model.control(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed !== void 0) controlPolicy = parsed.policy;\n\t\t\tcontinue;\n\t\t}\n\t\tconst attributeLabel = `Model \"${model.name}\" @@${modelAttribute.name}`;\n\t\tif (modelAttribute.name === \"id\") {\n\t\t\tif (blockPrimaryKeyDeclared) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\t\tmessage: `Model \"${model.name}\" declares @@id more than once`,\n\t\t\t\t\t...source.at(modelAttribute.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hasInlinePrimaryKey) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\t\tmessage: `Model \"${model.name}\" cannot declare both field-level @id and model-level @@id`,\n\t\t\t\t\t...source.at(modelAttribute.span)\n\t\t\t\t});\n\t\t\t\tblockPrimaryKeyDeclared = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = modelAttribute.node;\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: sqlAttributeSpecs.model.id(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed === void 0) continue;\n\t\t\tconst fieldNames = parsed.fields;\n\t\t\tconst nullableFieldName = fieldNames.find((name) => model.fields[name]?.optional === true);\n\t\t\tif (nullableFieldName !== void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\t\tmessage: `${attributeLabel} cannot include optional field \"${nullableFieldName}\"; primary key columns must be NOT NULL`,\n\t\t\t\t\t...source.at(modelAttribute.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst columnNames = mapFieldNamesToColumns({\n\t\t\t\tmodel,\n\t\t\t\tphysicalNames: input.physicalNames,\n\t\t\t\tfieldNames,\n\t\t\t\tsource,\n\t\t\t\tdiagnostics,\n\t\t\t\tspan: modelAttribute.span,\n\t\t\t\tentityLabel: attributeLabel\n\t\t\t});\n\t\t\tif (!columnNames) continue;\n\t\t\tprimaryKey = {\n\t\t\t\tcolumns: columnNames,\n\t\t\t\t...ifDefined(\"name\", parsed.map)\n\t\t\t};\n\t\t\tblockPrimaryKeyDeclared = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (modelAttribute.name === \"unique\") {\n\t\t\tconst node = modelAttribute.node;\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: sqlAttributeSpecs.model.unique(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed === void 0) continue;\n\t\t\tconst columnNames = mapFieldNamesToColumns({\n\t\t\t\tmodel,\n\t\t\t\tphysicalNames: input.physicalNames,\n\t\t\t\tfieldNames: parsed.fields,\n\t\t\t\tsource,\n\t\t\t\tdiagnostics,\n\t\t\t\tspan: modelAttribute.span,\n\t\t\t\tentityLabel: attributeLabel\n\t\t\t});\n\t\t\tif (!columnNames) continue;\n\t\t\tuniqueConstraints.push({\n\t\t\t\tcolumns: columnNames,\n\t\t\t\t...ifDefined(\"name\", parsed.map)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (modelAttribute.name === \"index\") {\n\t\t\tconst node = modelAttribute.node;\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: sqlAttributeSpecs.model.index(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed === void 0) continue;\n\t\t\tlet columnNames;\n\t\t\tif (parsed.fields !== void 0) {\n\t\t\t\tconst mapped = mapFieldNamesToColumns({\n\t\t\t\t\tmodel,\n\t\t\t\t\tphysicalNames: input.physicalNames,\n\t\t\t\t\tfieldNames: parsed.fields,\n\t\t\t\t\tsource,\n\t\t\t\t\tdiagnostics,\n\t\t\t\t\tspan: modelAttribute.span,\n\t\t\t\t\tentityLabel: attributeLabel\n\t\t\t\t});\n\t\t\t\tif (!mapped) continue;\n\t\t\t\tcolumnNames = mapped;\n\t\t\t}\n\t\t\tindexNodes.push(blindCast({\n\t\t\t\t...ifDefined(\"columns\", columnNames),\n\t\t\t\t...ifDefined(\"expression\", parsed.expression === void 0 ? void 0 : sqlTextFromStored(parsed.expression.value.value)),\n\t\t\t\twhere: parsed.where === void 0 ? void 0 : sqlTextFromStored(parsed.where.value.value),\n\t\t\t\tunique: parsed.unique,\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map,\n\t\t\t\ttype: parsed.type,\n\t\t\t\toptions: parsed.options\n\t\t\t}));\n\t\t\tcontinue;\n\t\t}\n\t\tif (modelAttribute.name === \"check\") {\n\t\t\tconst node = modelAttribute.node;\n\t\t\tif (input.capabilities[\"sql\"]?.[\"checkConstraint\"] !== true) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_CHECK_UNSUPPORTED_TARGET\",\n\t\t\t\t\tmessage: `Model \"${model.name}\" declares \"@@check\", but target \"${input.targetId}\" does not support check constraints (the adapter does not report the \"checkConstraint\" capability). Remove the check or author it against a target that supports check constraints.`,\n\t\t\t\t\t...source.at(modelAttribute.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: sqlAttributeSpecs.model.check(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed === void 0) continue;\n\t\t\tcheckNodes.push({\n\t\t\t\texpression: sqlTextFromStored(parsed.expression.value.value),\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst contributedModelAttribute = input.modelAttributesByName.get(modelAttribute.name);\n\t\tif (contributedModelAttribute !== void 0) {\n\t\t\tif (contributedModelAttribute.repeatable !== true && declaredContributedModelAttributes.has(modelAttribute.name)) {\n\t\t\t\tdiagnostics.push(duplicateModelAttributeDiagnostic({\n\t\t\t\t\tname: modelAttribute.name,\n\t\t\t\t\tmodelName: model.name,\n\t\t\t\t\tsource,\n\t\t\t\t\tspan: modelAttribute.span\n\t\t\t\t}));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdeclaredContributedModelAttributes.add(modelAttribute.name);\n\t\t\tconst node = modelAttribute.node;\n\t\t\tconst specFactory = input.contributedModelAttributeSpecs[contributedModelAttribute.attribute];\n\t\t\tif (specFactory === void 0) continue;\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode,\n\t\t\t\tspec: specFactory(specContext),\n\t\t\t\tmodel,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed === void 0) continue;\n\t\t\tconst lowered = blindCast(contributedModelAttribute.lower)(parsed, {\n\t\t\t\tfamily: input.familyId,\n\t\t\t\ttarget: input.targetId,\n\t\t\t\tcodecLookup: input.codecLookup,\n\t\t\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\t\t\tmodelName: model.name,\n\t\t\t\tstorageName: tableName,\n\t\t\t\tfieldStorageName: (fieldName) => {\n\t\t\t\t\tconst field = model.fields[fieldName];\n\t\t\t\t\treturn field === void 0 ? void 0 : storageName(field, input.physicalNames);\n\t\t\t\t},\n\t\t\t\tfieldCodecId: (fieldName) => resolvedFields.find((resolved) => resolved.field.name === fieldName)?.descriptor.codecId,\n\t\t\t\tnamespaceId: modelNamespaceId,\n\t\t\t\tsourceId: source.sources.sourceFileFor(source.node).filename,\n\t\t\t\tdiagnostics: { push: (d) => {\n\t\t\t\t\tdiagnostics.pushExternal(blindCast(d));\n\t\t\t\t} }\n\t\t\t});\n\t\t\tif (lowered === void 0) continue;\n\t\t\tif (\"index\" in lowered) {\n\t\t\t\tif (!isAuthoredIndexInput(lowered.index)) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `model attribute \"@@${modelAttribute.name}\" on model \"${model.name}\" lowered to a malformed index. A contributed attribute that returns { index } must return an authored-index input: exactly one of a columns list or an expression, plus explicit where/unique/name/map and a type-with-options pair.`, { meta: {\n\t\t\t\t\tattribute: modelAttribute.name,\n\t\t\t\t\tmodelName: model.name\n\t\t\t\t} });\n\t\t\t\tindexNodes.push(lowered.index);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst slot = modelAttributeEntities[contributedModelAttribute.attribute] ?? {};\n\t\t\tmodelAttributeEntities[contributedModelAttribute.attribute] = slot;\n\t\t\tslot[lowered.key] = lowered.entity;\n\t\t\tcontinue;\n\t\t}\n\t\tthrow new InternalError(`Model attribute \"@@${modelAttribute.name}\" is registered but has no interpreter branch`);\n\t}\n\tconst resultFkRelationMetadata = [];\n\tconst relationIndexLocations = [];\n\tconst resultInvalidFkPairings = [];\n\tconst resultCrossSpaceRelations = [];\n\tfor (const relationAttribute of relationAttributes) {\n\t\tconst { typeName: fieldTypeName, typeNamespaceId: fieldTypeNamespaceId, typeContractSpaceId: fieldTypeContractSpaceId } = relationAttribute.field;\n\t\tif (relationAttribute.field.list) {\n\t\t\tif (fieldTypeContractSpaceId !== void 0) diagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_CROSS_SPACE_LIST\",\n\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" is a cross-space list relation (type \"${fieldTypeContractSpaceId}:${fieldTypeNamespaceId !== void 0 ? `${fieldTypeNamespaceId}.` : \"\"}${fieldTypeName}[]\"). Cross-space relations must be singular in v0.1 — list cross-space relations are not supported.`,\n\t\t\t\t...source.at(relationAttribute.field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (!relationAttributeDeclaresOwningSide(relationAttribute.relation)) continue;\n\t\tif (fieldTypeContractSpaceId !== void 0) {\n\t\t\tconst extContractForSpace = input.composedExtensionContracts.get(fieldTypeContractSpaceId);\n\t\t\tif (extContractForSpace === void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_UNKNOWN_CONTRACT_SPACE\",\n\t\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" references contract space \"${fieldTypeContractSpaceId}\" which is not declared in extensions. Add \"${fieldTypeContractSpaceId}\" to extensions in prisma.config.ts.`,\n\t\t\t\t\t...source.at(relationAttribute.field.span),\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tspace: fieldTypeContractSpaceId,\n\t\t\t\t\t\tsuggestedPack: fieldTypeContractSpaceId\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parsedRelation = interpretRelationAttribute({\n\t\t\t\tselfModel: model,\n\t\t\t\tfield: relationAttribute.field,\n\t\t\t\tspecContext: fieldSpecContext({\n\t\t\t\t\t...specContext,\n\t\t\t\t\tfield: relationAttribute.field,\n\t\t\t\t\tbinder: input.binder\n\t\t\t\t}),\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder: input.binder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (!parsedRelation) continue;\n\t\t\tif (!parsedRelation.fields || !parsedRelation.references) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" requires fields and references arguments`,\n\t\t\t\t\t...source.at(relationAttribute.relation.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst localColumns = mapFieldNamesToColumns({\n\t\t\t\tmodel,\n\t\t\t\tphysicalNames: input.physicalNames,\n\t\t\t\tfieldNames: parsedRelation.fields,\n\t\t\t\tsource,\n\t\t\t\tdiagnostics,\n\t\t\t\tspan: relationAttribute.relation.span,\n\t\t\t\tentityLabel: `Relation field \"${model.name}.${relationAttribute.field.name}\"`\n\t\t\t});\n\t\t\tif (!localColumns) continue;\n\t\t\tif (relationNullabilityMismatch(relationAttribute.field, localColumns, resolvedFields)) {\n\t\t\t\tdiagnostics.push(relationNullabilityMismatchDiagnostic(model.name, relationAttribute, source));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst referencedColumns = parsedRelation.references;\n\t\t\tif (localColumns.length !== referencedColumns.length) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" must provide the same number of fields and references`,\n\t\t\t\t\t...source.at(relationAttribute.relation.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst onDelete = parsedRelation.onDelete ? normalizeReferentialAction(parsedRelation.onDelete) : void 0;\n\t\t\tconst onUpdate = parsedRelation.onUpdate ? normalizeReferentialAction(parsedRelation.onUpdate) : void 0;\n\t\t\tconst crossTargetNamespaceId = fieldTypeNamespaceId ?? UNBOUND_NAMESPACE_ID;\n\t\t\tconst extContract = extContractForSpace;\n\t\t\tconst resolvedTable = extContract.domain.namespaces[crossTargetNamespaceId]?.models[fieldTypeName]?.storage[\"table\"];\n\t\t\tif (typeof resolvedTable !== \"string\") {\n\t\t\t\tconst availableModels = Object.keys(extContract.domain.namespaces[crossTargetNamespaceId]?.models ?? {}).join(\", \") || \"(none)\";\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_UNKNOWN_CROSS_SPACE_TARGET\",\n\t\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" references model \"${fieldTypeName}\" in namespace \"${crossTargetNamespaceId}\" of space \"${fieldTypeContractSpaceId}\", but that model was not found in the extension contract. Available models: ${availableModels}`,\n\t\t\t\t\t...source.at(relationAttribute.field.span),\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tspace: fieldTypeContractSpaceId,\n\t\t\t\t\t\tnamespace: crossTargetNamespaceId,\n\t\t\t\t\t\tmodel: fieldTypeName\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst crossTargetTableName = resolvedTable;\n\t\t\tforeignKeyNodes.push({\n\t\t\t\tcolumns: localColumns,\n\t\t\t\treferences: {\n\t\t\t\t\tmodel: fieldTypeName,\n\t\t\t\t\ttable: crossTargetTableName,\n\t\t\t\t\tcolumns: referencedColumns,\n\t\t\t\t\tnamespaceId: crossTargetNamespaceId,\n\t\t\t\t\tspaceId: fieldTypeContractSpaceId\n\t\t\t\t},\n\t\t\t\t...ifDefined(\"name\", parsedRelation.map),\n\t\t\t\t...ifDefined(\"onDelete\", onDelete),\n\t\t\t\t...ifDefined(\"onUpdate\", onUpdate),\n\t\t\t\t...ifDefined(\"index\", parsedRelation.index)\n\t\t\t});\n\t\t\tif (typeof parsedRelation.index === \"string\") relationIndexLocations.push({\n\t\t\t\tnamespaceId: modelNamespaceId,\n\t\t\t\ttableName,\n\t\t\t\tcolumns: localColumns,\n\t\t\t\tindex: parsedRelation.index,\n\t\t\t\tlocation: source.at(relationAttribute.relation.span)\n\t\t\t});\n\t\t\tresultCrossSpaceRelations.push({\n\t\t\t\tfieldName: relationAttribute.field.name,\n\t\t\t\ttoModel: fieldTypeName,\n\t\t\t\ttoTable: crossTargetTableName,\n\t\t\t\tcardinality: \"N:1\",\n\t\t\t\tnullable: relationAttribute.field.optional,\n\t\t\t\tspaceId: fieldTypeContractSpaceId,\n\t\t\t\tnamespaceId: crossTargetNamespaceId,\n\t\t\t\ton: {\n\t\t\t\t\tparentTable: tableName,\n\t\t\t\t\tparentColumns: localColumns,\n\t\t\t\t\tchildTable: crossTargetTableName,\n\t\t\t\t\tchildColumns: referencedColumns\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst qualifiedTypeName = fieldTypeNamespaceId ? `${fieldTypeNamespaceId}.${fieldTypeName}` : fieldTypeName;\n\t\tconst typeReference = typeReferenceNode(relationAttribute.field);\n\t\tconst targetResolution = typeReference === void 0 ? void 0 : input.binder.symbolForNode(typeReference);\n\t\tif (targetResolution?.kind === \"unresolved\") continue;\n\t\tif (targetResolution?.kind !== \"model\") {\n\t\t\tconst foundKind = targetResolution === void 0 ? void 0 : relationTargetKindLabel(targetResolution);\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_RELATION_TARGET\",\n\t\t\t\tmessage: foundKind === void 0 ? `Relation field \"${model.name}.${relationAttribute.field.name}\" references unknown model \"${qualifiedTypeName}\"` : `Relation field \"${model.name}.${relationAttribute.field.name}\" references ${foundKind} \"${qualifiedTypeName}\"; a relation target must be a model`,\n\t\t\t\t...source.at(relationAttribute.field.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst targetModel = targetResolution.symbol;\n\t\tconst targetNamespaceId = targetResolution.namespace.id;\n\t\tconst parsedRelation = interpretRelationAttribute({\n\t\t\tselfModel: model,\n\t\t\tfield: relationAttribute.field,\n\t\t\tspecContext: fieldSpecContext({\n\t\t\t\t...specContext,\n\t\t\t\tfield: relationAttribute.field,\n\t\t\t\tbinder: input.binder\n\t\t\t}),\n\t\t\tsymbols: input.symbolTable,\n\t\t\tsources: input.sources,\n\t\t\tbinder: input.binder,\n\t\t\tdiagnostics\n\t\t});\n\t\tif (!parsedRelation) continue;\n\t\tif (!parsedRelation.fields || !parsedRelation.references) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" requires fields and references arguments`,\n\t\t\t\t...source.at(relationAttribute.relation.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst localColumns = mapFieldNamesToColumns({\n\t\t\tmodel,\n\t\t\tphysicalNames: input.physicalNames,\n\t\t\tfieldNames: parsedRelation.fields,\n\t\t\tsource,\n\t\t\tdiagnostics,\n\t\t\tspan: relationAttribute.relation.span,\n\t\t\tentityLabel: `Relation field \"${model.name}.${relationAttribute.field.name}\"`\n\t\t});\n\t\tif (!localColumns) continue;\n\t\tif (relationNullabilityMismatch(relationAttribute.field, localColumns, resolvedFields)) {\n\t\t\tdiagnostics.push(relationNullabilityMismatchDiagnostic(model.name, relationAttribute, source));\n\t\t\tresultInvalidFkPairings.push({\n\t\t\t\tdeclaringModel: model,\n\t\t\t\ttargetModel,\n\t\t\t\t...ifDefined(\"relationName\", parsedRelation.name)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst referencedColumns = mapFieldNamesToColumns({\n\t\t\tmodel: targetModel,\n\t\t\tphysicalNames: input.physicalNames,\n\t\t\tfieldNames: parsedRelation.references,\n\t\t\tsource,\n\t\t\tdiagnostics,\n\t\t\tspan: relationAttribute.relation.span,\n\t\t\tentityLabel: `Relation field \"${model.name}.${relationAttribute.field.name}\"`\n\t\t});\n\t\tif (!referencedColumns) continue;\n\t\tif (localColumns.length !== referencedColumns.length) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\t\tmessage: `Relation field \"${model.name}.${relationAttribute.field.name}\" must provide the same number of fields and references`,\n\t\t\t\t...source.at(relationAttribute.relation.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst onDelete = parsedRelation.onDelete ? normalizeReferentialAction(parsedRelation.onDelete) : void 0;\n\t\tconst onUpdate = parsedRelation.onUpdate ? normalizeReferentialAction(parsedRelation.onUpdate) : void 0;\n\t\tconst targetTableName = storageName(targetModel, input.physicalNames);\n\t\tforeignKeyNodes.push({\n\t\t\tcolumns: localColumns,\n\t\t\treferences: {\n\t\t\t\tmodel: targetModel.name,\n\t\t\t\ttable: targetTableName,\n\t\t\t\tcolumns: referencedColumns,\n\t\t\t\tnamespaceId: targetNamespaceId\n\t\t\t},\n\t\t\t...ifDefined(\"name\", parsedRelation.map),\n\t\t\t...ifDefined(\"onDelete\", onDelete),\n\t\t\t...ifDefined(\"onUpdate\", onUpdate),\n\t\t\t...ifDefined(\"index\", parsedRelation.index)\n\t\t});\n\t\tif (typeof parsedRelation.index === \"string\") relationIndexLocations.push({\n\t\t\tnamespaceId: modelNamespaceId,\n\t\t\ttableName,\n\t\t\tcolumns: localColumns,\n\t\t\tindex: parsedRelation.index,\n\t\t\tlocation: source.at(relationAttribute.relation.span)\n\t\t});\n\t\tresultFkRelationMetadata.push({\n\t\t\tdeclaringModelName: model,\n\t\t\tdeclaringFieldName: relationAttribute.field.name,\n\t\t\tdeclaringTableName: tableName,\n\t\t\t...ifDefined(\"declaringNamespaceId\", modelNamespaceId),\n\t\t\ttargetModelName: targetModel,\n\t\t\ttargetTableName,\n\t\t\t...ifDefined(\"targetNamespaceId\", targetNamespaceId),\n\t\t\t...ifDefined(\"relationName\", parsedRelation.name),\n\t\t\tnullable: relationAttribute.field.optional,\n\t\t\tlocalColumns,\n\t\t\treferencedColumns\n\t\t});\n\t}\n\treturn {\n\t\tmodelNode: {\n\t\t\tmodelName: model.name,\n\t\t\ttableName,\n\t\t\tfields: resolvedFields.map((resolvedField) => {\n\t\t\t\tconst common = {\n\t\t\t\t\tfieldName: resolvedField.field.name,\n\t\t\t\t\tcolumnName: resolvedField.columnName,\n\t\t\t\t\tdescriptor: resolvedField.descriptor,\n\t\t\t\t\tnullable: resolvedField.nullable,\n\t\t\t\t\t...ifDefined(\"many\", resolvedField.many),\n\t\t\t\t\t...ifDefined(\"elementNullable\", resolvedField.many ? resolvedField.elementNullable === true : void 0),\n\t\t\t\t\t...ifDefined(\"default\", resolvedField.defaultValue),\n\t\t\t\t\t...ifDefined(\"executionDefaults\", resolvedField.executionDefaults)\n\t\t\t\t};\n\t\t\t\tif (resolvedField.valueObjectTypeName !== void 0) return {\n\t\t\t\t\t...common,\n\t\t\t\t\tvalueObjectName: resolvedField.valueObjectTypeName\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...common,\n\t\t\t\t\t...ifDefined(\"enumTypeHandle\", resolvedField.enumTypeHandle)\n\t\t\t\t};\n\t\t\t}),\n\t\t\t...ifDefined(\"id\", primaryKey),\n\t\t\t...uniqueConstraints.length > 0 ? { uniques: uniqueConstraints } : {},\n\t\t\t...indexNodes.length > 0 ? { indexes: indexNodes } : {},\n\t\t\t...checkNodes.length > 0 ? { checks: checkNodes } : {},\n\t\t\t...foreignKeyNodes.length > 0 ? { foreignKeys: foreignKeyNodes } : {},\n\t\t\t...ifDefined(\"control\", controlPolicy)\n\t\t},\n\t\tfkRelationMetadata: resultFkRelationMetadata,\n\t\trelationIndexLocations,\n\t\tinvalidFkPairings: resultInvalidFkPairings,\n\t\tcrossSpaceRelations: resultCrossSpaceRelations,\n\t\tbackrelationCandidates: resultBackrelationCandidates,\n\t\tmodelAttributeEntities\n\t};\n}\nfunction buildValueObjectNodes(input) {\n\tconst { compositeTypes, enumHandles, diagnostics, sources, binder } = input;\n\treturn compositeTypes.map((compositeType) => {\n\t\tfor (const attribute of compositeType.attributes) diagnostics.push({\n\t\t\tcode: \"PSL_UNSUPPORTED_COMPOSITE_TYPE_ATTRIBUTE\",\n\t\t\tmessage: `Composite type \"${compositeType.name}\" uses attribute \"@@${attribute.name}\", which a composite type does not take`,\n\t\t\t...diagnosticSource(sources, compositeType.node.syntax).at(attribute.span)\n\t\t});\n\t\tconst fields = [];\n\t\tfor (const field of Object.values(compositeType.fields)) {\n\t\t\tfor (const attribute of field.attributes) diagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_FIELD_ATTRIBUTE\",\n\t\t\t\tmessage: `Member \"${field.name}\" of composite type \"${compositeType.name}\" uses attribute \"@${attribute.name}\", which a composite type member does not take`,\n\t\t\t\t...diagnosticSource(sources, field.node.syntax).at(attribute.span)\n\t\t\t});\n\t\t\tconst common = {\n\t\t\t\tfieldName: field.name,\n\t\t\t\tnullable: field.optional,\n\t\t\t\t...ifDefined(\"many\", field.list ? true : void 0),\n\t\t\t\t...ifDefined(\"elementNullable\", field.list ? field.elementOptional : void 0)\n\t\t\t};\n\t\t\tconst fieldTypeReference = typeReferenceNode(field);\n\t\t\tconst fieldTypeResolution = fieldTypeReference === void 0 ? void 0 : binder.symbolForNode(fieldTypeReference);\n\t\t\tif (fieldTypeResolution?.kind === \"compositeType\") {\n\t\t\t\tfields.push({\n\t\t\t\t\t...common,\n\t\t\t\t\tvalueObjectName: fieldTypeResolution.symbol.name\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst resolved = resolveFieldTypeDescriptor({\n\t\t\t\tfield,\n\t\t\t\tresolution: fieldTypeResolution,\n\t\t\t\tenumTypeDescriptors: input.enumTypeDescriptors,\n\t\t\t\tnamedTypeDescriptors: input.namedTypeDescriptors,\n\t\t\t\tdiagnostics,\n\t\t\t\tsources,\n\t\t\t\tentityLabel: `Field \"${compositeType.name}.${field.name}\"`,\n\t\t\t\tnamespaceId: input.defaultNamespaceId,\n\t\t\t\tnamespaceExtensionEntities: input.namespaceExtensionEntities,\n\t\t\t\tbinder,\n\t\t\t\tcodecLookup: input.codecLookup\n\t\t\t});\n\t\t\tif (!resolved.ok) continue;\n\t\t\tconst { descriptor } = resolved;\n\t\t\tif (descriptor.valueSet !== 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 \"${compositeType.name}.${field.name}\" is typed by the storage enum \"${descriptor.valueSet.entityName}\", which a composite type member cannot use: a member has no column to store it in. Use a PSL enum instead.`,\n\t\t\t\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfields.push({\n\t\t\t\t...common,\n\t\t\t\tdescriptor: {\n\t\t\t\t\tcodecId: descriptor.codecId,\n\t\t\t\t\t...ifDefined(\"typeParams\", resolvedTypeParams(descriptor, input.namedTypes))\n\t\t\t\t},\n\t\t\t\t...ifDefined(\"enumTypeHandle\", fieldTypeResolution?.kind === \"block\" ? enumHandles.get(fieldTypeResolution.symbol) : void 0)\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\tname: compositeType.name,\n\t\t\tfields\n\t\t};\n\t});\n}\nfunction isStringTyped(field, stringCodecId, binder) {\n\tconst node = typeReferenceNode(field);\n\tconst scalar = contributedTypeOf(node === void 0 ? void 0 : binder.symbolForNode(node), binder);\n\treturn stringCodecId !== void 0 && scalar?.descriptor.kind === \"typeConstructor\" && scalar.descriptor.output.codecId === stringCodecId;\n}\nfunction collectPolymorphismDeclarations(identities, symbols, sources, binder, specContextFor, stringCodecId, diagnostics) {\n\tconst discriminatorDeclarations = /* @__PURE__ */ new Map();\n\tconst baseDeclarations = /* @__PURE__ */ new Map();\n\tfor (const { model, namespaceId, key } of identities.values()) {\n\t\tconst source = diagnosticSource(sources, model.node.syntax);\n\t\tconst discriminatorNode = getAttribute(model.attributes, \"discriminator\")?.node;\n\t\tif (discriminatorNode !== void 0) {\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode: discriminatorNode,\n\t\t\t\tsymbols,\n\t\t\t\tspec: sqlAttributeSpecs.model.discriminator(specContextFor(model)),\n\t\t\t\tmodel,\n\t\t\t\tsources,\n\t\t\t\tbinder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed !== void 0) {\n\t\t\t\tconst span = nodePslSpan(discriminatorNode.syntax, sources);\n\t\t\t\tconst discField = model.fields[parsed.field];\n\t\t\t\tif (discField && !isStringTyped(discField, stringCodecId, binder)) diagnostics.push({\n\t\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\t\tmessage: `Discriminator field \"${parsed.field}\" on model \"${model.name}\" must be of type String, but is \"${discField.typeName}\"`,\n\t\t\t\t\t...source.at(span)\n\t\t\t\t});\n\t\t\t\telse discriminatorDeclarations.set(key, {\n\t\t\t\t\tmodel,\n\t\t\t\t\tfieldName: parsed.field,\n\t\t\t\t\tspan,\n\t\t\t\t\tsource\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst baseNode = getAttribute(model.attributes, \"base\")?.node;\n\t\tif (baseNode !== void 0) {\n\t\t\tconst parsed = interpretModelAttribute({\n\t\t\t\tnode: baseNode,\n\t\t\t\tsymbols,\n\t\t\t\tspec: sqlAttributeSpecs.model.base(specContextFor(model)),\n\t\t\t\tmodel,\n\t\t\t\tsources,\n\t\t\t\tbinder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (parsed !== void 0) {\n\t\t\t\tconst base = identities.get(parsed.base.declaration);\n\t\t\t\tinvariant(base !== void 0, `Resolved base model \"${parsed.base.declaration.name}\" is missing from the collected model identities`);\n\t\t\t\tbaseDeclarations.set(key, {\n\t\t\t\t\tmodel,\n\t\t\t\t\tnamespaceId,\n\t\t\t\t\tsource,\n\t\t\t\t\tbase,\n\t\t\t\t\tvalue: parsed.value,\n\t\t\t\t\tspan: nodePslSpan(baseNode.syntax, sources)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tdiscriminatorDeclarations,\n\t\tbaseDeclarations\n\t};\n}\nfunction modelLabel(namespaceId, modelName, qualified) {\n\treturn qualified ? `${namespaceId}.${modelName}` : modelName;\n}\nfunction resolvePolymorphism(models, physicalNames, discriminatorDeclarations, baseDeclarations, syntheticPkFieldsByVariant, stiBaseFieldsByBase, diagnostics) {\n\tlet patched = models;\n\tfor (const [baseKey, fieldNames] of stiBaseFieldsByBase) {\n\t\tconst baseModel = patched[baseKey];\n\t\tif (!baseModel || fieldNames.length === 0) continue;\n\t\tpatched = {\n\t\t\t...patched,\n\t\t\t[baseKey]: stripStorageOnlyDomainFields(baseModel, fieldNames)\n\t\t};\n\t}\n\tfor (const [modelKey, decl] of discriminatorDeclarations) {\n\t\tconst modelName = decl.model.name;\n\t\tif (baseDeclarations.has(modelKey)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_DISCRIMINATOR_AND_BASE\",\n\t\t\t\tmessage: `Model \"${modelName}\" cannot have both @@discriminator and @@base`,\n\t\t\t\t...decl.source.at(decl.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst model = patched[modelKey];\n\t\tif (!model) continue;\n\t\tconst variants = {};\n\t\tfor (const baseDecl of baseDeclarations.values()) {\n\t\t\tif (baseDecl.base.key !== modelKey) continue;\n\t\t\tconst variantName = baseDecl.model.name;\n\t\t\tconst existingVariant = variants[baseDecl.value];\n\t\t\tif (existingVariant) {\n\t\t\t\tconst qualified = existingVariant.namespace !== baseDecl.base.namespaceId || baseDecl.namespaceId !== baseDecl.base.namespaceId;\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_DISCRIMINATOR_VALUE\",\n\t\t\t\t\tmessage: `Discriminator value \"${baseDecl.value}\" is used by both \"${modelLabel(existingVariant.namespace, existingVariant.model, qualified)}\" and \"${modelLabel(baseDecl.namespaceId, variantName, qualified)}\" on base model \"${modelLabel(baseDecl.base.namespaceId, modelName, qualified)}\"`,\n\t\t\t\t\t...baseDecl.source.at(baseDecl.span)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvariants[baseDecl.value] = crossRef(variantName, baseDecl.namespaceId);\n\t\t}\n\t\tif (Object.keys(variants).length === 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_ORPHANED_DISCRIMINATOR\",\n\t\t\t\tmessage: `Model \"${modelName}\" has @@discriminator but no variant models declare @@base(${modelName}, ...)`,\n\t\t\t\t...decl.source.at(decl.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tpatched = {\n\t\t\t...patched,\n\t\t\t[modelKey]: {\n\t\t\t\t...model,\n\t\t\t\tdiscriminator: { field: decl.fieldName },\n\t\t\t\tvariants\n\t\t\t}\n\t\t};\n\t}\n\tfor (const [variantKey, baseDecl] of baseDeclarations) {\n\t\tconst baseName = baseDecl.base.model.name;\n\t\tif (!discriminatorDeclarations.has(baseDecl.base.key)) {\n\t\t\tconst qualified = baseDecl.namespaceId !== baseDecl.base.namespaceId;\n\t\t\tconst variantLabel = modelLabel(baseDecl.namespaceId, baseDecl.model.name, qualified);\n\t\t\tconst baseLabel = modelLabel(baseDecl.base.namespaceId, baseName, qualified);\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_ORPHANED_BASE\",\n\t\t\t\tmessage: `Model \"${variantLabel}\" declares @@base(${baseLabel}, ...) but \"${baseLabel}\" has no @@discriminator`,\n\t\t\t\t...baseDecl.source.at(baseDecl.span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (discriminatorDeclarations.has(variantKey)) continue;\n\t\tconst variantModel = patched[variantKey];\n\t\tif (!variantModel) continue;\n\t\tconst resolvedTable = storageName(getAttribute(baseDecl.model.attributes, \"map\") !== void 0 ? baseDecl.model : baseDecl.base.model, physicalNames);\n\t\tconst patchedVariant = {\n\t\t\t...variantModel,\n\t\t\tbase: crossRef(baseName, baseDecl.base.namespaceId),\n\t\t\t...resolvedTable ? { storage: {\n\t\t\t\t...variantModel.storage,\n\t\t\t\ttable: resolvedTable\n\t\t\t} } : {}\n\t\t};\n\t\tpatched = {\n\t\t\t...patched,\n\t\t\t[variantKey]: stripStorageOnlyDomainFields(patchedVariant, syntheticPkFieldsByVariant.get(variantKey) ?? [])\n\t\t};\n\t}\n\treturn patched;\n}\n/**\n* Multi-table-inheritance variants (`@@base` + their own `@@map`) live in a\n* separate table from their base. The ORM joins that table to the base on the\n* shared primary key (`base.id = variant.id`), so the variant storage table\n* must carry the base PK column even though the variant domain model declares\n* only its own fields. This enriches each MTI variant's `ModelNode` with that\n* link column, a primary key on it, and a FK back to the base table.\n*\n* The link column is reported back per variant in `syntheticPkFieldsByVariant`\n* so the domain-model patch can drop it again — keeping the variant's domain\n* surface thin (its create/read inputs don't gain a redundant `id`) while the\n* storage table stays joinable. Single-table-inheritance variants (no own\n* table) are left untouched.\n*/\nfunction materializeMtiVariantStorageLinks(modelNodes, baseDeclarations, stiVariantKeys, defaultNamespaceId) {\n\tconst keyOf = (node) => modelCoordinateKey(node.namespaceId ?? defaultNamespaceId, node.modelName);\n\tconst nodeByModel = new Map(modelNodes.map((node) => [keyOf(node), node]));\n\tconst syntheticPkFieldsByVariant = /* @__PURE__ */ new Map();\n\treturn {\n\t\tmodelNodes: modelNodes.map((node) => {\n\t\t\tconst variantKey = keyOf(node);\n\t\t\tconst baseDecl = baseDeclarations.get(variantKey);\n\t\t\tif (!baseDecl) return node;\n\t\t\tconst baseNode = nodeByModel.get(baseDecl.base.key);\n\t\t\tif (!baseNode) return node;\n\t\t\tif (stiVariantKeys.has(variantKey)) return node;\n\t\t\tconst basePrimaryKey = baseNode.id;\n\t\t\tif (!basePrimaryKey || basePrimaryKey.columns.length === 0) return node;\n\t\t\tconst existingColumns = new Set(node.fields.map((field) => field.columnName));\n\t\t\tconst linkFields = [];\n\t\t\tfor (const pkColumn of basePrimaryKey.columns) {\n\t\t\t\tif (existingColumns.has(pkColumn)) continue;\n\t\t\t\tconst baseField = baseNode.fields.find((field) => field.columnName === pkColumn);\n\t\t\t\tif (!baseField) continue;\n\t\t\t\tlinkFields.push({\n\t\t\t\t\tfieldName: baseField.fieldName,\n\t\t\t\t\tcolumnName: pkColumn,\n\t\t\t\t\tdescriptor: baseField.descriptor,\n\t\t\t\t\tnullable: false,\n\t\t\t\t\tmany: false\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (linkFields.length === 0) return node;\n\t\t\tsyntheticPkFieldsByVariant.set(variantKey, linkFields.map((field) => field.fieldName));\n\t\t\tconst foreignKey = {\n\t\t\t\tcolumns: basePrimaryKey.columns,\n\t\t\t\treferences: {\n\t\t\t\t\tmodel: baseNode.modelName,\n\t\t\t\t\ttable: baseNode.tableName,\n\t\t\t\t\tcolumns: basePrimaryKey.columns,\n\t\t\t\t\t...ifDefined(\"namespaceId\", baseNode.namespaceId)\n\t\t\t\t},\n\t\t\t\tconstraint: true,\n\t\t\t\tonDelete: \"cascade\"\n\t\t\t};\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tfields: [...linkFields, ...node.fields],\n\t\t\t\tid: { columns: basePrimaryKey.columns },\n\t\t\t\tforeignKeys: [...node.foreignKeys ?? [], foreignKey]\n\t\t\t};\n\t\t}),\n\t\tsyntheticPkFieldsByVariant\n\t};\n}\n/**\n* Single-table-inheritance variants (`@@base` with no own `@@map`) share the\n* base table: `resolvePolymorphism` points the variant's `storage.table` at the\n* base, and the ORM reads variant-declared fields straight off the base table.\n* For that to validate and round-trip, the base storage table must physically\n* carry every STI variant's declared columns. This enriches the base\n* `ModelNode` with those columns.\n*\n* The materialised columns are always nullable in storage: the base table hosts\n* every variant's rows, so a column a variant declares as required is still\n* NULL on sibling-variant rows. The variant's domain field keeps its declared\n* nullability — required-in-domain / nullable-in-storage is the intended STI\n* shape.\n*\n* Collisions (two variants declaring the same column, or a variant column name\n* clashing with a base column) are resolved skip-if-exists here, mirroring the\n* MTI link guard; surfacing them as diagnostics is tracked separately\n* (TML-2827).\n*/\nfunction materializeStiVariantStorageColumns(modelNodes, baseDeclarations, stiVariantKeys, defaultNamespaceId) {\n\tif (stiVariantKeys.size === 0) return {\n\t\tmodelNodes: [...modelNodes],\n\t\tstiBaseFieldsByBase: /* @__PURE__ */ new Map()\n\t};\n\tconst keyOf = (node) => modelCoordinateKey(node.namespaceId ?? defaultNamespaceId, node.modelName);\n\tconst nodeByModel = new Map(modelNodes.map((node) => [keyOf(node), node]));\n\tconst stiColumnsByBase = /* @__PURE__ */ new Map();\n\tfor (const variantKey of stiVariantKeys) {\n\t\tconst variantNode = nodeByModel.get(variantKey);\n\t\tconst baseDecl = baseDeclarations.get(variantKey);\n\t\tif (!variantNode || !baseDecl) continue;\n\t\tconst baseNode = nodeByModel.get(baseDecl.base.key);\n\t\tif (!baseNode) continue;\n\t\tconst baseColumns = new Set(baseNode.fields.map((field) => field.columnName));\n\t\tconst claimed = stiColumnsByBase.get(baseDecl.base.key) ?? [];\n\t\tconst claimedColumns = new Set(claimed.map((field) => field.columnName));\n\t\tfor (const field of variantNode.fields) {\n\t\t\tif (baseColumns.has(field.columnName) || claimedColumns.has(field.columnName)) continue;\n\t\t\tclaimedColumns.add(field.columnName);\n\t\t\tclaimed.push({\n\t\t\t\t...field,\n\t\t\t\tnullable: true\n\t\t\t});\n\t\t}\n\t\tstiColumnsByBase.set(baseDecl.base.key, claimed);\n\t}\n\tconst stiBaseFieldsByBase = /* @__PURE__ */ new Map();\n\tfor (const [baseName, columns] of stiColumnsByBase) stiBaseFieldsByBase.set(baseName, columns.map((field) => field.fieldName));\n\treturn {\n\t\tmodelNodes: modelNodes.map((node) => {\n\t\t\tif (stiVariantKeys.has(keyOf(node))) return {\n\t\t\t\t...node,\n\t\t\t\tsharesBaseTable: true\n\t\t\t};\n\t\t\tconst stiColumns = stiColumnsByBase.get(keyOf(node));\n\t\t\tif (!stiColumns || stiColumns.length === 0) return node;\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tfields: [...node.fields, ...stiColumns]\n\t\t\t};\n\t\t}),\n\t\tstiBaseFieldsByBase\n\t};\n}\n/**\n* Drop the storage-only link fields (added by\n* {@link materializeMtiVariantStorageLinks}) from a variant's domain model, so\n* the domain surface stays thin while the storage table keeps the link column.\n*/\nfunction stripStorageOnlyDomainFields(model, fieldNames) {\n\tif (fieldNames.length === 0) return model;\n\tconst fields = { ...model.fields };\n\tfor (const name of fieldNames) delete fields[name];\n\tconst storage = blindCast(model.storage);\n\tconst storageFields = { ...storage.fields };\n\tfor (const name of fieldNames) delete storageFields[name];\n\treturn {\n\t\t...model,\n\t\tfields,\n\t\tstorage: {\n\t\t\t...storage,\n\t\t\tfields: storageFields\n\t\t}\n\t};\n}\nfunction backrelationTargetSymbol(field, binder) {\n\tconst typeReference = typeReferenceNode(field);\n\tif (typeReference === void 0) return void 0;\n\tconst resolution = binder.symbolForNode(typeReference);\n\treturn resolution?.kind === \"model\" ? resolution.symbol : void 0;\n}\nfunction relationTargetKindLabel(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 \"namespace\":\n\t\tcase \"contributedNamespace\": return \"namespace\";\n\t\tcase \"contributedType\": return \"type\";\n\t\tdefault: return;\n\t}\n}\n/**\n* The relation a refusal of `index: \"<name>\"` belongs to, and the message to report there; `undefined` for every other error.\n*/\nfunction relationIndexRefusal(error, locations) {\n\tif (!isStructuredError(error) || error.meta?.[\"reason\"] !== FOREIGN_KEY_INDEX_UNRESOLVED) return;\n\tconst { namespaceId, tableName, columns, index } = error.meta ?? {};\n\tconst at = locations.find((candidate) => candidate.namespaceId === namespaceId && candidate.tableName === tableName && candidate.index === index && Array.isArray(columns) && candidate.columns.length === columns.length && candidate.columns.every((column, position) => column === columns[position]));\n\tif (at === void 0) return void 0;\n\treturn {\n\t\tat,\n\t\tmessage: error.fix === void 0 ? error.message : `${error.message} ${error.fix}`\n\t};\n}\nfunction interpretPslDocumentToSqlContract(input) {\n\tif (!input.target) throw new InternalError(\"PSL interpretation requires an explicit target context from composition.\");\n\tif (!input.scalarColumnDescriptors) throw new InternalError(\"PSL interpretation requires composed scalar type descriptors.\");\n\tconst [anchorDocument] = input.documents;\n\tassertDefined(anchorDocument, \"interpretPslDocumentToSqlContract requires at least one document\");\n\tconst source = diagnosticSource(input.sources, anchorDocument.syntax);\n\tconst diagnostics = createPslDiagnosticCollector(input.sources);\n\tconst modelAttributesByName = buildModelAttributesByName(input.authoringContributions);\n\tconst contributedModelSpecs = modelAttributeSpecsFrom(modelAttributesByName);\n\tconst composedPslBlockDescriptors = input.authoringContributions?.pslBlockDescriptors ?? {};\n\tconst { binder, dataTypes } = input;\n\tconst defaultFunctionRegistry = input.controlMutationDefaults?.defaultFunctionRegistry ?? /* @__PURE__ */ new Map();\n\tconst specContextFor = (model) => modelSpecContext({\n\t\tsymbols: input.symbolTable,\n\t\tmodel,\n\t\tdefaultFunctionRegistry,\n\t\tdataTypes\n\t});\n\tconst namespaceSymbols = Object.values(input.symbolTable.namespaces);\n\tvalidateNamespaceBlocksForSqlTarget({\n\t\tnamespaces: namespaceSymbols,\n\t\ttargetId: input.target.targetId,\n\t\tsource,\n\t\tsources: input.sources,\n\t\tbinder,\n\t\tdiagnostics\n\t});\n\tconst { parsedBlocks, diagnostics: blockDiagnostics } = interpretExtensionBlocks({\n\t\tsymbolTable: input.symbolTable,\n\t\tsources: input.sources,\n\t\tpslBlockDescriptors: composedPslBlockDescriptors,\n\t\tbinder,\n\t\tdataTypes\n\t});\n\tdiagnostics.push(...blockDiagnostics);\n\tvalidateBlockModelAttributeRequirements({\n\t\tparsedBlocks,\n\t\tpslBlockDescriptors: composedPslBlockDescriptors,\n\t\tsources: input.sources,\n\t\tdiagnostics\n\t});\n\tconst models = [];\n\tconst modelEntries = [];\n\tconst compositeTypes = [];\n\tfor (const namespace of namespaceSymbols) {\n\t\tfor (const model of Object.values(namespace.models)) {\n\t\t\tmodels.push(model);\n\t\t\tmodelEntries.push({\n\t\t\t\tmodel,\n\t\t\t\tnamespaceId: namespace.id\n\t\t\t});\n\t\t}\n\t\tcompositeTypes.push(...Object.values(namespace.compositeTypes));\n\t}\n\tconst physicalNames = /* @__PURE__ */ new Map();\n\tfor (const model of models) {\n\t\tconst mapNode = getAttribute(model.attributes, \"map\")?.node;\n\t\tconst mapped = mapNode === void 0 ? void 0 : interpretModelAttribute({\n\t\t\tnode: mapNode,\n\t\t\tsymbols: input.symbolTable,\n\t\t\tspec: sqlAttributeSpecs.model.map(specContextFor(model)),\n\t\t\tmodel,\n\t\t\tsources: input.sources,\n\t\t\tbinder,\n\t\t\tdiagnostics\n\t\t});\n\t\tphysicalNames.set(model, mapped?.name ?? defaultTableName(model.name));\n\t\tfor (const field of Object.values(model.fields)) {\n\t\t\tconst mapNode = getAttribute(field.attributes, \"map\")?.node;\n\t\t\tconst mapped = mapNode === void 0 ? void 0 : interpretFieldAttribute({\n\t\t\t\tnode: mapNode,\n\t\t\t\tsymbols: input.symbolTable,\n\t\t\t\tspec: sqlAttributeSpecs.field.map(fieldSpecContext({\n\t\t\t\t\t...specContextFor(model),\n\t\t\t\t\tfield,\n\t\t\t\t\tbinder\n\t\t\t\t})),\n\t\t\t\tmodel,\n\t\t\t\tfield,\n\t\t\t\tsources: input.sources,\n\t\t\t\tbinder,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tphysicalNames.set(field, mapped?.name ?? field.name);\n\t\t}\n\t}\n\tconst defaultNamespaceId = input.symbolTable.defaultNamespace.id;\n\tconst composedExtensions = new Set(input.composedExtensions ?? []);\n\tconst composedExtensionContracts = input.composedExtensionContracts;\n\tconst generatorDescriptors = input.controlMutationDefaults?.generatorDescriptors ?? [];\n\tconst generatorDescriptorById = /* @__PURE__ */ new Map();\n\tfor (const descriptor of generatorDescriptors) generatorDescriptorById.set(descriptor.id, descriptor);\n\tconst isEnumBlock = (block) => block.keyword === \"enum\";\n\tconst legitimateBlockKeywords = claimedBlockKeywords(input.authoringContributions?.pslBlockDescriptors);\n\tconst reportUnsupportedTopLevelBlock = (block) => {\n\t\tdiagnostics.push(unsupportedBlockDiagnostic(block, input.sources));\n\t};\n\tconst topLevelEnums = [];\n\tconst extensionBlocksByNamespace = /* @__PURE__ */ new Map();\n\tfor (const namespace of namespaceSymbols) {\n\t\tconst extensionBlocks = {};\n\t\textensionBlocksByNamespace.set(namespace, extensionBlocks);\n\t\tfor (const [blockName, block] of Object.entries(namespace.blocks)) {\n\t\t\tconst writtenNamespace = block.node.syntax.findAncestor(NamespaceDeclarationAst.cast);\n\t\t\tif (writtenNamespace === void 0) {\n\t\t\t\tif (!legitimateBlockKeywords.has(block.keyword)) reportUnsupportedTopLevelBlock(block);\n\t\t\t\telse if (isEnumBlock(block)) topLevelEnums.push(block);\n\t\t\t\telse extensionBlocks[blockName] = block;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\textensionBlocks[blockName] = block;\n\t\t\tif (isEnumBlock(block)) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_ENUM_NAMESPACE_NOT_SUPPORTED\",\n\t\t\t\t\tmessage: `enum \"${block.name}\" inside namespace \"${writtenNamespace.name()?.name() ?? namespace.name}\" is not supported; declare enum at the top level`,\n\t\t\t\t\t...diagnosticSource(input.sources, block.node.syntax).at(nodePslSpan(block.node.syntax, input.sources))\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!legitimateBlockKeywords.has(block.keyword)) reportUnsupportedTopLevelBlock(block);\n\t\t}\n\t}\n\tconst enumResult = processEnumDeclarations({\n\t\tenumBlocks: topLevelEnums,\n\t\tparsedBlocks,\n\t\tsource,\n\t\tauthoringContributions: input.authoringContributions,\n\t\tentityContext: {\n\t\t\tfamily: input.target.familyId,\n\t\t\ttarget: input.target.targetId,\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\t\tsourceId: source.sources.sourceFileFor(source.node).filename,\n\t\t\tdiagnostics: { push: (d) => {\n\t\t\t\tdiagnostics.pushExternal(blindCast(d));\n\t\t\t} },\n\t\t\treadWrittenNumber: ({ text, codecId, subject }) => {\n\t\t\t\tif (input.codecLookup.descriptorFor(codecId) === void 0) return void 0;\n\t\t\t\tconst reading = readWrittenNumberForCodec({\n\t\t\t\t\ttext,\n\t\t\t\t\tcodecId,\n\t\t\t\t\tcodecLookup: input.codecLookup,\n\t\t\t\t\tdataTypes: input.dataTypes,\n\t\t\t\t\tsubject\n\t\t\t\t});\n\t\t\t\treturn reading.ok ? reading : {\n\t\t\t\t\tok: false,\n\t\t\t\t\tmessage: reading.message\n\t\t\t\t};\n\t\t\t},\n\t\t\t...ifDefined(\"enumInferenceCodecs\", input.enumInferenceCodecs)\n\t\t},\n\t\tdiagnostics\n\t});\n\tconst allEnumTypeDescriptors = enumResult.enumTypeDescriptors;\n\tconst enumHandles = enumResult.enumHandles;\n\tconst validEnumHandles = Object.fromEntries(Array.from(enumHandles, ([symbol, handle]) => [symbol.name, handle]));\n\tconst entityTypesByDiscriminator = buildEntityTypesByDiscriminator(input.authoringContributions);\n\tconst authoringWarnings = [];\n\tconst extensionEntityContext = {\n\t\tfamily: input.target.familyId,\n\t\ttarget: input.target.targetId,\n\t\t...ifDefined(\"enumInferenceCodecs\", input.enumInferenceCodecs),\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\tsourceId: source.sources.sourceFileFor(source.node).filename,\n\t\tdiagnostics: { push: (d) => {\n\t\t\tdiagnostics.pushExternal(blindCast(d));\n\t\t} },\n\t\twarnings: authoringWarnings\n\t};\n\tconst namespaceIdByModel = new Map(modelEntries.map(({ model, namespaceId }) => [model, namespaceId]));\n\tconst modelCoordinateOf = (model) => {\n\t\tconst namespaceId = namespaceIdByModel.get(model);\n\t\treturn namespaceId === void 0 ? void 0 : {\n\t\t\tnamespaceId,\n\t\t\ttableName: storageName(model, physicalNames)\n\t\t};\n\t};\n\tconst namespaceExtensionEntities = /* @__PURE__ */ new Map();\n\tconst fileExtensionEntityRows = (rows, blocks) => {\n\t\tfor (const row of rows) {\n\t\t\tlet entities = namespaceExtensionEntities.get(row.namespaceId);\n\t\t\tif (entities === void 0) {\n\t\t\t\tentities = {};\n\t\t\t\tnamespaceExtensionEntities.set(row.namespaceId, entities);\n\t\t\t}\n\t\t\tconst slot = entities[row.entityKind] ?? {};\n\t\t\tentities[row.entityKind] = slot;\n\t\t\tif (Object.hasOwn(slot, row.key)) {\n\t\t\t\tconst block = Object.values(blocks).find((candidate) => candidate.name === row.key);\n\t\t\t\tinvariant(block !== void 0, \"Lowered entity has an owning block\");\n\t\t\t\tdiagnostics.pushUnlocated({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_EXTENSION_ENTITY\",\n\t\t\t\t\tmessage: `entries slot \"${row.entityKind}\" in namespace \"${row.namespaceId}\": entity \"${row.key}\" is declared more than once in the same namespace.`,\n\t\t\t\t\t...diagnosticSource(input.sources, block.node.syntax).at()\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tslot[row.key] = row.entity;\n\t\t}\n\t};\n\tfor (const [namespace, extensionBlocks] of extensionBlocksByNamespace) fileExtensionEntityRows(lowerExtensionBlocksForNamespace(extensionBlocks, namespace.id, entityTypesByDiscriminator, extensionEntityContext, parsedBlocks, modelCoordinateOf, input.sources), extensionBlocks);\n\tconst defaultNsExtensionValueSets = namespaceExtensionEntities.get(defaultNamespaceId)?.[\"valueSet\"];\n\tif (defaultNsExtensionValueSets !== void 0) {\n\t\tfor (const name of Object.keys(defaultNsExtensionValueSets)) if (Object.hasOwn(validEnumHandles, name)) {\n\t\t\tconst enumSymbol = input.symbolTable.defaultNamespace.blocks[name];\n\t\t\tinvariant(enumSymbol !== void 0, \"Domain enum has an owning block\");\n\t\t\tdiagnostics.pushUnlocated({\n\t\t\t\tcode: \"PSL_VALUE_SET_NAME_COLLISION\",\n\t\t\t\tmessage: `namespace \"${defaultNamespaceId}\": name \"${name}\" is declared both as a domain enum and as an extension entity that derives a value-set; rename one`,\n\t\t\t\t...diagnosticSource(input.sources, enumSymbol.node.syntax).at()\n\t\t\t});\n\t\t}\n\t}\n\tconst isScalarRefinement = (symbol) => {\n\t\tconst reference = typeReferenceNode(symbol);\n\t\treturn !symbol.isConstructor && symbol.baseType !== void 0 && reference !== void 0 && bareTypeConstructorOf(binder.symbolForNode(reference)) !== void 0;\n\t};\n\tconst allNamedTypes = Object.values(input.symbolTable.namedTypes);\n\tconst namedTypeResult = resolveNamedTypeDeclarations({\n\t\tdeclarations: [...allNamedTypes.filter(isScalarRefinement), ...allNamedTypes.filter((symbol) => !isScalarRefinement(symbol))],\n\t\tsource,\n\t\tbinder,\n\t\tenumTypeDescriptors: allEnumTypeDescriptors,\n\t\tcodecLookup: input.codecLookup,\n\t\tdiagnostics\n\t});\n\tconst storageTypes = { ...namedTypeResult.storageTypes };\n\tconst modelNodes = /* @__PURE__ */ new Map();\n\tconst fkRelationMetadata = [];\n\tconst relationIndexLocations = [];\n\tconst invalidFkPairings = [];\n\tconst backrelationCandidates = [];\n\tconst crossSpaceRelationsByModel = /* @__PURE__ */ new Map();\n\tconst modelAttributeEntitiesByNamespace = /* @__PURE__ */ new Map();\n\tconst valueObjects = buildValueObjectNodes({\n\t\tcompositeTypes,\n\t\tenumTypeDescriptors: allEnumTypeDescriptors,\n\t\tenumHandles,\n\t\tnamedTypeDescriptors: namedTypeResult.namedTypeDescriptors,\n\t\tnamedTypes: namedTypeResult.storageTypes,\n\t\tdiagnostics,\n\t\tsources: input.sources,\n\t\tdefaultNamespaceId,\n\t\tnamespaceExtensionEntities,\n\t\tcodecLookup: input.codecLookup,\n\t\tbinder\n\t});\n\tconst valueObjectTypes = {\n\t\tnodes: new Map(valueObjects.map((valueObject) => [valueObject.name, valueObject])),\n\t\tdeclaredMembers: new Map(compositeTypes.map((compositeType) => [compositeType.name, new Set(Object.keys(compositeType.fields))]))\n\t};\n\tfor (const { model, namespaceId } of modelEntries) {\n\t\tconst result = buildModelNodeFromPsl({\n\t\t\tmodel,\n\t\t\tphysicalNames,\n\t\t\tnamespaceId,\n\t\t\tvalueObjectTypes,\n\t\t\tenumTypeDescriptors: allEnumTypeDescriptors,\n\t\t\tnamedTypeDescriptors: namedTypeResult.namedTypeDescriptors,\n\t\t\tnamedTypes: namedTypeResult.storageTypes,\n\t\t\tcomposedExtensionContracts,\n\t\t\tfamilyId: input.target.familyId,\n\t\t\ttargetId: input.target.targetId,\n\t\t\tauthoringContributions: input.authoringContributions,\n\t\t\tdefaultFunctionRegistry,\n\t\t\tdataTypes,\n\t\t\tgeneratorDescriptorById,\n\t\t\tscalarColumnDescriptors: input.scalarColumnDescriptors,\n\t\t\tsources: input.sources,\n\t\t\tbinder,\n\t\t\tsymbolTable: input.symbolTable,\n\t\t\tdiagnostics,\n\t\t\tenumHandles,\n\t\t\tcapabilities: input.capabilities,\n\t\t\t...namespaceExtensionEntities.size > 0 ? { namespaceExtensionEntities } : {},\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tmodelAttributesByName,\n\t\t\tcontributedModelAttributeSpecs: contributedModelSpecs,\n\t\t\tparsedBlocks\n\t\t});\n\t\tmodelNodes.set(model, {\n\t\t\t...result.modelNode,\n\t\t\tnamespaceId\n\t\t});\n\t\tfkRelationMetadata.push(...result.fkRelationMetadata);\n\t\trelationIndexLocations.push(...result.relationIndexLocations);\n\t\tinvalidFkPairings.push(...result.invalidFkPairings);\n\t\tbackrelationCandidates.push(...result.backrelationCandidates);\n\t\tif (result.crossSpaceRelations.length > 0) {\n\t\t\tconst existing = crossSpaceRelationsByModel.get(model) ?? [];\n\t\t\tcrossSpaceRelationsByModel.set(model, [...existing, ...result.crossSpaceRelations]);\n\t\t}\n\t\tif (Object.keys(result.modelAttributeEntities).length > 0) {\n\t\t\tconst existingByAttribute = modelAttributeEntitiesByNamespace.get(namespaceId) ?? {};\n\t\t\tfor (const [attribute, keyed] of Object.entries(result.modelAttributeEntities)) existingByAttribute[attribute] = {\n\t\t\t\t...existingByAttribute[attribute] ?? {},\n\t\t\t\t...keyed\n\t\t\t};\n\t\t\tmodelAttributeEntitiesByNamespace.set(namespaceId, existingByAttribute);\n\t\t}\n\t}\n\tconst { modelRelations, fkRelationsByPair, fkRelationsByDeclaringModel } = indexFkRelations({ fkRelationMetadata });\n\tconst modelIdColumns = /* @__PURE__ */ new Map();\n\tconst modelUniqueColumnSets = /* @__PURE__ */ new Map();\n\tfor (const [model, modelNode] of modelNodes) {\n\t\tif (modelNode.id) modelIdColumns.set(model, modelNode.id.columns);\n\t\tconst uniqueColumnSets = [];\n\t\tif (modelNode.id) uniqueColumnSets.push(modelNode.id.columns);\n\t\tfor (const unique of modelNode.uniques ?? []) uniqueColumnSets.push(unique.columns);\n\t\tfor (const index of modelNode.indexes ?? []) if (index.unique === true && index.columns !== void 0 && index.where === void 0) uniqueColumnSets.push(index.columns);\n\t\tmodelUniqueColumnSets.set(model, uniqueColumnSets);\n\t}\n\tapplyBackrelationCandidates({\n\t\tbackrelationCandidates,\n\t\tfkRelationsByPair,\n\t\tinvalidFkPairings,\n\t\tfkRelationsByDeclaringModel,\n\t\tmodelIdColumns,\n\t\tmodelUniqueColumnSets,\n\t\tmodelRelations,\n\t\tdiagnostics,\n\t\tsources: input.sources\n\t});\n\tfor (const [modelName, relations] of crossSpaceRelationsByModel) {\n\t\tconst existing = modelRelations.get(modelName);\n\t\tif (existing) existing.push(...relations);\n\t\telse modelRelations.set(modelName, [...relations]);\n\t}\n\tconst { discriminatorDeclarations, baseDeclarations } = collectPolymorphismDeclarations(new Map(modelEntries.map(({ model, namespaceId }) => [model, {\n\t\tmodel,\n\t\tnamespaceId,\n\t\tkey: modelCoordinateKey(namespaceId, model.name)\n\t}])), input.symbolTable, input.sources, binder, specContextFor, input.scalarColumnDescriptors.get(\"String\")?.codecId, diagnostics);\n\tconst stiVariantKeys = /* @__PURE__ */ new Set();\n\tfor (const [variantKey, declaration] of baseDeclarations) if (!(getAttribute(declaration.model.attributes, \"map\") !== void 0)) stiVariantKeys.add(variantKey);\n\tfor (const variantKey of stiVariantKeys) {\n\t\tconst baseDecl = baseDeclarations.get(variantKey);\n\t\tinvariant(baseDecl !== void 0, `stiVariantKeys is derived from baseDeclarations.keys(), so \"${variantKey}\" must have a base declaration`);\n\t\tconst variantName = baseDecl.model.name;\n\t\tif (baseDecl.namespaceId !== baseDecl.base.namespaceId) {\n\t\t\tconst variantLabel = modelLabel(baseDecl.namespaceId, variantName, true);\n\t\t\tconst baseLabel = modelLabel(baseDecl.base.namespaceId, baseDecl.base.model.name, true);\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_BASE_IN_OTHER_NAMESPACE_WITHOUT_MAP\",\n\t\t\t\tmessage: `Model \"${variantLabel}\" declares @@base(${baseLabel}, ...) without @@map, so it would share the table of \"${baseLabel}\", which belongs to namespace \"${baseDecl.base.namespaceId}\". Add @@map to give \"${variantLabel}\" its own table.`,\n\t\t\t\t...baseDecl.source.at(baseDecl.span)\n\t\t\t});\n\t\t}\n\t\tfor (const attribute of baseDecl.model.attributes) {\n\t\t\tif (attribute.node.name()?.isSimpleName(\"check\") !== true) continue;\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: PSL_CHECK_ON_STI_VARIANT,\n\t\t\t\tmessage: `Model \"${variantName}\" declares \"@@check\", but it shares its base model \"${baseDecl.base.model.name}\"'s storage table (single-table inheritance via @@base) and has no table of its own to declare a check constraint on. Declare the check on \"${baseDecl.base.model.name}\" instead.`,\n\t\t\t\t...diagnosticSource(input.sources, attribute.node.syntax).at(nodePslSpan(attribute.node.syntax, input.sources))\n\t\t\t});\n\t\t}\n\t}\n\tconst { modelNodes: mtiLinkedModelNodes, syntheticPkFieldsByVariant } = materializeMtiVariantStorageLinks(Array.from(modelNodes, ([symbol, model]) => ({\n\t\t...model,\n\t\t...modelRelations.has(symbol) ? { relations: [...modelRelations.get(symbol) ?? []].sort((left, right) => compareStrings(left.fieldName, right.fieldName)) } : {}\n\t})), baseDeclarations, stiVariantKeys, defaultNamespaceId);\n\tconst { modelNodes: stiColumnModelNodes, stiBaseFieldsByBase } = materializeStiVariantStorageColumns(mtiLinkedModelNodes, baseDeclarations, stiVariantKeys, defaultNamespaceId);\n\tif (diagnostics.length > 0 || (input.seedDiagnostics?.length ?? 0) > 0) return notOk({\n\t\tsummary: \"PSL to SQL contract interpretation failed\",\n\t\tdiagnostics: [...input.seedDiagnostics ?? [], ...diagnostics.toExternal()]\n\t});\n\tconst { createNamespace } = input;\n\tconst createNamespaceWithExtensions = (nsInput) => {\n\t\tconst entities = namespaceExtensionEntities.get(nsInput.id);\n\t\tconst attributeEntities = modelAttributeEntitiesByNamespace.get(nsInput.id);\n\t\tif (entities === void 0 && attributeEntities === void 0) return createNamespace(nsInput);\n\t\tif (attributeEntities !== void 0) {\n\t\t\tfor (const slot of Object.keys(attributeEntities)) if (Object.hasOwn(nsInput.entries, slot) || entities !== void 0 && slot in entities) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `entries slot \"${slot}\" in namespace \"${nsInput.id}\" is contributed by both a model attribute and a block/base entry kind. A model-attribute entries key must be unique across the namespace's entry kinds.`, { meta: {\n\t\t\t\tslot,\n\t\t\t\tnamespaceId: nsInput.id\n\t\t\t} });\n\t\t}\n\t\tconst mergedValueSet = {\n\t\t\t...nsInput.entries[\"valueSet\"],\n\t\t\t...entities?.[\"valueSet\"]\n\t\t};\n\t\tconst extended = {\n\t\t\t...nsInput,\n\t\t\tentries: {\n\t\t\t\t...nsInput.entries,\n\t\t\t\t...entities,\n\t\t\t\t...attributeEntities,\n\t\t\t\t...Object.keys(mergedValueSet).length > 0 ? { valueSet: mergedValueSet } : {}\n\t\t\t}\n\t\t};\n\t\treturn createNamespace(extended);\n\t};\n\tlet contract;\n\ttry {\n\t\tcontract = buildSqlContractFromDefinition({\n\t\t\ttarget: input.target,\n\t\t\tcapabilities: input.capabilities,\n\t\t\twarnings: authoringWarnings.length > 0 ? authoringWarnings : void 0,\n\t\t\t...ifDefined(\"extensions\", buildComposedExtensionPackRefs(input.target, [...composedExtensions].sort(compareStrings), input.composedExtensionPackRefs)),\n\t\t\t...Object.keys(storageTypes).length > 0 ? { storageTypes } : {},\n\t\t\t...Object.keys(validEnumHandles).length > 0 ? { enums: validEnumHandles } : {},\n\t\t\t...namespaceExtensionEntities.size > 0 ? { namespaces: [...namespaceExtensionEntities.keys()] } : {},\n\t\t\tcreateNamespace: createNamespaceWithExtensions,\n\t\t\t...ifDefined(\"valueObjects\", valueObjects.length > 0 ? valueObjects : void 0),\n\t\t\tmodels: stiColumnModelNodes\n\t\t}, input.codecLookup, input.dataTypes.lookup);\n\t} catch (error) {\n\t\tconst refusal = relationIndexRefusal(error, relationIndexLocations);\n\t\tif (refusal === void 0) throw error;\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_RELATION_ATTRIBUTE\",\n\t\t\tmessage: refusal.message,\n\t\t\t...refusal.at.location\n\t\t});\n\t\treturn notOk({\n\t\t\tsummary: \"PSL to SQL contract interpretation failed\",\n\t\t\tdiagnostics: diagnostics.toExternal()\n\t\t});\n\t}\n\tconst modelsByCoordinate = {};\n\tfor (const [namespaceId, namespaceSlice] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespaceSlice.models)) {\n\t\tconst coordinate = modelCoordinateKey(namespaceId, modelName);\n\t\tinvariant(!Object.hasOwn(modelsByCoordinate, coordinate), `symbol table guarantees coordinate uniqueness; duplicate model \"${namespaceId}.${modelName}\" reached interpretation`);\n\t\tmodelsByCoordinate[coordinate] = model;\n\t}\n\tconst polyDiagnostics = createPslDiagnosticCollector(input.sources);\n\tconst polymorphicModels = resolvePolymorphism(modelsByCoordinate, physicalNames, discriminatorDeclarations, baseDeclarations, syntheticPkFieldsByVariant, stiBaseFieldsByBase, polyDiagnostics);\n\tif (polyDiagnostics.length > 0) return notOk({\n\t\tsummary: \"PSL to SQL contract interpretation failed\",\n\t\tdiagnostics: polyDiagnostics.toExternal()\n\t});\n\tconst filteredRoots = Object.fromEntries(Object.entries(contract.roots).filter(([, crossReference]) => !baseDeclarations.has(modelCoordinateKey(crossReference.namespace, crossReference.model))));\n\treturn ok({\n\t\t...contract,\n\t\troots: filteredRoots,\n\t\tdomain: { namespaces: Object.fromEntries(Object.entries(contract.domain.namespaces).map(([namespaceId, namespaceSlice]) => [namespaceId, {\n\t\t\tmodels: Object.fromEntries(Object.entries(namespaceSlice.models).map(([modelName, model]) => [modelName, polymorphicModels[modelCoordinateKey(namespaceId, modelName)] ?? model])),\n\t\t\t...ifDefined(\"enum\", namespaceSlice.enum),\n\t\t\t...ifDefined(\"valueObjects\", namespaceSlice.valueObjects)\n\t\t}])) }\n\t});\n}\n//#endregion\nexport { normalizeReferentialAction as a, indexFkRelations as i, interpretPslDocumentToSqlContract as n, applyBackrelationCandidates as r, buildEntityTypesByDiscriminator as t };\n\n//# sourceMappingURL=interpreter-CFj2aTEP.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,qBAAqB,YAAY,qBAAqB;CAC9D,IAAI,YAAY,SAAS,SAAS,OAAO,oBAAoB,IAAI,WAAW,MAAM;CAClF,MAAM,SAAS,sBAAsB,UAAU;CAC/C,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI,oCAAoC,QAAQ,CAAC,CAAC;AACnF;AACA,SAAS,4BAA4B,OAAO;CAC3C,IAAI,mCAAmC;CACvC,KAAK,MAAM,aAAa,MAAM,YAAY,YAAY;EACrD,IAAI,UAAU,KAAK,WAAW,KAAK,GAAG;GACrC,MAAM,YAAY,KAAK;IACtB,MAAM;IACN,SAAS,kCAAkC,SAAS;IACpD,GAAG,MAAM,OAAO,GAAG,UAAU,IAAI;GAClC,CAAC;GACD,mCAAmC;GACnC;EACD;EACA,MAAM,YAAY,KAAK;GACtB,MAAM;GACN,SAAS,eAAe,MAAM,YAAY,KAAK,gCAAgC,UAAU,KAAK;GAC9F,GAAG,MAAM,OAAO,GAAG,UAAU,IAAI;EAClC,CAAC;EACD,mCAAmC;CACpC;CACA,OAAO;AACR;AACA,SAAS,6BAA6B,OAAO;CAC5C,MAAM,qBAAqB,CAAC;CAC5B,MAAM,uCAAuC,IAAI,IAAI;CACrD,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AAC,aAAa;GACxI,QAAQ,OAAO,YAAY,OAAO,QAAQ,eAAe,MAAM,CAAC,CAAC,KAAK,CAAC,WAAW,WAAW,CAAC,WAAW,kBAAkB,mBAAmB,aAAa,SAAS,MAAM,KAAK,CAAC,CAAC;GACjL,GAAG,UAAU,QAAQ,eAAe,IAAI;GACxC,GAAG,UAAU,gBAAgB,eAAe,YAAY;EACzD,CAAC,CAAC,CAAC,EAAE;CACN,CAAC;AACF"}
@@ -1,6 +1,7 @@
1
1
  import { c as SqlNamespaceInput, d as SqlStorageTypeEntry, l as SqlStorage } from "./sql-storage-tZhB8nS5-8NSWT0TW.mjs";
2
2
  import "./types-DMfBh16_.mjs";
3
3
  import { AnyEntityKindDescriptor, Namespace } from "@prisma/orm-framework/components/ir";
4
+ import { DataTypeLookup } from "@prisma/orm-framework/components/codec";
4
5
  import { Contract } from "@prisma/orm-framework/contract/types";
5
6
  import { ContractSerializer, SchemaDiffIssue, SchemaVerifier, SchemaVerifyOptions, SchemaVerifyResult } from "@prisma/orm-framework/components/control";
6
7
  import { JsonObject } from "@prisma/orm-framework/utils/json";
@@ -33,9 +34,10 @@ type SqlEntityHydrationFactory = (entry: unknown) => unknown;
33
34
  */
34
35
  declare abstract class SqlContractSerializerBase<TContract extends Contract<SqlStorage>> implements ContractSerializer<TContract> {
35
36
  protected readonly entityHydrationRegistry: ReadonlyMap<string, SqlEntityHydrationFactory>;
37
+ private readonly dataTypes;
36
38
  private readonly contractSchema;
37
39
  private readonly entryKinds;
38
- constructor(entityHydrationRegistry?: ReadonlyMap<string, SqlEntityHydrationFactory>, packEntityKinds?: readonly AnyEntityKindDescriptor[]);
40
+ constructor(entityHydrationRegistry?: ReadonlyMap<string, SqlEntityHydrationFactory>, packEntityKinds?: readonly AnyEntityKindDescriptor[], dataTypes?: Pick<DataTypeLookup, 'get'> | undefined);
39
41
  deserializeContract<T extends TContract = TContract>(json: unknown): T;
40
42
  serializeContract(contract: TContract): JsonObject;
41
43
  shouldPreserveEmpty: import("@prisma/orm-framework/contract/hashing").PreserveEmptyPredicate;
@@ -124,4 +126,4 @@ declare abstract class SqlSchemaVerifierBase<TContract, TSchema> implements Sche
124
126
  }
125
127
  //#endregion
126
128
  export { SqlSchemaVerifierBase as i, SqlContractSerializerBase as n, SqlEntityHydrationFactory as r, SqlContractSerializer as t };
127
- //# sourceMappingURL=ir-D0Vpm5O9.d.mts.map
129
+ //# sourceMappingURL=ir-DgNo535E.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir-DgNo535E.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/ir.d.mts"],"mappings":";;;;;;;;;KAOK,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;uBAyBX,0BAA0B,kBAAkB,SAAS,wBAAwB,mBAAmB;qBAClG,yBAAyB,oBAAoB;mBAC/C;mBACA;mBACA;EACjB,YAAY,0BAA0B,oBAAoB,4BAA4B,2BAA2B,2BAA2B,YAAY,KAAK;EAC7J,oBAAoB,UAAU,YAAY,WAAW,gBAAgB;EACrE,kBAAkB,UAAU,YAAY;EACxC,0DAA0D;EAC1D,kDAAkD;EAClD;aACW,0DAA0D;aAC1D,kDAAkD;;YAEnD,0BAA0B,gBAAgB,SAAS;YACnD,kBAAkB,WAAW,SAAS,cAAc,SAAS;YAC7D,uBAAuB,YAAY,SAAS,eAAe,4BAA4B,SAAS,eAAe;YAC/G,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;YAClF,wBAAwB,OAAO,sBAAsB;YACrD,wBAAwB,UAAU,SAAS,cAAc;;;;;;;;;;;YAWzD,0BAA0B,SAAS,SAAS,eAAe,SAAS,6BAA6B,eAAe,eAAe;UACjI;YACE,oBAAoB,iBAAiB;UACvC;;;;;;;;;;;;;;;;;;cAkBI,8BAA8B,0BAA0B,SAAS;EAC7E;;;;;;;;;;;;;;;;;;;;;;;;uBAwBqB,sBAAsB,WAAW,oBAAoB,eAAe,WAAW;EACpG,aAAa,SAAS,oBAAoB,WAAW,WAAW;;;;;;;qBAO7C,sBAAsB,SAAS,oBAAoB,WAAW,oBAAoB;;;;;;qBAMlF,uBAAuB,SAAS,oBAAoB,WAAW,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ir-I-xciGUH.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/ir.mjs"],"sourcesContent":["import { n as SqlContractSerializerBase, t as SqlContractSerializer } from \"./sql-contract-serializer-DDaAVCQr.mjs\";\n//#region src/core/ir/sql-schema-verifier-base.ts\n/**\n* SQL family `SchemaVerifier` abstract base. Centralises the SQL-shared\n* walk (table-by-table + column-by-column matching keyed by\n* `(namespace.id, name)`, FK / unique / index comparisons via the\n* shared satisfaction helpers in `sql-schema-diff.ts`) and exposes a protected hook\n* for target extensions (Postgres functions, RLS policies, future\n* target-only kinds).\n*\n* The base accumulates issues in a single buffer and returns the\n* combined result; the per-SPI family abstract handles the result\n* envelope shape so concrete subclasses focus on target-specific\n* verification logic.\n*\n* The protected hooks (`verifyCommonSqlSchema`,\n* `verifyTargetExtensions`) carry the stable base API that target\n* subclasses (`PostgresSchemaVerifier`, `SqliteSchemaVerifier`)\n* compile against; the SQL-shared walk implementation will be lifted\n* into this base when the verifier behaviour migrates off the\n* legacy adapter shells.\n*/\nvar SqlSchemaVerifierBase = class {\n\tverifySchema(options) {\n\t\tconst issues = [];\n\t\tissues.push(...this.verifyCommonSqlSchema(options));\n\t\tissues.push(...this.verifyTargetExtensions(options));\n\t\treturn {\n\t\t\tok: issues.length === 0,\n\t\t\tissues\n\t\t};\n\t}\n};\n//#endregion\nexport { SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase };\n\n//# sourceMappingURL=ir.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,IAAI,wBAAwB,MAAM;CACjC,aAAa,SAAS;EACrB,MAAM,SAAS,CAAC;EAChB,OAAO,KAAK,GAAG,KAAK,sBAAsB,OAAO,CAAC;EAClD,OAAO,KAAK,GAAG,KAAK,uBAAuB,OAAO,CAAC;EACnD,OAAO;GACN,IAAI,OAAO,WAAW;GACtB;EACD;CACD;AACD"}
1
+ {"version":3,"file":"ir-I-xciGUH.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/ir.mjs"],"sourcesContent":["import { n as SqlContractSerializerBase, t as SqlContractSerializer } from \"./sql-contract-serializer-sMY3prTx.mjs\";\n//#region src/core/ir/sql-schema-verifier-base.ts\n/**\n* SQL family `SchemaVerifier` abstract base. Centralises the SQL-shared\n* walk (table-by-table + column-by-column matching keyed by\n* `(namespace.id, name)`, FK / unique / index comparisons via the\n* shared satisfaction helpers in `sql-schema-diff.ts`) and exposes a protected hook\n* for target extensions (Postgres functions, RLS policies, future\n* target-only kinds).\n*\n* The base accumulates issues in a single buffer and returns the\n* combined result; the per-SPI family abstract handles the result\n* envelope shape so concrete subclasses focus on target-specific\n* verification logic.\n*\n* The protected hooks (`verifyCommonSqlSchema`,\n* `verifyTargetExtensions`) carry the stable base API that target\n* subclasses (`PostgresSchemaVerifier`, `SqliteSchemaVerifier`)\n* compile against; the SQL-shared walk implementation will be lifted\n* into this base when the verifier behaviour migrates off the\n* legacy adapter shells.\n*/\nvar SqlSchemaVerifierBase = class {\n\tverifySchema(options) {\n\t\tconst issues = [];\n\t\tissues.push(...this.verifyCommonSqlSchema(options));\n\t\tissues.push(...this.verifyTargetExtensions(options));\n\t\treturn {\n\t\t\tok: issues.length === 0,\n\t\t\tissues\n\t\t};\n\t}\n};\n//#endregion\nexport { SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase };\n\n//# sourceMappingURL=ir.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,IAAI,wBAAwB,MAAM;CACjC,aAAa,SAAS;EACrB,MAAM,SAAS,CAAC;EAChB,OAAO,KAAK,GAAG,KAAK,sBAAsB,OAAO,CAAC;EAClD,OAAO,KAAK,GAAG,KAAK,uBAAuB,OAAO,CAAC;EACnD,OAAO;GACN,IAAI,OAAO,WAAW;GACtB;EACD;CACD;AACD"}
@@ -0,0 +1 @@
1
+ import "./middleware-oCT0RWkt-AFlRNCOD.mjs";
@@ -1,6 +1,6 @@
1
- import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-BgBp89vP.mjs";
1
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-Dam5yMZg-Bc_eneSz.mjs";
2
2
  import { ParamRefMutator } from "@prisma/orm-framework/components/runtime";
3
- //#region ../../../2-sql/4-lanes/relational-core/dist/middleware-YsFLC19Y.d.mts
3
+ //#region ../../../2-sql/4-lanes/relational-core/dist/middleware-oCT0RWkt.d.mts
4
4
  //#region src/middleware/param-ref-mutator.d.ts
5
5
  /**
6
6
  * Brand applied to {@link ParamRefHandle} so user-constructed handles
@@ -116,4 +116,4 @@ interface SqlParamRefMutatorInternal<TCodecMap extends Record<string, unknown> =
116
116
  declare function createSqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<string, unknown>>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap>;
117
117
  //#endregion
118
118
  export { SqlParamRefMutatorInternal as a, SqlParamRefMutator as i, ParamRefEntryUnion as n, createSqlParamRefMutator as o, ParamRefHandle as r, ParamRefEntry as t };
119
- //# sourceMappingURL=middleware-YsFLC19Y-5mJZCBWq.d.mts.map
119
+ //# sourceMappingURL=middleware-oCT0RWkt-AFlRNCOD.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"middleware-YsFLC19Y-5mJZCBWq.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/middleware-YsFLC19Y.d.mts"],"mappings":";;;;;;;;;;;;;;cAac;;;;;;;;;;UAUJ,eAAe;YACb,sBAAsB;;;;;;;UAOxB,cAAc;WACb,KAAK,eAAe;WACpB;WACA,SAAS;;;;;;;;;;KAUf,mBAAmB,kBAAkB,8BAA8B,WAAW,qBAAqB,cAAc,YAAY,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;UAyB9I,mBAAmB,kBAAkB,0BAA0B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