@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
@@ -18,7 +18,7 @@ function namedOutputRef(output, input) {
18
18
  function resultNullability(descriptor) {
19
19
  return descriptor.nullable ? { nullable: true } : {
20
20
  nullable: false,
21
- emptyResultJson: descriptor.emptyResultJson
21
+ emptyResultWire: descriptor.emptyResultWire
22
22
  };
23
23
  }
24
24
  /**
@@ -32,7 +32,7 @@ function buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {
32
32
  for (const candidate of descriptors) {
33
33
  if (!isSqlAggregateDescriptor(candidate)) throw structuredError("RUNTIME.AGGREGATE_DESCRIPTOR_INVALID", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {
34
34
  why: "Aggregate resolution reads a declared operation, input match, result codec, and nullability — plus, for a non-nullable result, the empty-result value; a lowering hook, where present, must be callable.",
35
- fix: "Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultJson` where `nullable` is false.",
35
+ fix: "Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultWire` where `nullable` is false.",
36
36
  meta: { descriptor: describeCandidate(candidate) }
37
37
  });
38
38
  const key = aggregateDescriptorKey(candidate);
@@ -123,4 +123,4 @@ function describeCandidate(value) {
123
123
  //#endregion
124
124
  export { isSqlAggregateDescriptor as n, buildSqlAggregateDescriptorRegistry as t };
125
125
 
126
- //# sourceMappingURL=aggregate-descriptor-registry-DrJ1vHEo.mjs.map
126
+ //# sourceMappingURL=aggregate-descriptor-registry-Dd7Uj7DJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate-descriptor-registry-DrJ1vHEo.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as aggregateFnNames, H as isAggregateFn, Y as frozenCodecRef } from \"../types-NTQsD2MS.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from \"@internal/framework-components/components\";\n//#region src/aggregate-descriptor.ts\n/** Structural validation of a contributed SQL aggregate descriptor: the declarative shape plus a callable lowering hook where one is declared. */\nfunction isSqlAggregateDescriptor(value) {\n\tif (!isAggregateDescriptor(value)) return false;\n\treturn !(\"lower\" in value) || value.lower === void 0 || typeof value.lower === \"function\";\n}\n//#endregion\n//#region src/aggregate-descriptor-registry.ts\nfunction namedOutputRef(output, input) {\n\treturn frozenCodecRef({\n\t\tcodecId: output.codecId,\n\t\t...ifDefined(\"typeParams\", output.typeParams?.(input))\n\t});\n}\n/** The descriptor's own answer for a result set carrying no row, carried into resolution unchanged. */\nfunction resultNullability(descriptor) {\n\treturn descriptor.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultJson: descriptor.emptyResultJson\n\t};\n}\n/**\n* Validate every contributed aggregate descriptor and settle its matches against the composed codec set.\n*\n* Validation covers the descriptor's own shape, the lowering rule — an operation outside the closed SQL aggregate alphabet must carry a `lower` hook, there being no plain `AggregateExpr` form for it — a second claim on one `(operation, input)` pair, and two trait descriptors that both claim a registered codec for one operation — the last of which only a composed stack can detect, which is why it is settled here rather than at contribution.\n*/\nfunction buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {\n\tconst validated = [];\n\tconst claimedKeys = /* @__PURE__ */ new Set();\n\tfor (const candidate of descriptors) {\n\t\tif (!isSqlAggregateDescriptor(candidate)) throw structuredError(\"RUNTIME.AGGREGATE_DESCRIPTOR_INVALID\", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {\n\t\t\twhy: \"Aggregate resolution reads a declared operation, input match, result codec, and nullability — plus, for a non-nullable result, the empty-result value; a lowering hook, where present, must be callable.\",\n\t\t\tfix: \"Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultJson` where `nullable` is false.\",\n\t\t\tmeta: { descriptor: describeCandidate(candidate) }\n\t\t});\n\t\tconst key = aggregateDescriptorKey(candidate);\n\t\tif (!isAggregateFn(candidate.operation) && candidate.lower === void 0) throw structuredError(\"RUNTIME.AGGREGATE_LOWERING_MISSING\", `Aggregate descriptor '${key}' declares operation '${candidate.operation}', which is outside the SQL aggregate alphabet (${[...aggregateFnNames].join(\", \")}) and carries no lowering hook.`, {\n\t\t\twhy: \"An operation in the alphabet lowers to a plain aggregate call; renderers know no other operation, so any other name must build its expression through a `lower` hook from existing nodes.\",\n\t\t\tfix: \"Declare a `lower` hook on the descriptor, or use an operation name from the SQL aggregate alphabet.\",\n\t\t\tmeta: {\n\t\t\t\toperation: candidate.operation,\n\t\t\t\tkey\n\t\t\t}\n\t\t});\n\t\tif (claimedKeys.has(key)) throw structuredError(\"RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR\", `Duplicate aggregate descriptor for '${key}'.`, {\n\t\t\twhy: \"Each operation/input pair resolves to exactly one result codec, so exactly one component may claim it.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: { key }\n\t\t});\n\t\tclaimedKeys.add(key);\n\t\tvalidated.push(candidate);\n\t}\n\tconst settled = settleAggregateOverloads(validated, codecDescriptors.values());\n\tconst ambiguity = settled.ambiguities[0];\n\tif (ambiguity !== void 0) throw structuredError(\"RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR\", `Ambiguous aggregate descriptors for '${ambiguity.operation}' over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(\", \")} all claim it.`, {\n\t\twhy: \"A codec advertising several claimed traits leaves the result codec undetermined.\",\n\t\tfix: `Contribute an exact descriptor for '${ambiguity.operation}' over '${ambiguity.codecId}', or narrow the overlapping trait contributions.`,\n\t\tmeta: {\n\t\t\toperation: ambiguity.operation,\n\t\t\tcodecId: ambiguity.codecId,\n\t\t\ttraits: ambiguity.traits\n\t\t}\n\t});\n\tfor (const descriptor of validated) {\n\t\tconst outputCodecId = descriptor.output.kind === \"codec\" ? descriptor.output.codecId : descriptor.input.kind === \"codec\" ? descriptor.input.codecId : void 0;\n\t\tif (outputCodecId !== void 0 && codecDescriptors.descriptorFor(outputCodecId) === void 0) {\n\t\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING\", `Aggregate descriptor '${key}' names result codec '${outputCodecId}', which the composed stack does not register.`, {\n\t\t\t\twhy: \"A resolved aggregate decodes its result through the declared codec; a codec the stack does not compose cannot decode anything.\",\n\t\t\t\tfix: \"Register the codec on the composed stack, or declare a result codec the stack composes.\",\n\t\t\t\tmeta: {\n\t\t\t\t\toperation: descriptor.operation,\n\t\t\t\t\tkey,\n\t\t\t\t\toutputCodecId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tconst tables = /* @__PURE__ */ new Map();\n\tfor (const [operation, entry] of settled.operations) tables.set(operation, {\n\t\twithoutInput: resolveWithoutInput(operation, entry.noInput) ?? resolveWithoutInput(operation, entry.anyInput),\n\t\tbyCodecId: entry.byCodecId,\n\t\tanyInput: entry.anyInput\n\t});\n\treturn {\n\t\tresolve(operation, input) {\n\t\t\tconst table = tables.get(operation);\n\t\t\tif (table === void 0) return void 0;\n\t\t\tif (input === void 0) return table.withoutInput;\n\t\t\tconst descriptor = table.byCodecId.get(input.codecId) ?? table.anyInput;\n\t\t\tif (descriptor === void 0) return void 0;\n\t\t\treturn {\n\t\t\t\toperation,\n\t\t\t\toutput: descriptor.output.kind === \"self\" ? frozenCodecRef(input) : namedOutputRef(descriptor.output, input),\n\t\t\t\t...resultNullability(descriptor),\n\t\t\t\tlower: descriptor.lower\n\t\t\t};\n\t\t},\n\t\t*values() {\n\t\t\tyield* validated;\n\t\t}\n\t};\n}\n/**\n* Resolve the overload that answers a call carrying no input. Both kinds that qualify name their result codec outright, there being no input codec to reuse.\n*/\nfunction resolveWithoutInput(operation, descriptor) {\n\tif (descriptor === void 0) return void 0;\n\tif (!isNoInputAggregateDescriptor(descriptor) && !isAnyInputAggregateDescriptor(descriptor)) return;\n\treturn {\n\t\toperation,\n\t\toutput: namedOutputRef(descriptor.output, void 0),\n\t\t...resultNullability(descriptor),\n\t\tlower: descriptor.lower\n\t};\n}\nfunction describeCandidate(value) {\n\tif (typeof value === \"object\" && value !== null && \"operation\" in value) return `'${String(value.operation)}'`;\n\treturn `of type ${typeof value}`;\n}\n//#endregion\nexport { buildSqlAggregateDescriptorRegistry, isSqlAggregateDescriptor };\n\n//# sourceMappingURL=aggregate-descriptor-registry.mjs.map"],"mappings":";;;;;;AAMA,SAAS,yBAAyB,OAAO;CACxC,IAAI,CAAC,sBAAsB,KAAK,GAAG,OAAO;CAC1C,OAAO,EAAE,WAAW,UAAU,MAAM,UAAU,KAAK,KAAK,OAAO,MAAM,UAAU;AAChF;AAGA,SAAS,eAAe,QAAQ,OAAO;CACtC,OAAO,eAAe;EACrB,SAAS,OAAO;EAChB,GAAG,UAAU,cAAc,OAAO,aAAa,KAAK,CAAC;CACtD,CAAC;AACF;;AAEA,SAAS,kBAAkB,YAAY;CACtC,OAAO,WAAW,WAAW,EAAE,UAAU,KAAK,IAAI;EACjD,UAAU;EACV,iBAAiB,WAAW;CAC7B;AACD;;;;;;AAMA,SAAS,oCAAoC,aAAa,kBAAkB;CAC3E,MAAM,YAAY,CAAC;CACnB,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,aAAa,aAAa;EACpC,IAAI,CAAC,yBAAyB,SAAS,GAAG,MAAM,gBAAgB,wCAAwC,qBAAqB,kBAAkB,SAAS,EAAE,4CAA4C;GACrM,KAAK;GACL,KAAK;GACL,MAAM,EAAE,YAAY,kBAAkB,SAAS,EAAE;EAClD,CAAC;EACD,MAAM,MAAM,uBAAuB,SAAS;EAC5C,IAAI,CAAC,cAAc,UAAU,SAAS,KAAK,UAAU,UAAU,KAAK,GAAG,MAAM,gBAAgB,sCAAsC,yBAAyB,IAAI,wBAAwB,UAAU,UAAU,kDAAkD,CAAC,GAAG,gBAAgB,CAA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Q;EAC5G,WAAW,MAAM;EACjB,UAAU,MAAM;CACjB,CAAC;CACD,OAAO;EACN,QAAQ,WAAW,OAAO;GACzB,MAAM,QAAQ,OAAO,IAAI,SAAS;GAClC,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;GAClC,IAAI,UAAU,KAAK,GAAG,OAAO,MAAM;GACnC,MAAM,aAAa,MAAM,UAAU,IAAI,MAAM,OAAO,KAAK,MAAM;GAC/D,IAAI,eAAe,KAAK,GAAG,OAAO,KAAK;GACvC,OAAO;IACN;IACA,QAAQ,WAAW,OAAO,SAAS,SAAS,eAAe,KAAK,IAAI,eAAe,WAAW,QAAQ,KAAK;IAC3G,GAAG,kBAAkB,UAAU;IAC/B,OAAO,WAAW;GACnB;EACD;EACA,CAAC,SAAS;GACT,OAAO;EACR;CACD;AACD;;;;AAIA,SAAS,oBAAoB,WAAW,YAAY;CACnD,IAAI,eAAe,KAAK,GAAG,OAAO,KAAK;CACvC,IAAI,CAAC,6BAA6B,UAAU,KAAK,CAAC,8BAA8B,UAAU,GAAG;CAC7F,OAAO;EACN;EACA,QAAQ,eAAe,WAAW,QAAQ,KAAK,CAAC;EAChD,GAAG,kBAAkB,UAAU;EAC/B,OAAO,WAAW;CACnB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,eAAe,OAAO,OAAO,IAAI,OAAO,MAAM,SAAS,EAAE;CAC5G,OAAO,WAAW,OAAO;AAC1B"}
1
+ {"version":3,"file":"aggregate-descriptor-registry-Dd7Uj7DJ.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as aggregateFnNames, H as isAggregateFn, Y as frozenCodecRef } from \"../types-NTQsD2MS.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from \"@internal/framework-components/components\";\n//#region src/aggregate-descriptor.ts\n/** Structural validation of a contributed SQL aggregate descriptor: the declarative shape plus a callable lowering hook where one is declared. */\nfunction isSqlAggregateDescriptor(value) {\n\tif (!isAggregateDescriptor(value)) return false;\n\treturn !(\"lower\" in value) || value.lower === void 0 || typeof value.lower === \"function\";\n}\n//#endregion\n//#region src/aggregate-descriptor-registry.ts\nfunction namedOutputRef(output, input) {\n\treturn frozenCodecRef({\n\t\tcodecId: output.codecId,\n\t\t...ifDefined(\"typeParams\", output.typeParams?.(input))\n\t});\n}\n/** The descriptor's own answer for a result set carrying no row, carried into resolution unchanged. */\nfunction resultNullability(descriptor) {\n\treturn descriptor.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultWire: descriptor.emptyResultWire\n\t};\n}\n/**\n* Validate every contributed aggregate descriptor and settle its matches against the composed codec set.\n*\n* Validation covers the descriptor's own shape, the lowering rule — an operation outside the closed SQL aggregate alphabet must carry a `lower` hook, there being no plain `AggregateExpr` form for it — a second claim on one `(operation, input)` pair, and two trait descriptors that both claim a registered codec for one operation — the last of which only a composed stack can detect, which is why it is settled here rather than at contribution.\n*/\nfunction buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {\n\tconst validated = [];\n\tconst claimedKeys = /* @__PURE__ */ new Set();\n\tfor (const candidate of descriptors) {\n\t\tif (!isSqlAggregateDescriptor(candidate)) throw structuredError(\"RUNTIME.AGGREGATE_DESCRIPTOR_INVALID\", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {\n\t\t\twhy: \"Aggregate resolution reads a declared operation, input match, result codec, and nullability — plus, for a non-nullable result, the empty-result value; a lowering hook, where present, must be callable.\",\n\t\t\tfix: \"Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultWire` where `nullable` is false.\",\n\t\t\tmeta: { descriptor: describeCandidate(candidate) }\n\t\t});\n\t\tconst key = aggregateDescriptorKey(candidate);\n\t\tif (!isAggregateFn(candidate.operation) && candidate.lower === void 0) throw structuredError(\"RUNTIME.AGGREGATE_LOWERING_MISSING\", `Aggregate descriptor '${key}' declares operation '${candidate.operation}', which is outside the SQL aggregate alphabet (${[...aggregateFnNames].join(\", \")}) and carries no lowering hook.`, {\n\t\t\twhy: \"An operation in the alphabet lowers to a plain aggregate call; renderers know no other operation, so any other name must build its expression through a `lower` hook from existing nodes.\",\n\t\t\tfix: \"Declare a `lower` hook on the descriptor, or use an operation name from the SQL aggregate alphabet.\",\n\t\t\tmeta: {\n\t\t\t\toperation: candidate.operation,\n\t\t\t\tkey\n\t\t\t}\n\t\t});\n\t\tif (claimedKeys.has(key)) throw structuredError(\"RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR\", `Duplicate aggregate descriptor for '${key}'.`, {\n\t\t\twhy: \"Each operation/input pair resolves to exactly one result codec, so exactly one component may claim it.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: { key }\n\t\t});\n\t\tclaimedKeys.add(key);\n\t\tvalidated.push(candidate);\n\t}\n\tconst settled = settleAggregateOverloads(validated, codecDescriptors.values());\n\tconst ambiguity = settled.ambiguities[0];\n\tif (ambiguity !== void 0) throw structuredError(\"RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR\", `Ambiguous aggregate descriptors for '${ambiguity.operation}' over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(\", \")} all claim it.`, {\n\t\twhy: \"A codec advertising several claimed traits leaves the result codec undetermined.\",\n\t\tfix: `Contribute an exact descriptor for '${ambiguity.operation}' over '${ambiguity.codecId}', or narrow the overlapping trait contributions.`,\n\t\tmeta: {\n\t\t\toperation: ambiguity.operation,\n\t\t\tcodecId: ambiguity.codecId,\n\t\t\ttraits: ambiguity.traits\n\t\t}\n\t});\n\tfor (const descriptor of validated) {\n\t\tconst outputCodecId = descriptor.output.kind === \"codec\" ? descriptor.output.codecId : descriptor.input.kind === \"codec\" ? descriptor.input.codecId : void 0;\n\t\tif (outputCodecId !== void 0 && codecDescriptors.descriptorFor(outputCodecId) === void 0) {\n\t\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING\", `Aggregate descriptor '${key}' names result codec '${outputCodecId}', which the composed stack does not register.`, {\n\t\t\t\twhy: \"A resolved aggregate decodes its result through the declared codec; a codec the stack does not compose cannot decode anything.\",\n\t\t\t\tfix: \"Register the codec on the composed stack, or declare a result codec the stack composes.\",\n\t\t\t\tmeta: {\n\t\t\t\t\toperation: descriptor.operation,\n\t\t\t\t\tkey,\n\t\t\t\t\toutputCodecId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tconst tables = /* @__PURE__ */ new Map();\n\tfor (const [operation, entry] of settled.operations) tables.set(operation, {\n\t\twithoutInput: resolveWithoutInput(operation, entry.noInput) ?? resolveWithoutInput(operation, entry.anyInput),\n\t\tbyCodecId: entry.byCodecId,\n\t\tanyInput: entry.anyInput\n\t});\n\treturn {\n\t\tresolve(operation, input) {\n\t\t\tconst table = tables.get(operation);\n\t\t\tif (table === void 0) return void 0;\n\t\t\tif (input === void 0) return table.withoutInput;\n\t\t\tconst descriptor = table.byCodecId.get(input.codecId) ?? table.anyInput;\n\t\t\tif (descriptor === void 0) return void 0;\n\t\t\treturn {\n\t\t\t\toperation,\n\t\t\t\toutput: descriptor.output.kind === \"self\" ? frozenCodecRef(input) : namedOutputRef(descriptor.output, input),\n\t\t\t\t...resultNullability(descriptor),\n\t\t\t\tlower: descriptor.lower\n\t\t\t};\n\t\t},\n\t\t*values() {\n\t\t\tyield* validated;\n\t\t}\n\t};\n}\n/**\n* Resolve the overload that answers a call carrying no input. Both kinds that qualify name their result codec outright, there being no input codec to reuse.\n*/\nfunction resolveWithoutInput(operation, descriptor) {\n\tif (descriptor === void 0) return void 0;\n\tif (!isNoInputAggregateDescriptor(descriptor) && !isAnyInputAggregateDescriptor(descriptor)) return;\n\treturn {\n\t\toperation,\n\t\toutput: namedOutputRef(descriptor.output, void 0),\n\t\t...resultNullability(descriptor),\n\t\tlower: descriptor.lower\n\t};\n}\nfunction describeCandidate(value) {\n\tif (typeof value === \"object\" && value !== null && \"operation\" in value) return `'${String(value.operation)}'`;\n\treturn `of type ${typeof value}`;\n}\n//#endregion\nexport { buildSqlAggregateDescriptorRegistry, isSqlAggregateDescriptor };\n\n//# sourceMappingURL=aggregate-descriptor-registry.mjs.map"],"mappings":";;;;;;AAMA,SAAS,yBAAyB,OAAO;CACxC,IAAI,CAAC,sBAAsB,KAAK,GAAG,OAAO;CAC1C,OAAO,EAAE,WAAW,UAAU,MAAM,UAAU,KAAK,KAAK,OAAO,MAAM,UAAU;AAChF;AAGA,SAAS,eAAe,QAAQ,OAAO;CACtC,OAAO,eAAe;EACrB,SAAS,OAAO;EAChB,GAAG,UAAU,cAAc,OAAO,aAAa,KAAK,CAAC;CACtD,CAAC;AACF;;AAEA,SAAS,kBAAkB,YAAY;CACtC,OAAO,WAAW,WAAW,EAAE,UAAU,KAAK,IAAI;EACjD,UAAU;EACV,iBAAiB,WAAW;CAC7B;AACD;;;;;;AAMA,SAAS,oCAAoC,aAAa,kBAAkB;CAC3E,MAAM,YAAY,CAAC;CACnB,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,aAAa,aAAa;EACpC,IAAI,CAAC,yBAAyB,SAAS,GAAG,MAAM,gBAAgB,wCAAwC,qBAAqB,kBAAkB,SAAS,EAAE,4CAA4C;GACrM,KAAK;GACL,KAAK;GACL,MAAM,EAAE,YAAY,kBAAkB,SAAS,EAAE;EAClD,CAAC;EACD,MAAM,MAAM,uBAAuB,SAAS;EAC5C,IAAI,CAAC,cAAc,UAAU,SAAS,KAAK,UAAU,UAAU,KAAK,GAAG,MAAM,gBAAgB,sCAAsC,yBAAyB,IAAI,wBAAwB,UAAU,UAAU,kDAAkD,CAA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AoB,WAAW,MAAM,QAAQ;EAC5G,WAAW,MAAM;EACjB,UAAU,MAAM;CACjB,CAAC;CACD,OAAO;EACN,QAAQ,WAAW,OAAO;GACzB,MAAM,QAAQ,OAAO,IAAI,SAAS;GAClC,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;GAClC,IAAI,UAAU,KAAK,GAAG,OAAO,MAAM;GACnC,MAAM,aAAa,MAAM,UAAU,IAAI,MAAM,OAAO,KAAK,MAAM;GAC/D,IAAI,eAAe,KAAK,GAAG,OAAO,KAAK;GACvC,OAAO;IACN;IACA,QAAQ,WAAW,OAAO,SAAS,SAAS,eAAe,KAAK,IAAI,eAAe,WAAW,QAAQ,KAAK;IAC3G,GAAG,kBAAkB,UAAU;IAC/B,OAAO,WAAW;GACnB;EACD;EACA,CAAC,SAAS;GACT,OAAO;EACR;CACD;AACD;;;;AAIA,SAAS,oBAAoB,WAAW,YAAY;CACnD,IAAI,eAAe,KAAK,GAAG,OAAO,KAAK;CACvC,IAAI,CAAC,6BAA6B,UAAU,KAAK,CAAC,8BAA8B,UAAU,GAAG;CAC7F,OAAO;EACN;EACA,QAAQ,eAAe,WAAW,QAAQ,KAAK,CAAC;EAChD,GAAG,kBAAkB,UAAU;EAC/B,OAAO,WAAW;CACnB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,eAAe,OAAO,OAAO,IAAI,OAAO,MAAM,SAAS,EAAE;CAC5G,OAAO,WAAW,OAAO;AAC1B"}
@@ -2,22 +2,33 @@ import { H as frozenCodecRef } from "./types-NTQsD2MS-DAP2yVDn.mjs";
2
2
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { withoutTrailing } from "@prisma/orm-framework/utils/text";
5
- import { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, decodeJsonFloat, decodeJsonInteger, decodeJsonString, encodeJsonFloat } from "@prisma/orm-framework/components/codec";
6
- import { isInternalError } from "@prisma/orm-framework/utils/internal-error";
5
+ import { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from "@prisma/orm-framework/components/codec";
6
+ import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
7
7
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/ast.mjs
8
8
  /**
9
- * Reads a column's literal default with the column's codec, built with its type parameters, and encodes it for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.
9
+ * Reads a column's literal default as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.
10
10
  *
11
- * A `Date` is the one authored value JSON has no notation for, so it is encoded as it is. A `null` the codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a codec that reads `null` (a JSON codec) makes it the JSON value null. Any other value the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.
11
+ * A `Date` is the one authored value JSON has no notation for, so the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.
12
12
  */
13
13
  async function encodeLiteralDefault(codecLookup, codecRef, value, where) {
14
14
  const codec = codecForRef(codecLookup, codecRef);
15
15
  if (codec === void 0) return void 0;
16
- if (value instanceof Date) return {
16
+ const refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);
17
+ if (value instanceof Date) return encodeDate(codec, value, refused);
18
+ return encodeWithCodec(codec, codecRef, value, refused);
19
+ }
20
+ async function encodeDate(codec, value, refused) {
21
+ let decoded;
22
+ try {
23
+ decoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));
24
+ } catch (error) {
25
+ if (isInternalError(error)) throw error;
26
+ throw refused(error);
27
+ }
28
+ return {
17
29
  kind: "wire",
18
- wire: await codec.encode(value, {})
30
+ wire: await codec.toWire(decoded, {})
19
31
  };
20
- return encodeWithCodec(codec, value, (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause));
21
32
  }
22
33
  /**
23
34
  * Reads and encodes each element of a list column's literal default with the column's codec, as {@link encodeLiteralDefault} does a single value, so a `null` element the codec refuses is SQL NULL. `undefined` when no codec descriptor has the column's codec id. An element the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column and the element's 1-based position.
@@ -25,12 +36,12 @@ async function encodeLiteralDefault(codecLookup, codecRef, value, where) {
25
36
  async function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {
26
37
  const codec = codecForRef(codecLookup, codecRef);
27
38
  if (codec === void 0) return void 0;
28
- return Promise.all(elements.map((element, index) => encodeWithCodec(codec, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));
39
+ return Promise.all(elements.map((element, index) => encodeWithCodec(codec, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));
29
40
  }
30
- async function encodeWithCodec(codec, value, refused) {
41
+ async function encodeWithCodec(codec, codecRef, value, refused) {
31
42
  let decoded;
32
43
  try {
33
- decoded = codec.decodeJson(value);
44
+ decoded = readContractValue(codec, value, codecRef.typeParams);
34
45
  } catch (error) {
35
46
  if (isInternalError(error)) throw error;
36
47
  if (value === null) return { kind: "sql-null" };
@@ -38,7 +49,7 @@ async function encodeWithCodec(codec, value, refused) {
38
49
  }
39
50
  return {
40
51
  kind: "wire",
41
- wire: await codec.encode(decoded, {})
52
+ wire: await codec.toWire(decoded, {})
42
53
  };
43
54
  }
44
55
  function refusedDefault(where, codecId, value, elementPosition, cause) {
@@ -165,18 +176,32 @@ const sqlFloatEncode = (value) => value;
165
176
  const sqlFloatDecode = (wire) => wire;
166
177
  const sqlTextEncode = (value) => value;
167
178
  const sqlTextDecode = (wire) => wire;
179
+ /**
180
+ * The six SQL base codecs (TML-2357).
181
+ *
182
+ * Each codec ships as three artifacts:
183
+ *
184
+ * 1. A `SqlXCodec` class extending {@link CodecImpl} that wraps the module-level wire conversions exported from `sql-codec-helpers.ts` (the single source of truth for runtime behaviour). 2. A `SqlXDescriptor` class extending {@link CodecDescriptorTemplateImpl} declaring the codec id, traits, target types, and params schema; the data type is left to the target that adapts the template, which builds the codec with that type. 3. A per-codec column helper (`sqlXColumn`)
185
+ * that calls `descriptor.factory(...)` directly and packages the result into a {@link ColumnSpec} via the framework {@link column} packager. The helper is tied to its descriptor with `satisfies ColumnHelperFor`.
186
+ *
187
+ * After TML-2357 this file is the canonical source of SQL base codec metadata and runtime behaviour — the legacy `mkCodec` / `defineCodec` carriers retired with the deletion sweep.
188
+ */
189
+ /** A family codec has no data type of its own, so only a target that adapts it, naming its data type, builds its codec. A column helper below names the codec for a contract; the target's adapted descriptor builds it. */
190
+ function unadapted(codecId) {
191
+ throw new InternalError(`${codecId} is a SQL family template. A target adapts it with its own data type and builds its codecs; the template builds none.`);
192
+ }
168
193
  var SqlTextCodec = class extends CodecImpl {
169
- async encode(value, _ctx) {
194
+ async toWire(value, _ctx) {
170
195
  return sqlTextEncode(value);
171
196
  }
172
- async decode(wire, _ctx) {
197
+ async fromWire(wire, _ctx) {
173
198
  return sqlTextDecode(wire);
174
199
  }
175
- encodeJson(value) {
176
- return value;
200
+ fromDataTypeValue(value) {
201
+ return value.value;
177
202
  }
178
- decodeJson(json) {
179
- return decodeJsonString(this.id, json);
203
+ toDataTypeValue(input) {
204
+ return this.dataTypeValueOf(input);
180
205
  }
181
206
  };
182
207
  var SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {
@@ -188,23 +213,24 @@ var SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {
188
213
  ];
189
214
  paramsSchema = void 0;
190
215
  factory() {
191
- return () => new SqlTextCodec(this);
216
+ return () => unadapted(this.codecId);
192
217
  }
193
218
  };
194
219
  const sqlTextDescriptor = new SqlTextDescriptor();
195
220
  const sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);
196
221
  var SqlIntCodec = class extends CodecImpl {
197
- async encode(value, _ctx) {
222
+ async toWire(value, _ctx) {
198
223
  return sqlIntEncode(value);
199
224
  }
200
- async decode(wire, _ctx) {
225
+ async fromWire(wire, _ctx) {
201
226
  return sqlIntDecode(wire);
202
227
  }
203
- encodeJson(value) {
204
- return value;
228
+ /** A `number` holds an integer exactly only within the safe integer range. */
229
+ fromDataTypeValue(value) {
230
+ return readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);
205
231
  }
206
- decodeJson(json) {
207
- return decodeJsonInteger(this.id, json, SAFE_INTEGER_RANGE);
232
+ toDataTypeValue(input) {
233
+ return this.dataTypeValueOf(input);
208
234
  }
209
235
  };
210
236
  var SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {
@@ -216,23 +242,23 @@ var SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {
216
242
  ];
217
243
  paramsSchema = void 0;
218
244
  factory() {
219
- return () => new SqlIntCodec(this);
245
+ return () => unadapted(this.codecId);
220
246
  }
221
247
  };
222
248
  const sqlIntDescriptor = new SqlIntDescriptor();
223
249
  const sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);
224
250
  var SqlFloatCodec = class extends CodecImpl {
225
- async encode(value, _ctx) {
251
+ async toWire(value, _ctx) {
226
252
  return sqlFloatEncode(value);
227
253
  }
228
- async decode(wire, _ctx) {
254
+ async fromWire(wire, _ctx) {
229
255
  return sqlFloatDecode(wire);
230
256
  }
231
- encodeJson(value) {
232
- return encodeJsonFloat(value);
257
+ fromDataTypeValue(value) {
258
+ return readJsonFloat(this.id, value.value);
233
259
  }
234
- decodeJson(json) {
235
- return decodeJsonFloat(this.id, json);
260
+ toDataTypeValue(input) {
261
+ return this.dataTypeValueOf(floatToJson(input));
236
262
  }
237
263
  };
238
264
  var SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {
@@ -244,23 +270,23 @@ var SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {
244
270
  ];
245
271
  paramsSchema = void 0;
246
272
  factory() {
247
- return () => new SqlFloatCodec(this);
273
+ return () => unadapted(this.codecId);
248
274
  }
249
275
  };
250
276
  const sqlFloatDescriptor = new SqlFloatDescriptor();
251
277
  const sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);
252
278
  var SqlCharCodec = class extends CodecImpl {
253
- async encode(value, _ctx) {
279
+ async toWire(value, _ctx) {
254
280
  return sqlCharEncode(value);
255
281
  }
256
- async decode(wire, _ctx) {
282
+ async fromWire(wire, _ctx) {
257
283
  return sqlCharDecode(wire);
258
284
  }
259
- encodeJson(value) {
260
- return value;
285
+ fromDataTypeValue(value) {
286
+ return value.value;
261
287
  }
262
- decodeJson(json) {
263
- return decodeJsonString(this.id, json);
288
+ toDataTypeValue(input) {
289
+ return this.dataTypeValueOf(input);
264
290
  }
265
291
  };
266
292
  var SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {
@@ -272,23 +298,23 @@ var SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {
272
298
  ];
273
299
  paramsSchema = void 0;
274
300
  factory(_params) {
275
- return () => new SqlCharCodec(this);
301
+ return () => unadapted(this.codecId);
276
302
  }
277
303
  };
278
304
  const sqlCharDescriptor = new SqlCharDescriptor();
279
305
  const sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);
280
306
  var SqlVarcharCodec = class extends CodecImpl {
281
- async encode(value, _ctx) {
307
+ async toWire(value, _ctx) {
282
308
  return sqlVarcharEncode(value);
283
309
  }
284
- async decode(wire, _ctx) {
310
+ async fromWire(wire, _ctx) {
285
311
  return sqlVarcharDecode(wire);
286
312
  }
287
- encodeJson(value) {
288
- return value;
313
+ fromDataTypeValue(value) {
314
+ return value.value;
289
315
  }
290
- decodeJson(json) {
291
- return decodeJsonString(this.id, json);
316
+ toDataTypeValue(input) {
317
+ return this.dataTypeValueOf(input);
292
318
  }
293
319
  };
294
320
  var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
@@ -300,7 +326,7 @@ var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
300
326
  ];
301
327
  paramsSchema = void 0;
302
328
  factory(_params) {
303
- return () => new SqlVarcharCodec(this);
329
+ return () => unadapted(this.codecId);
304
330
  }
305
331
  };
306
332
  const sqlVarcharDescriptor = new SqlVarcharDescriptor();
@@ -308,4 +334,4 @@ const sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(pa
308
334
  //#endregion
309
335
  export { sqlFloatColumn as A, sqlTextDescriptor as B, lockStrengthCapabilities as C, sqlCharDecode as D, sqlCharColumn as E, sqlIntDecode as F, sqlVarcharEncode as G, sqlVarcharColumn as H, sqlIntDescriptor as I, sqlIntEncode as L, sqlFloatDescriptor as M, sqlFloatEncode as N, sqlCharDescriptor as O, sqlIntColumn as P, sqlTextColumn as R, lockOptionCapabilities as S, missingCapability as T, sqlVarcharDecode as U, sqlTextEncode as V, sqlVarcharDescriptor as W, SqlVarcharCodec as _, SQL_FLOAT_CODEC_ID as a, encodeLiteralDefault as b, SQL_VARCHAR_CODEC_ID as c, SqlFloatCodec as d, SqlFloatDescriptor as f, SqlTextDescriptor as g, SqlTextCodec as h, SQL_CHAR_CODEC_ID as i, sqlFloatDecode as j, sqlCharEncode as k, SqlCharCodec as l, SqlIntDescriptor as m, JsonDocumentProjection as n, SQL_INT_CODEC_ID as o, SqlIntCodec as p, NativeJsonValueProjection as r, SQL_TEXT_CODEC_ID as s, CodecJsonValueProjection as t, SqlCharDescriptor as u, SqlVarcharDescriptor as v, lockWaitPolicyOf as w, lockIncompatible as x, encodeListLiteralDefault as y, sqlTextDecode as z };
310
336
 
311
- //# sourceMappingURL=ast-BDwGvnKK.mjs.map
337
+ //# sourceMappingURL=ast-CBO3PEJF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-CBO3PEJF.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.mjs"],"sourcesContent":["import { A as ParamRef, B as aggregateFnNames, C as LiteralExpr, D as OperationExpr, E as NullCheckExpr, F as SelectAst, G as isQueryAst, H as isAggregateFn, I as SubqueryExpr, J as whereExprKinds, K as isWhereExpr, L as TableSource, M as ProjectionItem, N as RawExpr, O as OrExpr, P as RawQueryAst, R as UpdateAst, S as ListExpression, T as NotExpr, U as isOrderByDirection, V as checkLimitOffset, W as isOrderByNulls, Y as frozenCodecRef, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as PreparedParamRef, k as OrderByItem, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, q as queryAstKinds, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as LockingClause, x as JsonObjectExpr, y as JoinAst, z as WindowFuncExpr } from \"../types-NTQsD2MS.mjs\";\nimport { a as DdlColumn, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as CheckExpressionConstraint, l as FunctionColumnDefault, n as opaqueSql, o as DdlColumnDefault, p as isDdlNode, r as renderOpaqueSql, s as DdlNode, t as OpaqueSql, u as LiteralColumnDefault } from \"../opaque-sql-Dset3kln.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-BBgcP3gI.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from \"@internal/framework-components/codec\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { withoutTrailing } from \"@internal/utils/text\";\n//#region src/ast/ddl-default.ts\n/**\n* Reads a column's literal default as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.\n*\n* A `Date` is the one authored value JSON has no notation for, so the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.\n*/\nasync function encodeLiteralDefault(codecLookup, codecRef, value, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\tconst refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);\n\tif (value instanceof Date) return encodeDate(codec, value, refused);\n\treturn encodeWithCodec(codec, codecRef, value, refused);\n}\nasync function encodeDate(codec, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\n/**\n* Reads and encodes each element of a list column's literal default with the column's codec, as {@link encodeLiteralDefault} does a single value, so a `null` element the codec refuses is SQL NULL. `undefined` when no codec descriptor has the column's codec id. An element the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column and the element's 1-based position.\n*/\nasync function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\treturn Promise.all(elements.map((element, index) => encodeWithCodec(codec, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));\n}\nasync function encodeWithCodec(codec, codecRef, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = readContractValue(codec, value, codecRef.typeParams);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tif (value === null) return { kind: \"sql-null\" };\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\nfunction refusedDefault(where, codecId, value, elementPosition, cause) {\n\tconst reason = cause instanceof Error ? cause.message : String(cause);\n\tconst subject = elementPosition === void 0 ? \"default\" : `default (element ${elementPosition})`;\n\treturn structuredError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${where.table}\".\"${where.column}\" has a ${subject} its codec ${codecId} refuses: ${reason}`, {\n\t\twhy: \"A contract.json that an earlier version emitted, or a migration.ts it planned, can hold a default that this version's codec refuses, and so can either file after a hand edit.\",\n\t\tfix: \"If contract.json holds the default, emit the contract again with this version, and correct the default in the contract source if emit refuses it. If a migration.ts sets it, correct it in that file.\",\n\t\tcause,\n\t\tmeta: {\n\t\t\ttable: where.table,\n\t\t\tcolumn: where.column,\n\t\t\tcodecId,\n\t\t\tvalue,\n\t\t\t...ifDefined(\"elementPosition\", elementPosition),\n\t\t\treason: \"codec-refused-default\"\n\t\t}\n\t});\n}\n//#endregion\n//#region src/ast/json-value-projection.ts\nvar JsonValueProjection = class {\n\tvalue;\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tfold(folder) {\n\t\treturn this.value.fold(folder);\n\t}\n\tcollectColumnRefs() {\n\t\treturn this.value.collectColumnRefs();\n\t}\n\tcollectParamRefs() {\n\t\treturn this.value.collectParamRefs();\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {\n\tkind = \"codec\";\n\tcodec;\n\tconstructor(value, codec) {\n\t\tsuper(value);\n\t\tthis.codec = frozenCodecRef(codec);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.codec(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);\n\t}\n};\nvar NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {\n\tkind = \"native\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.native(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new NativeJsonValueProjection(this.value.rewrite(rewriter));\n\t}\n};\nvar JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {\n\tkind = \"document\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.document(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new JsonDocumentProjection(this.value.rewrite(rewriter));\n\t}\n};\n//#endregion\n//#region src/ast/locking.ts\n/** The `ORM.LOCK_INCOMPATIBLE` error for a lock refused because of `conflict`. */\nfunction lockIncompatible(conflict, message) {\n\treturn structuredError(\"ORM.LOCK_INCOMPATIBLE\", message, { meta: { conflict } });\n}\n/** The capability each lock strength needs. */\nconst lockStrengthCapabilities = {\n\tforUpdate: { sql: { forUpdate: true } },\n\tforNoKeyUpdate: { postgres: { forNoKeyUpdate: true } },\n\tforShare: { sql: { forShare: true } },\n\tforKeyShare: { postgres: { forKeyShare: true } }\n};\n/** The capability each locking option needs; the wait-policy keys equal the `LockWaitPolicy` values. */\nconst lockOptionCapabilities = {\n\tof: { sql: { lockOf: true } },\n\tnowait: { sql: { lockNowait: true } },\n\tskipLocked: { sql: { lockSkipLocked: true } }\n};\n/** The first flag in `requirement` that `capabilities` does not report as `true`, as `group.flag`. */\nfunction missingCapability(capabilities, requirement) {\n\tfor (const [group, flags] of Object.entries(requirement)) for (const flag of Object.keys(flags)) if (capabilities[group]?.[flag] !== true) return `${group}.${flag}`;\n}\n/** Turns `{ nowait, skipLocked }` into a wait policy, refusing both together with `ORM.ARGUMENT_INVALID`. */\nfunction lockWaitPolicyOf(methodName, options) {\n\tif (options?.nowait && options.skipLocked) throw structuredError(\"ORM.ARGUMENT_INVALID\", `${methodName}() takes nowait or skipLocked, not both`, { meta: { method: methodName } });\n\tif (options?.nowait) return \"nowait\";\n\tif (options?.skipLocked) return \"skipLocked\";\n}\n//#endregion\n//#region src/ast/sql-codec-helpers.ts\n/**\n* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).\n*\n* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.\n*/\nconst SQL_CHAR_CODEC_ID = \"sql/char@1\";\nconst SQL_VARCHAR_CODEC_ID = \"sql/varchar@1\";\nconst SQL_INT_CODEC_ID = \"sql/int@1\";\nconst SQL_FLOAT_CODEC_ID = \"sql/float@1\";\nconst SQL_TEXT_CODEC_ID = \"sql/text@1\";\nconst sqlCharEncode = (value) => value;\n/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */\nconst sqlCharDecode = (wire) => withoutTrailing(wire, \" \");\nconst sqlVarcharEncode = (value) => value;\nconst sqlVarcharDecode = (wire) => wire;\nconst sqlIntEncode = (value) => value;\nconst sqlIntDecode = (wire) => wire;\nconst sqlFloatEncode = (value) => value;\nconst sqlFloatDecode = (wire) => wire;\nconst sqlTextEncode = (value) => value;\nconst sqlTextDecode = (wire) => wire;\n//#endregion\n//#region src/ast/sql-codecs.ts\n/**\n* The six SQL base codecs (TML-2357).\n*\n* Each codec ships as three artifacts:\n*\n* 1. A `SqlXCodec` class extending {@link CodecImpl} that wraps the module-level wire conversions exported from `sql-codec-helpers.ts` (the single source of truth for runtime behaviour). 2. A `SqlXDescriptor` class extending {@link CodecDescriptorTemplateImpl} declaring the codec id, traits, target types, and params schema; the data type is left to the target that adapts the template, which builds the codec with that type. 3. A per-codec column helper (`sqlXColumn`)\n* that calls `descriptor.factory(...)` directly and packages the result into a {@link ColumnSpec} via the framework {@link column} packager. The helper is tied to its descriptor with `satisfies ColumnHelperFor`.\n*\n* After TML-2357 this file is the canonical source of SQL base codec metadata and runtime behaviour — the legacy `mkCodec` / `defineCodec` carriers retired with the deletion sweep.\n*/\n/** A family codec has no data type of its own, so only a target that adapts it, naming its data type, builds its codec. A column helper below names the codec for a contract; the target's adapted descriptor builds it. */\nfunction unadapted(codecId) {\n\tthrow new InternalError(`${codecId} is a SQL family template. A target adapts it with its own data type and builds its codecs; the template builds none.`);\n}\nvar SqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);\nvar SqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\t/** A `number` holds an integer exactly only within the safe integer range. */\n\tfromDataTypeValue(value) {\n\t\treturn readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloat(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(input));\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_FLOAT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);\nvar SqlCharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_CHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_VARCHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);\n//#endregion\nexport { AggregateExpr, AndExpr, BinaryExpr, CaseExpr, CastExpr, CheckExpressionConstraint, CodecJsonValueProjection, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawQueryAst, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, aggregateFnNames, checkLimitOffset, collectOrderedParamRefs, compact, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, whereExprKinds };\n\n//# sourceMappingURL=ast.mjs.map"],"mappings":";;;;;;;;;;;;AAcA,eAAe,qBAAqB,aAAa,UAAU,OAAO,OAAO;CACxE,MAAM,QAAQ,YAAY,aAAa,QAAQ;CAC/C,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,MAAM,WAAW,UAAU,eAAe,OAAO,SAAS,SAAS,OAAO,KAAK,GAAG,KAAK;CACvF,IAAI,iBAAiB,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO;CAClE,OAAO,gBAAgB,OAAO,UAAU,OAAO,OAAO;AACvD;AACA,eAAe,WAAW,OAAO,OAAO,SAAS;CAChD,IAAI;CACJ,IAAI;EACH,UAAU,MAAM,kBAAkB,MAAM,gBAAgB,KAAK,CAAC;CAC/D,SAAS,OAAO;EACf,IAAI,gBAAgB,KAAK,GAAG,MAAM;EAClC,MAAM,QAAQ,KAAK;CACpB;CACA,OAA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AK;CACpB,QAAQ,SAAS;EAChB,aAAa,UAAU,KAAK,OAAO;CACpC;AACD;AACA,MAAM,uBAAuB,IAAI,qBAAqB;AACtD,MAAM,oBAAoB,SAAS,CAAC,MAAM,OAAO,qBAAqB,QAAQ,MAAM,GAAG,qBAAqB,SAAS,MAAM"}
@@ -1,8 +1,8 @@
1
- import { E as CodecRef$1, Et as ProjectionItem, dt as LockWaitPolicy, h as AnyQueryAst, ht as LoweredStatement, m as AnyParamRef } from "./types-Sh5HuaZE-BwZNUDEi.mjs";
1
+ import { E as CodecRef$1, Et as ProjectionItem, dt as LockWaitPolicy, h as AnyQueryAst, ht as LoweredStatement, m as AnyParamRef } from "./types-DVaVM20q-B-QcMIOa.mjs";
2
2
  import { c as SqlQueryable } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
3
- import "./ddl-types-DtKZjNtN-DWQeO79o.mjs";
3
+ import "./ddl-types-CoP6yAw9-BDp3W_5g.mjs";
4
4
  import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
5
- import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
5
+ import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors, DataTypeValue } from "@prisma/orm-framework/components/codec";
6
6
  import { ColumnDefaultLiteralInputValue, ContractMarkerRecord, JsonValue } from "@prisma/orm-framework/contract/types";
7
7
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/ast.d.mts
8
8
  //#region src/ast/adapter-types.d.ts
@@ -57,9 +57,9 @@ interface LiteralDefaultColumn {
57
57
  readonly column: string;
58
58
  }
59
59
  /**
60
- * Reads a column's literal default with the column's codec, built with its type parameters, and encodes it for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.
60
+ * Reads a column's literal default as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.
61
61
  *
62
- * A `Date` is the one authored value JSON has no notation for, so it is encoded as it is. A `null` the codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a codec that reads `null` (a JSON codec) makes it the JSON value null. Any other value the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.
62
+ * A `Date` is the one authored value JSON has no notation for, so the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.
63
63
  */
64
64
  declare function encodeLiteralDefault(codecLookup: Pick<CodecLookupWithDescriptors, 'descriptorFor'>, codecRef: CodecRef$1, value: ColumnDefaultLiteralInputValue, where: LiteralDefaultColumn): Promise<EncodedLiteralDefault | undefined>;
65
65
  /**
@@ -174,10 +174,10 @@ type LengthParams = {
174
174
  readonly length?: number;
175
175
  };
176
176
  declare class SqlTextCodec extends CodecImpl<typeof SQL_TEXT_CODEC_ID, readonly ['equality', 'order', 'textual'], string, string> {
177
- encode(value: string, _ctx: CodecCallContext): Promise<string>;
178
- decode(wire: string, _ctx: CodecCallContext): Promise<string>;
179
- encodeJson(value: string): JsonValue;
180
- decodeJson(json: JsonValue): string;
177
+ toWire(value: string, _ctx: CodecCallContext): Promise<string>;
178
+ fromWire(wire: string, _ctx: CodecCallContext): Promise<string>;
179
+ fromDataTypeValue(value: DataTypeValue<string>): string;
180
+ toDataTypeValue(input: string): DataTypeValue;
181
181
  }
182
182
  declare class SqlTextDescriptor extends CodecDescriptorTemplateImpl<void> {
183
183
  readonly codecId: "sql/text@1";
@@ -188,10 +188,11 @@ declare class SqlTextDescriptor extends CodecDescriptorTemplateImpl<void> {
188
188
  declare const sqlTextDescriptor: SqlTextDescriptor;
189
189
  declare const sqlTextColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqlTextCodec, undefined>;
190
190
  declare class SqlIntCodec extends CodecImpl<typeof SQL_INT_CODEC_ID, readonly ['equality', 'order', 'numeric'], number, number> {
191
- encode(value: number, _ctx: CodecCallContext): Promise<number>;
192
- decode(wire: number, _ctx: CodecCallContext): Promise<number>;
193
- encodeJson(value: number): JsonValue;
194
- decodeJson(json: JsonValue): number;
191
+ toWire(value: number, _ctx: CodecCallContext): Promise<number>;
192
+ fromWire(wire: number, _ctx: CodecCallContext): Promise<number>;
193
+ /** A `number` holds an integer exactly only within the safe integer range. */
194
+ fromDataTypeValue(value: DataTypeValue): number;
195
+ toDataTypeValue(input: number): DataTypeValue;
195
196
  }
196
197
  declare class SqlIntDescriptor extends CodecDescriptorTemplateImpl<void> {
197
198
  readonly codecId: "sql/int@1";
@@ -202,10 +203,10 @@ declare class SqlIntDescriptor extends CodecDescriptorTemplateImpl<void> {
202
203
  declare const sqlIntDescriptor: SqlIntDescriptor;
203
204
  declare const sqlIntColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqlIntCodec, undefined>;
204
205
  declare class SqlFloatCodec extends CodecImpl<typeof SQL_FLOAT_CODEC_ID, readonly ['equality', 'order', 'numeric'], number, number> {
205
- encode(value: number, _ctx: CodecCallContext): Promise<number>;
206
- decode(wire: number, _ctx: CodecCallContext): Promise<number>;
207
- encodeJson(value: number): JsonValue;
208
- decodeJson(json: JsonValue): number;
206
+ toWire(value: number, _ctx: CodecCallContext): Promise<number>;
207
+ fromWire(wire: number, _ctx: CodecCallContext): Promise<number>;
208
+ fromDataTypeValue(value: DataTypeValue): number;
209
+ toDataTypeValue(input: number): DataTypeValue;
209
210
  }
210
211
  declare class SqlFloatDescriptor extends CodecDescriptorTemplateImpl<void> {
211
212
  readonly codecId: "sql/float@1";
@@ -216,10 +217,10 @@ declare class SqlFloatDescriptor extends CodecDescriptorTemplateImpl<void> {
216
217
  declare const sqlFloatDescriptor: SqlFloatDescriptor;
217
218
  declare const sqlFloatColumn: () => import("@prisma/orm-framework/components/codec").ColumnSpec<SqlFloatCodec, undefined>;
218
219
  declare class SqlCharCodec extends CodecImpl<typeof SQL_CHAR_CODEC_ID, readonly ['equality', 'order', 'textual'], string, string> {
219
- encode(value: string, _ctx: CodecCallContext): Promise<string>;
220
- decode(wire: string, _ctx: CodecCallContext): Promise<string>;
221
- encodeJson(value: string): JsonValue;
222
- decodeJson(json: JsonValue): string;
220
+ toWire(value: string, _ctx: CodecCallContext): Promise<string>;
221
+ fromWire(wire: string, _ctx: CodecCallContext): Promise<string>;
222
+ fromDataTypeValue(value: DataTypeValue<string>): string;
223
+ toDataTypeValue(input: string): DataTypeValue;
223
224
  }
224
225
  declare class SqlCharDescriptor extends CodecDescriptorTemplateImpl<LengthParams> {
225
226
  readonly codecId: "sql/char@1";
@@ -230,10 +231,10 @@ declare class SqlCharDescriptor extends CodecDescriptorTemplateImpl<LengthParams
230
231
  declare const sqlCharDescriptor: SqlCharDescriptor;
231
232
  declare const sqlCharColumn: (params?: LengthParams) => import("@prisma/orm-framework/components/codec").ColumnSpec<SqlCharCodec, LengthParams>;
232
233
  declare class SqlVarcharCodec extends CodecImpl<typeof SQL_VARCHAR_CODEC_ID, readonly ['equality', 'order', 'textual'], string, string> {
233
- encode(value: string, _ctx: CodecCallContext): Promise<string>;
234
- decode(wire: string, _ctx: CodecCallContext): Promise<string>;
235
- encodeJson(value: string): JsonValue;
236
- decodeJson(json: JsonValue): string;
234
+ toWire(value: string, _ctx: CodecCallContext): Promise<string>;
235
+ fromWire(wire: string, _ctx: CodecCallContext): Promise<string>;
236
+ fromDataTypeValue(value: DataTypeValue<string>): string;
237
+ toDataTypeValue(input: string): DataTypeValue;
237
238
  }
238
239
  declare class SqlVarcharDescriptor extends CodecDescriptorTemplateImpl<LengthParams> {
239
240
  readonly codecId: "sql/varchar@1";
@@ -261,4 +262,4 @@ declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<AnyPar
261
262
  declare function isAggregateProjection(item: ProjectionItem): boolean;
262
263
  //#endregion
263
264
  export { sqlTextDecode as $, collectOrderedParamRefs as A, sqlCharColumn as B, SqlFloatDescriptor as C, SqlTextDescriptor as D, SqlTextCodec as E, lockIncompatible as F, sqlFloatDecode as G, sqlCharDescriptor as H, lockOptionCapabilities as I, sqlIntColumn as J, sqlFloatDescriptor as K, lockStrengthCapabilities as L, encodeListLiteralDefault as M, encodeLiteralDefault as N, SqlVarcharCodec as O, isAggregateProjection as P, sqlTextColumn as Q, lockWaitPolicyOf as R, SqlFloatCodec as S, SqlIntDescriptor as T, sqlCharEncode as U, sqlCharDecode as V, sqlFloatColumn as W, sqlIntDescriptor as X, sqlIntDecode as Y, sqlIntEncode as Z, SQL_INT_CODEC_ID as _, EncodedLiteralDefault as a, sqlVarcharEncode as at, SqlCharCodec as b, LockOptionCapabilities as c, LockWaitRequest as d, sqlTextDescriptor as et, Lowerer as f, SQL_FLOAT_CODEC_ID as g, SQL_CHAR_CODEC_ID as h, CapabilityRequirement as i, sqlVarcharDescriptor as it, compact as j, SqlVarcharDescriptor as k, LockStrengthCapabilities as l, MarkerReadResult as m, AdapterProfile as n, sqlVarcharColumn as nt, LiteralDefaultColumn as o, LowererContext as p, sqlFloatEncode as q, AdapterTarget as r, sqlVarcharDecode as rt, LockConflict as s, Adapter as t, sqlTextEncode as tt, LockWaitOptions as u, SQL_TEXT_CODEC_ID as v, SqlIntCodec as w, SqlCharDescriptor as x, SQL_VARCHAR_CODEC_ID as y, missingCapability as z };
264
- //# sourceMappingURL=ast-BoM9T1b2.d.mts.map
265
+ //# sourceMappingURL=ast-Dzsat0Zb.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-Dzsat0Zb.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.d.mts"],"mappings":";;;;;;;;KAOK;;;;;;;KAOA;WACM;WACA,QAAQ;;WAER;;WAEA;;UAED,eAAe,gBAAgB,gBAAgB;WAC9C;WACA,QAAQ;WACR,cAAc;;;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v.mjs";
2
- import "./psl-column-resolution-BCkhNzOK-Bbrs_WzK.mjs";
1
+ import "./types-DMfBh16_.mjs";
2
+ import "./contract-builder-De_fyZGT.mjs";
3
+ import "./psl-column-resolution-BCkhNzOK-mW_8C9vr.mjs";
3
4
  import { PslSources } from "@prisma/orm-framework/psl-parser/syntax";
4
5
  import { AttributeSpec, AttributeSpecContext, DescribeUnsupportedAttribute, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, ModelSymbol, ParsedWrittenList, ParsedWrittenScalar, PslSpan, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
5
6
  import "@prisma/orm-framework/components/control";
@@ -99,4 +100,4 @@ declare const sqlAttributeSpecs: {
99
100
  declare function describeUnsupportedSqlAttribute(sources: PslSources): DescribeUnsupportedAttribute;
100
101
  //#endregion
101
102
  export { ParsedNullLiteral as a, EnumMemberListDefault as i, DefaultFunctionCall as n, sqlAttributeSpecs as o, EnumMemberDefault as r, describeUnsupportedSqlAttribute as t };
102
- //# sourceMappingURL=attribute-specs-D7EhHD08.d.mts.map
103
+ //# sourceMappingURL=attribute-specs-2I2xuKEa.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute-specs-2I2xuKEa.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-DShY0yBj.d.mts","../../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;;UAMU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;iBACvJ,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;iBACc,eAAe,KAAK,uBAAuB;EAC1D;WACS,4CAA4C;WAC5C,uCAAuC;WACvC;WACA;WACA;WACA;WACA,UAAU;GAClB;iBACc,eAAe,KAAK,uBAAuB;WACjD,2CAA2C;WAC3C;WACA;GACR;;cAEW;WACH;aACE,MAAM,MAAM,yBAAyB;MAC5C;OACC;aACM,KAAK,MAAM,yBAAyB;MAC3C;eACS;OACR;aACM,SAAS,MAAM,yBAAyB;MAC/C;eACS;OACR;aACM,cAAc;aACd,cAAc;aACd,UAAU,MAAM,yBAAyB;MAChD;OACC;aACM,gBAAgB,MAAM,yBAAyB;MACtD;OACC;aACM,OAAO,MAAM,yBAAyB;MAC7C,qCAAqC,wBAAwB;MAC7D;OACC;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB;;;;;;iBC9EZ,gCAAgC,SAAS,aAAa"}
@@ -1,6 +1,6 @@
1
1
  import { t as contractError } from "./contract-errors-BCN6RVI5-5IHBF_lg.mjs";
2
- import { i as computeCheckContentHash, n as assertWireNamePrefixLength } from "./naming-CT8tRisJ-DLHKo0Hm.mjs";
3
- import { t as exactNameBodyWarning } from "./index-naming-BOcJT1B3-CeEoP8t3.mjs";
2
+ import { i as computeCheckContentHash, n as assertWireNamePrefixLength } from "./naming-bM5qm5PY-DdginUhA.mjs";
3
+ import { t as exactNameBodyWarning } from "./index-naming-BOcJT1B3-18gQUduD.mjs";
4
4
  import { flushAuthoringWarnings } from "@prisma/orm-framework/components/authoring";
5
5
  //#region ../../../2-sql/1-core/contract/dist/authored-check-naming.mjs
6
6
  /**
@@ -44,4 +44,4 @@ function lowerAuthoredCheck(tableName, authored, warnings) {
44
44
  //#endregion
45
45
  export { lowerAuthoredCheck as t };
46
46
 
47
- //# sourceMappingURL=authored-check-naming-CO3GA46Y.mjs.map
47
+ //# sourceMappingURL=authored-check-naming-CIX7Bbyh.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"authored-check-naming-CO3GA46Y.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/authored-check-naming.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as exactNameBodyWarning } from \"./index-naming-BOcJT1B3.mjs\";\nimport { flushAuthoringWarnings } from \"@internal/framework-components/authoring\";\nimport { assertWireNamePrefixLength, computeCheckContentHash } from \"@internal/sql-schema-ir/naming\";\n//#region src/authored-check-naming.ts\n/**\n* Lowers an authored check constraint into the name-identified entity\n* `contract.json` persists: exact mode adopts `map` verbatim (no prefix, no\n* hash) and warns, because a hand-authored body compared verbatim against\n* Postgres's reprint would false-drift; wire mode appends the content-hash\n* suffix to the authored prefix. There is no default prefix to fall back on\n* — a check has no column tuple to derive one from, unlike an index — so an\n* absent `name` is only valid alongside a present `map`. The cross-field\n* guards are the shared enforcement backstop for both authoring surfaces\n* (PSL pre-empts them with span-anchored diagnostics).\n*/\nfunction lowerAuthoredCheck(tableName, authored, warnings) {\n\tif (authored.map !== void 0 && authored.name !== void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check \"${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.trim().length === 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": expression must not be empty — an empty predicate is not a constraint.`);\n\tif (authored.map !== void 0) {\n\t\tconst warning = exactNameBodyWarning(\"check\", authored.map);\n\t\tif (warnings !== void 0) warnings.push(warning);\n\t\telse flushAuthoringWarnings([warning]);\n\t\treturn {\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: authored.map\n\t\t\t},\n\t\t\texpression: authored.expression\n\t\t};\n\t}\n\tif (authored.name === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": a check constraint requires an explicit name (name:) or exact physical name (map:) — unlike an index there is no column tuple to derive a default name from.`);\n\tconst prefix = authored.name;\n\tassertWireNamePrefixLength(prefix, \"check prefix\");\n\treturn {\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix,\n\t\t\thash: computeCheckContentHash(authored.expression)\n\t\t},\n\t\texpression: authored.expression\n\t};\n}\n//#endregion\nexport { lowerAuthoredCheck };\n\n//# sourceMappingURL=authored-check-naming.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,mBAAmB,WAAW,UAAU,UAAU;CAC1D,IAAI,SAAS,QAAQ,KAAK,KAAK,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,UAAU,SAAS,IAAI,cAAc,UAAU,mGAAmG;CAC5P,IAAI,SAAS,WAAW,KAAK,CAAC,CAAC,WAAW,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,0EAA0E;CACrM,IAAI,SAAS,QAAQ,KAAK,GAAG;EAC5B,MAAM,UAAU,qBAAqB,SAAS,SAAS,GAAG;EAC1D,IAAI,aAAa,KAAK,GAAG,SAAS,KAAK,OAAO;OACzC,uBAAuB,CAAC,OAAO,CAAC;EACrC,OAAO;GACN,QAAQ;IACP,MAAM;IACN,MAAM,SAAS;GAChB;GACA,YAAY,SAAS;EACtB;CACD;CACA,IAAI,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,gKAAgK;CAC5Q,MAAM,SAAS,SAAS;CACxB,2BAA2B,QAAQ,cAAc;CACjD,OAAO;EACN,QAAQ;GACP,MAAM;GACN;GACA,MAAM,wBAAwB,SAAS,UAAU;EAClD;EACA,YAAY,SAAS;CACtB;AACD"}
1
+ {"version":3,"file":"authored-check-naming-CIX7Bbyh.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/authored-check-naming.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as exactNameBodyWarning } from \"./index-naming-BOcJT1B3.mjs\";\nimport { flushAuthoringWarnings } from \"@internal/framework-components/authoring\";\nimport { assertWireNamePrefixLength, computeCheckContentHash } from \"@internal/sql-schema-ir/naming\";\n//#region src/authored-check-naming.ts\n/**\n* Lowers an authored check constraint into the name-identified entity\n* `contract.json` persists: exact mode adopts `map` verbatim (no prefix, no\n* hash) and warns, because a hand-authored body compared verbatim against\n* Postgres's reprint would false-drift; wire mode appends the content-hash\n* suffix to the authored prefix. There is no default prefix to fall back on\n* — a check has no column tuple to derive one from, unlike an index — so an\n* absent `name` is only valid alongside a present `map`. The cross-field\n* guards are the shared enforcement backstop for both authoring surfaces\n* (PSL pre-empts them with span-anchored diagnostics).\n*/\nfunction lowerAuthoredCheck(tableName, authored, warnings) {\n\tif (authored.map !== void 0 && authored.name !== void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check \"${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.trim().length === 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": expression must not be empty — an empty predicate is not a constraint.`);\n\tif (authored.map !== void 0) {\n\t\tconst warning = exactNameBodyWarning(\"check\", authored.map);\n\t\tif (warnings !== void 0) warnings.push(warning);\n\t\telse flushAuthoringWarnings([warning]);\n\t\treturn {\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: authored.map\n\t\t\t},\n\t\t\texpression: authored.expression\n\t\t};\n\t}\n\tif (authored.name === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": a check constraint requires an explicit name (name:) or exact physical name (map:) — unlike an index there is no column tuple to derive a default name from.`);\n\tconst prefix = authored.name;\n\tassertWireNamePrefixLength(prefix, \"check prefix\");\n\treturn {\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix,\n\t\t\thash: computeCheckContentHash(authored.expression)\n\t\t},\n\t\texpression: authored.expression\n\t};\n}\n//#endregion\nexport { lowerAuthoredCheck };\n\n//# sourceMappingURL=authored-check-naming.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,mBAAmB,WAAW,UAAU,UAAU;CAC1D,IAAI,SAAS,QAAQ,KAAK,KAAK,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,UAAU,SAAS,IAAI,cAAc,UAAU,mGAAmG;CAC5P,IAAI,SAAS,WAAW,KAAK,CAAC,CAAC,WAAW,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,0EAA0E;CACrM,IAAI,SAAS,QAAQ,KAAK,GAAG;EAC5B,MAAM,UAAU,qBAAqB,SAAS,SAAS,GAAG;EAC1D,IAAI,aAAa,KAAK,GAAG,SAAS,KAAK,OAAO;OACzC,uBAAuB,CAAC,OAAO,CAAC;EACrC,OAAO;GACN,QAAQ;IACP,MAAM;IACN,MAAM,SAAS;GAChB;GACA,YAAY,SAAS;EACtB;CACD;CACA,IAAI,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,gKAAgK;CAC5Q,MAAM,SAAS,SAAS;CACxB,2BAA2B,QAAQ,cAAc;CACjD,OAAO;EACN,QAAQ;GACP,MAAM;GACN;GACA,MAAM,wBAAwB,SAAS,UAAU;EAClD;EACA,YAAY,SAAS;CACtB;AACD"}
@@ -1,4 +1,4 @@
1
- import "./contract-builder-CH0AIjsv.mjs";
1
+ import "./contract-builder-De_fyZGT.mjs";
2
2
  import "@prisma/orm-framework/components/authoring";
3
3
  import "@prisma/orm-framework/psl-parser";
4
4
  //#region ../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts
@@ -6,4 +6,4 @@ import "@prisma/orm-framework/psl-parser";
6
6
  declare function sqlFamilyEnumSpec(): import("@prisma/orm-framework/psl-parser").MapBlockSpec<Record<string, import("@prisma/orm-framework/contract/types").JsonValue | undefined>>;
7
7
  //#endregion
8
8
  export { sqlFamilyEnumSpec as t };
9
- //# sourceMappingURL=authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts.map
9
+ //# sourceMappingURL=authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts"],"mappings":";;;;;iBAIiB,oDAAoD,aAAa,kDAAkD"}
1
+ {"version":3,"file":"authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts"],"mappings":";;;;;iBAIiB,oDAAoD,aAAa,kDAAkD"}
@@ -1,4 +1,4 @@
1
- import { c as enumType } from "./contract-builder-CiYVj56_.mjs";
1
+ import { c as enumType } from "./contract-builder-fQ3gkIR5.mjs";
2
2
  import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
3
3
  import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
4
4
  import { blockAttribute, jsonValue, mapBlock, str } from "@prisma/orm-framework/psl-parser";
@@ -263,4 +263,4 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
263
263
  //#endregion
264
264
  export { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringFieldPresets as t };
265
265
 
266
- //# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs.map
266
+ //# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map