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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/{aggregate-descriptor-registry-DrJ1vHEo.mjs → aggregate-descriptor-registry-Dd7Uj7DJ.mjs} +3 -3
  2. package/dist/{aggregate-descriptor-registry-DrJ1vHEo.mjs.map → aggregate-descriptor-registry-Dd7Uj7DJ.mjs.map} +1 -1
  3. package/dist/{ast-BDwGvnKK.mjs → ast-CBO3PEJF.mjs} +73 -47
  4. package/dist/ast-CBO3PEJF.mjs.map +1 -0
  5. package/dist/{ast-BoM9T1b2.d.mts → ast-Dzsat0Zb.d.mts} +27 -26
  6. package/dist/ast-Dzsat0Zb.d.mts.map +1 -0
  7. package/dist/{attribute-specs-D7EhHD08.d.mts → attribute-specs-2I2xuKEa.d.mts} +4 -3
  8. package/dist/attribute-specs-2I2xuKEa.d.mts.map +1 -0
  9. package/dist/{authored-check-naming-CO3GA46Y.mjs → authored-check-naming-CIX7Bbyh.mjs} +3 -3
  10. package/dist/{authored-check-naming-CO3GA46Y.mjs.map → authored-check-naming-CIX7Bbyh.mjs.map} +1 -1
  11. package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts} +2 -2
  12. package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts.map → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts.map} +1 -1
  13. package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs} +2 -2
  14. package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs.map → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map} +1 -1
  15. package/dist/builder.d.mts +3 -3
  16. package/dist/builder__runtime.d.mts +7 -7
  17. package/dist/builder__runtime.mjs +2 -2
  18. package/dist/builder__types.d.mts +5 -5
  19. package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs → codec-descriptor-registry-4kw8FPpo.mjs} +2 -2
  20. package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs.map → codec-descriptor-registry-4kw8FPpo.mjs.map} +1 -1
  21. package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts} +3 -3
  22. package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts.map → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts.map} +1 -1
  23. package/dist/collection-methods-DQAFcGEB.d.mts +1 -0
  24. package/dist/{config-types-ni1nb_HA.mjs → config-types-ComQZUlA.mjs} +2 -2
  25. package/dist/{config-types-ni1nb_HA.mjs.map → config-types-ComQZUlA.mjs.map} +1 -1
  26. package/dist/{contract-builder-CH0AIjsv.d.mts → contract-builder-De_fyZGT.d.mts} +6 -6
  27. package/dist/{contract-builder-CH0AIjsv.d.mts.map → contract-builder-De_fyZGT.d.mts.map} +1 -1
  28. package/dist/{contract-builder-CiYVj56_.mjs → contract-builder-fQ3gkIR5.mjs} +5 -5
  29. package/dist/{contract-builder-CiYVj56_.mjs.map → contract-builder-fQ3gkIR5.mjs.map} +1 -1
  30. package/dist/contract-emitter.mjs +1 -1
  31. package/dist/contract-prisma7__provider.d.mts +12 -6
  32. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  33. package/dist/contract-prisma7__provider.mjs +48 -43
  34. package/dist/contract-prisma7__provider.mjs.map +1 -1
  35. package/dist/contract-psl.d.mts +2 -2
  36. package/dist/contract-psl.d.mts.map +1 -1
  37. package/dist/contract-psl.mjs +1 -1
  38. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  39. package/dist/contract-psl__attribute-specs.mjs +1 -1
  40. package/dist/contract-psl__provider.mjs +2 -2
  41. package/dist/contract-psl__provider.mjs.map +1 -1
  42. package/dist/contract-ts.d.mts +2 -2
  43. package/dist/contract-ts.mjs +4 -4
  44. package/dist/contract-ts__config-types.mjs +1 -1
  45. package/dist/contract-ts__contract-builder.d.mts +2 -2
  46. package/dist/contract-ts__contract-builder.mjs +3 -3
  47. package/dist/contract.d.mts +6 -6
  48. package/dist/contract.mjs +15 -15
  49. package/dist/contract__authored-check-naming.mjs +1 -1
  50. package/dist/contract__data-type-support.d.mts +2 -2
  51. package/dist/contract__data-type-support.mjs +2 -2
  52. package/dist/contract__data-type.d.mts +2 -2
  53. package/dist/contract__data-type.mjs +3 -3
  54. package/dist/contract__entity-kinds.mjs +1 -1
  55. package/dist/contract__factories.mjs +1 -1
  56. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  57. package/dist/contract__foreign-key-materialization.mjs +2 -2
  58. package/dist/contract__index-naming.mjs +1 -1
  59. package/dist/contract__sql-expression.d.mts +2 -2
  60. package/dist/contract__sql-expression.mjs +2 -2
  61. package/dist/contract__types.mjs +3 -3
  62. package/dist/contract__validators.d.mts +1 -1
  63. package/dist/contract__validators.mjs +2 -2
  64. package/dist/{control-DXqMl_gd.mjs → control-ClahTAD-.mjs} +246 -40
  65. package/dist/control-ClahTAD-.mjs.map +1 -0
  66. package/dist/{control-adapter-CkFfBVei-DGf1LihO.d.mts → control-adapter-BCopdpsT-DIHCWbq_.d.mts} +9 -26
  67. package/dist/control-adapter-BCopdpsT-DIHCWbq_.d.mts.map +1 -0
  68. package/dist/control-adapter-BsSf5pqM.d.mts +1 -0
  69. package/dist/{control-CPg4LwJV.d.mts → control-mpACqp72.d.mts} +72 -39
  70. package/dist/control-mpACqp72.d.mts.map +1 -0
  71. package/dist/{data-type-CYsho6Yd.d.mts → data-type-B8N33s-_.d.mts} +14 -7
  72. package/dist/data-type-B8N33s-_.d.mts.map +1 -0
  73. package/dist/{numeral-text-Cqu87pVe-DJCqBaSC.mjs → data-type-DKk8Unnz.mjs} +2 -2
  74. package/dist/data-type-DKk8Unnz.mjs.map +1 -0
  75. package/dist/{data-type-support-CfhpAKLX.mjs → data-type-support-C5-XxxeB.mjs} +11 -24
  76. package/dist/data-type-support-C5-XxxeB.mjs.map +1 -0
  77. package/dist/{data-type-support-4TcZuD7d.d.mts → data-type-support-CBcYhSkD.d.mts} +12 -16
  78. package/dist/data-type-support-CBcYhSkD.d.mts.map +1 -0
  79. package/dist/{db-BmrN9nRS-CzyybGKR.d.mts → db-BmrN9nRS-xynLbnAy.d.mts} +10 -10
  80. package/dist/{db-BmrN9nRS-CzyybGKR.d.mts.map → db-BmrN9nRS-xynLbnAy.d.mts.map} +1 -1
  81. package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts → ddl-types-CoP6yAw9-BDp3W_5g.d.mts} +4 -4
  82. package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts.map → ddl-types-CoP6yAw9-BDp3W_5g.d.mts.map} +1 -1
  83. package/dist/{default-mapping-B8_APB1M-CWcTmSQW.d.mts → default-mapping-CEISdj2g-DF1LzGBR.d.mts} +7 -5
  84. package/dist/default-mapping-CEISdj2g-DF1LzGBR.d.mts.map +1 -0
  85. package/dist/{derived-checks-Cgx_VgS3-CmFqNFgU.mjs → derived-checks-CrvMQTJF-DlxFFtNM.mjs} +18 -18
  86. package/dist/derived-checks-CrvMQTJF-DlxFFtNM.mjs.map +1 -0
  87. package/dist/{diff-CVVGktZG.d.mts → diff-Bd9ILpZL.d.mts} +20 -7
  88. package/dist/diff-Bd9ILpZL.d.mts.map +1 -0
  89. package/dist/diff-DZ82XaGR.mjs +21 -0
  90. package/dist/diff-DZ82XaGR.mjs.map +1 -0
  91. package/dist/{dist-Cg2lL1hR.mjs → dist-DAHIT4AS.mjs} +2 -2
  92. package/dist/{dist-Cg2lL1hR.mjs.map → dist-DAHIT4AS.mjs.map} +1 -1
  93. package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs} +3 -3
  94. package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs.map → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs.map} +1 -1
  95. package/dist/exports-DVsHk8HP-DrH_2a-H.mjs +2371 -0
  96. package/dist/exports-DVsHk8HP-DrH_2a-H.mjs.map +1 -0
  97. package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts → expression-BzrfOiPC-3NqR8UzK.d.mts} +4 -4
  98. package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts.map → expression-BzrfOiPC-3NqR8UzK.d.mts.map} +1 -1
  99. package/dist/expression-CeerCjQG.d.mts +2 -0
  100. package/dist/{expression-CNBCbbzU-DOXKUxQs.d.mts → expression-sOY1120I-DOykEQlw.d.mts} +4 -4
  101. package/dist/expression-sOY1120I-DOykEQlw.d.mts.map +1 -0
  102. package/dist/{factories-vDQ3S5gW.mjs → factories-DkD3nMYt.mjs} +3 -3
  103. package/dist/{factories-vDQ3S5gW.mjs.map → factories-DkD3nMYt.mjs.map} +1 -1
  104. package/dist/family.d.mts +14 -14
  105. package/dist/family.mjs +8 -8
  106. package/dist/family__control-adapter.d.mts +2 -2
  107. package/dist/family__control.d.mts +5 -5
  108. package/dist/family__control.mjs +4 -4
  109. package/dist/family__diff.d.mts +1 -2
  110. package/dist/family__diff.mjs +2 -2
  111. package/dist/family__ir.d.mts +1 -1
  112. package/dist/family__ir.mjs +1 -1
  113. package/dist/family__migration.d.mts +1 -1
  114. package/dist/family__pack.d.mts +1 -1
  115. package/dist/family__pack.mjs +2 -2
  116. package/dist/family__psl-build.d.mts +2 -2
  117. package/dist/family__psl-build.mjs +1 -1
  118. package/dist/family__psl-infer.d.mts +1 -1
  119. package/dist/family__psl-infer.mjs +1 -1
  120. package/dist/{foreign-key-materialization-DJ6uhBba.d.mts → foreign-key-materialization-DCaDnUs-.d.mts} +3 -3
  121. package/dist/{foreign-key-materialization-DJ6uhBba.d.mts.map → foreign-key-materialization-DCaDnUs-.d.mts.map} +1 -1
  122. package/dist/{foreign-key-materialization-DibQ9Hjg.mjs → foreign-key-materialization-DfNPQL9G.mjs} +4 -4
  123. package/dist/{foreign-key-materialization-DibQ9Hjg.mjs.map → foreign-key-materialization-DfNPQL9G.mjs.map} +1 -1
  124. package/dist/{functions-DSwXxsTg.d.mts → functions-Cp8soSAv.d.mts} +3 -3
  125. package/dist/{functions-DSwXxsTg.d.mts.map → functions-Cp8soSAv.d.mts.map} +1 -1
  126. package/dist/{index-C8jUgdUh.d.mts → index-BxlXOVeT.d.mts} +30 -23
  127. package/dist/{index-C8jUgdUh.d.mts.map → index-BxlXOVeT.d.mts.map} +1 -1
  128. package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs → index-equivalence-DswCiq5l-BsphajRC.mjs} +2 -2
  129. package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs.map → index-equivalence-DswCiq5l-BsphajRC.mjs.map} +1 -1
  130. package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs → index-naming-BOcJT1B3-18gQUduD.mjs} +2 -2
  131. package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs.map → index-naming-BOcJT1B3-18gQUduD.mjs.map} +1 -1
  132. package/dist/index-reference-CWppFpUV.d.mts +1 -0
  133. package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts → index-reference-DJaQLZA3-DxmYkkX-.d.mts} +3 -3
  134. package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts.map → index-reference-DJaQLZA3-DxmYkkX-.d.mts.map} +1 -1
  135. package/dist/{interpreter-CvmBTYyI-DNl-jr2E.mjs → interpreter-CFj2aTEP-BHL3TOqk.mjs} +13 -11
  136. package/dist/interpreter-CFj2aTEP-BHL3TOqk.mjs.map +1 -0
  137. package/dist/{ir-D0Vpm5O9.d.mts → ir-DgNo535E.d.mts} +4 -2
  138. package/dist/ir-DgNo535E.d.mts.map +1 -0
  139. package/dist/ir-I-xciGUH.mjs.map +1 -1
  140. package/dist/middleware-IqWk9Eff.d.mts +1 -0
  141. package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts → middleware-oCT0RWkt-AFlRNCOD.d.mts} +3 -3
  142. package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts.map → middleware-oCT0RWkt-AFlRNCOD.d.mts.map} +1 -1
  143. package/dist/{migration-ESRa6312.d.mts → migration-lg_VgP_F.d.mts} +2 -2
  144. package/dist/{migration-ESRa6312.d.mts.map → migration-lg_VgP_F.d.mts.map} +1 -1
  145. package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs → naming-bM5qm5PY-DdginUhA.mjs} +2 -2
  146. package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs.map → naming-bM5qm5PY-DdginUhA.mjs.map} +1 -1
  147. package/dist/{opaque-sql-BWxbqe5a-GGKfyakq.mjs → opaque-sql-Dset3kln-BzzXoO94.mjs} +3 -3
  148. package/dist/opaque-sql-Dset3kln-BzzXoO94.mjs.map +1 -0
  149. package/dist/orm-client.d.mts +28 -60
  150. package/dist/orm-client.d.mts.map +1 -1
  151. package/dist/orm-client.mjs +564 -233
  152. package/dist/orm-client.mjs.map +1 -1
  153. package/dist/{pack-BtGENS4_.d.mts → pack-CyjyMUN0.d.mts} +3 -3
  154. package/dist/{pack-BtGENS4_.d.mts.map → pack-CyjyMUN0.d.mts.map} +1 -1
  155. package/dist/plan-BZpZafiQ.d.mts +2 -0
  156. package/dist/{plan-cGEaSXHv-yuz43WrR.d.mts → plan-Cbed2eDu-BZM3geSm.d.mts} +3 -3
  157. package/dist/plan-Cbed2eDu-BZM3geSm.d.mts.map +1 -0
  158. package/dist/{psl-build-PXVtl8gM.d.mts → psl-build-BHQfP1_C.d.mts} +5 -5
  159. package/dist/{psl-build-PXVtl8gM.d.mts.map → psl-build-BHQfP1_C.d.mts.map} +1 -1
  160. package/dist/{psl-build-8bx9WTUt.mjs → psl-build-BsJ6eChh.mjs} +118 -84
  161. package/dist/psl-build-BsJ6eChh.mjs.map +1 -0
  162. package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts} +2 -2
  163. package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts.map → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts.map} +1 -1
  164. package/dist/{psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs → psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs} +76 -66
  165. package/dist/psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map +1 -0
  166. package/dist/{psl-infer-g040TwAr.d.mts → psl-infer-B6iemK9i.d.mts} +4 -4
  167. package/dist/{psl-infer-g040TwAr.d.mts.map → psl-infer-B6iemK9i.d.mts.map} +1 -1
  168. package/dist/{psl-infer-CG0_wra6.mjs → psl-infer-HPi_YMeE.mjs} +2 -2
  169. package/dist/{psl-infer-CG0_wra6.mjs.map → psl-infer-HPi_YMeE.mjs.map} +1 -1
  170. package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts} +5 -5
  171. package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts.map → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts.map} +1 -1
  172. package/dist/query-lane-context-Dpep1Fzy.d.mts +1 -0
  173. package/dist/relational-core.d.mts +12 -12
  174. package/dist/relational-core.mjs +2 -2
  175. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  176. package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
  177. package/dist/relational-core__ast.d.mts +3 -3
  178. package/dist/relational-core__ast.mjs +2 -2
  179. package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
  180. package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
  181. package/dist/relational-core__collection-methods.d.mts +2 -2
  182. package/dist/relational-core__contract-free.d.mts +3 -3
  183. package/dist/relational-core__contract-free.mjs +2 -2
  184. package/dist/relational-core__contract-free.mjs.map +1 -1
  185. package/dist/relational-core__expression.d.mts +3 -3
  186. package/dist/relational-core__functions.d.mts +1 -1
  187. package/dist/relational-core__index-reference.d.mts +2 -2
  188. package/dist/relational-core__middleware.d.mts +2 -2
  189. package/dist/relational-core__plan.d.mts +3 -3
  190. package/dist/relational-core__query-lane-context.d.mts +2 -2
  191. package/dist/relational-core__types.d.mts +2 -2
  192. package/dist/runtime.d.mts +5 -5
  193. package/dist/runtime.mjs +1 -2289
  194. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  195. package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts → schema-differ-DmP74bB8-BGA6fzOv.d.mts} +4 -4
  196. package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts.map → schema-differ-DmP74bB8-BGA6fzOv.d.mts.map} +1 -1
  197. package/dist/schema-ir.d.mts +2 -2
  198. package/dist/schema-ir.mjs +2 -2
  199. package/dist/schema-ir__naming.mjs +1 -1
  200. package/dist/schema-ir__types.d.mts +3 -3
  201. package/dist/schema-ir__types.mjs +2 -2
  202. package/dist/{schema-verify-DIfHSB4I-wt28gB9e.mjs → schema-verify-BwRdzbHb-B9vFrm3T.mjs} +22 -6
  203. package/dist/schema-verify-BwRdzbHb-B9vFrm3T.mjs.map +1 -0
  204. package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs → serialized-index-52COq1yV-CUJ2F65u.mjs} +3 -3
  205. package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs.map → serialized-index-52COq1yV-CUJ2F65u.mjs.map} +1 -1
  206. package/dist/{sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs → sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs} +12 -7
  207. package/dist/sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs.map +1 -0
  208. package/dist/{data-type-DU0mtme5.mjs → sql-data-type-Dabuwxet-BljsNjBu.mjs} +32 -13
  209. package/dist/sql-data-type-Dabuwxet-BljsNjBu.mjs.map +1 -0
  210. package/dist/{sql-execution-plan-C7XauPPu-BgBp89vP.d.mts → sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts} +3 -3
  211. package/dist/sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts.map +1 -0
  212. package/dist/{sql-expression-BWrjmY6M.d.mts → sql-expression-BAtH-2UU.d.mts} +6 -6
  213. package/dist/sql-expression-BAtH-2UU.d.mts.map +1 -0
  214. package/dist/{sql-expression-DSRILiU2.mjs → sql-expression-BJCuy-WI.mjs} +15 -9
  215. package/dist/sql-expression-BJCuy-WI.mjs.map +1 -0
  216. package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs → storage-table-DN36E2yE-0ncS821l.mjs} +2 -2
  217. package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs.map → storage-table-DN36E2yE-0ncS821l.mjs.map} +1 -1
  218. package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts → transaction-state-DR3nKTmH-n_12DsnU.d.mts} +9 -9
  219. package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts.map → transaction-state-DR3nKTmH-n_12DsnU.d.mts.map} +1 -1
  220. package/dist/types-BLyhYk6B.d.mts +1 -0
  221. package/dist/{types-DvhckjSz-Cm0Oodhr.mjs → types-CaVn_xxe-D9WdU3Iy.mjs} +81 -157
  222. package/dist/types-CaVn_xxe-D9WdU3Iy.mjs.map +1 -0
  223. package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts → types-Cv5t6_Ly-CcBWTpfM.d.mts} +6 -6
  224. package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts.map → types-Cv5t6_Ly-CcBWTpfM.d.mts.map} +1 -1
  225. package/dist/{types-Sh5HuaZE-BwZNUDEi.d.mts → types-DVaVM20q-B-QcMIOa.d.mts} +9 -20
  226. package/dist/types-DVaVM20q-B-QcMIOa.d.mts.map +1 -0
  227. package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts → types-DaYtBAYT-B22gkh5z.d.mts} +5 -5
  228. package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts.map → types-DaYtBAYT-B22gkh5z.d.mts.map} +1 -1
  229. package/dist/{types-GS3fwvoX.mjs → types-M_FeBD9w.mjs} +2 -2
  230. package/dist/{types-GS3fwvoX.mjs.map → types-M_FeBD9w.mjs.map} +1 -1
  231. package/dist/types-_7TbRpPw.d.mts +1 -0
  232. package/dist/{types-C-z8HyiZ-1Nhw0pHj.d.mts → types-c1iIhJep-DdMj6TNl.d.mts} +49 -51
  233. package/dist/types-c1iIhJep-DdMj6TNl.d.mts.map +1 -0
  234. package/dist/{validators-DlpO67uZ.mjs → validators-Bvfk0aN7.mjs} +14 -11
  235. package/dist/validators-Bvfk0aN7.mjs.map +1 -0
  236. package/dist/{validators-R-Wsy5Rr.d.mts → validators-CTZ-hU2l.d.mts} +4 -1
  237. package/dist/validators-CTZ-hU2l.d.mts.map +1 -0
  238. package/package.json +18 -18
  239. package/dist/ast-BDwGvnKK.mjs.map +0 -1
  240. package/dist/ast-BoM9T1b2.d.mts.map +0 -1
  241. package/dist/attribute-specs-D7EhHD08.d.mts.map +0 -1
  242. package/dist/collection-methods-CyUXbXVw.d.mts +0 -1
  243. package/dist/control-CPg4LwJV.d.mts.map +0 -1
  244. package/dist/control-DXqMl_gd.mjs.map +0 -1
  245. package/dist/control-adapter-CkFfBVei-DGf1LihO.d.mts.map +0 -1
  246. package/dist/control-adapter-DDjgBMy3.d.mts +0 -1
  247. package/dist/data-type-CYsho6Yd.d.mts.map +0 -1
  248. package/dist/data-type-DU0mtme5.mjs.map +0 -1
  249. package/dist/data-type-support-4TcZuD7d.d.mts.map +0 -1
  250. package/dist/data-type-support-CfhpAKLX.mjs.map +0 -1
  251. package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +0 -1
  252. package/dist/derived-checks-Cgx_VgS3-CmFqNFgU.mjs.map +0 -1
  253. package/dist/diff-B16bL_IR.mjs +0 -13
  254. package/dist/diff-B16bL_IR.mjs.map +0 -1
  255. package/dist/diff-CVVGktZG.d.mts.map +0 -1
  256. package/dist/expression-CNBCbbzU-DOXKUxQs.d.mts.map +0 -1
  257. package/dist/expression-DUYovBa6.d.mts +0 -2
  258. package/dist/index-reference-DGQdSRjQ.d.mts +0 -1
  259. package/dist/interpreter-CvmBTYyI-DNl-jr2E.mjs.map +0 -1
  260. package/dist/ir-D0Vpm5O9.d.mts.map +0 -1
  261. package/dist/middleware-Bp-R5o9E.d.mts +0 -1
  262. package/dist/numeral-text-Cqu87pVe-DJCqBaSC.mjs.map +0 -1
  263. package/dist/opaque-sql-BWxbqe5a-GGKfyakq.mjs.map +0 -1
  264. package/dist/plan-DdpaNNu1.d.mts +0 -2
  265. package/dist/plan-cGEaSXHv-yuz43WrR.d.mts.map +0 -1
  266. package/dist/psl-build-8bx9WTUt.mjs.map +0 -1
  267. package/dist/psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs.map +0 -1
  268. package/dist/query-lane-context-C4xq68Mr.d.mts +0 -1
  269. package/dist/runtime.mjs.map +0 -1
  270. package/dist/schema-verify-DIfHSB4I-wt28gB9e.mjs.map +0 -1
  271. package/dist/sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs.map +0 -1
  272. package/dist/sql-execution-plan-C7XauPPu-BgBp89vP.d.mts.map +0 -1
  273. package/dist/sql-expression-BWrjmY6M.d.mts.map +0 -1
  274. package/dist/sql-expression-DSRILiU2.mjs.map +0 -1
  275. package/dist/types-BSBsW0qR.d.mts +0 -1
  276. package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +0 -1
  277. package/dist/types-CJK7FBdw.d.mts +0 -1
  278. package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +0 -1
  279. package/dist/types-Sh5HuaZE-BwZNUDEi.d.mts.map +0 -1
  280. package/dist/validators-DlpO67uZ.mjs.map +0 -1
  281. package/dist/validators-R-Wsy5Rr.d.mts.map +0 -1
@@ -1,24 +1,24 @@
1
- import { r as StorageTable, t as StorageColumn } from "./storage-table-DC9afJhr-CmRU56OS.mjs";
1
+ import { r as StorageTable } from "./storage-table-DC9afJhr-CmRU56OS.mjs";
2
2
  import { l as SqlStorage } from "./sql-storage-tZhB8nS5-8NSWT0TW.mjs";
3
3
  import { j as SqlControlDriverInstance } from "./types-Dqf87mfA-BOElvimQ.mjs";
4
4
  import "./types-DMfBh16_.mjs";
5
5
  import { r as SqlOperationDescriptors } from "./index-BXFiad5j.mjs";
6
- import { h as AnyQueryAst } from "./types-Sh5HuaZE-BwZNUDEi.mjs";
6
+ import { h as AnyQueryAst } from "./types-DVaVM20q-B-QcMIOa.mjs";
7
7
  import { o as SqlExecuteRequest } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
8
- import { a as DdlNode } from "./ddl-types-DtKZjNtN-DWQeO79o.mjs";
9
- import { p as LowererContext } from "./ast-BoM9T1b2.mjs";
10
- import { a as ParsedNullLiteral, i as EnumMemberListDefault, n as DefaultFunctionCall, r as EnumMemberDefault } from "./attribute-specs-D7EhHD08.mjs";
11
- import { b as SqlSchemaIRNode, v as SqlSchemaIR } from "./types-C-z8HyiZ-1Nhw0pHj.mjs";
12
- import "./types-CJK7FBdw.mjs";
13
- import { o as SqlTypeLookups } from "./data-type-CYsho6Yd.mjs";
14
- import "./validators-R-Wsy5Rr.mjs";
15
- import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-DGf1LihO.mjs";
16
- import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-Cl5erH9X.mjs";
17
- import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-CzxOObSY-Cq3t_HCe.mjs";
18
- import { t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9-uVU2SdFf.mjs";
8
+ import { a as DdlNode } from "./ddl-types-CoP6yAw9-BDp3W_5g.mjs";
9
+ import { p as LowererContext } from "./ast-Dzsat0Zb.mjs";
10
+ import { a as ParsedNullLiteral, i as EnumMemberListDefault, n as DefaultFunctionCall, r as EnumMemberDefault } from "./attribute-specs-2I2xuKEa.mjs";
11
+ import { b as SqlSchemaIRNode, f as SqlDefaultValue, v as SqlSchemaIR } from "./types-c1iIhJep-DdMj6TNl.mjs";
12
+ import "./types-BLyhYk6B.mjs";
13
+ import { o as SqlTypeLookups } from "./data-type-B8N33s-_.mjs";
14
+ import "./validators-CTZ-hU2l.mjs";
15
+ import { r as SqlControlAdapter } from "./control-adapter-BCopdpsT-DIHCWbq_.mjs";
16
+ import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-BpyuSxbj.mjs";
17
+ import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-DaYtBAYT-B22gkh5z.mjs";
18
+ import { t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BGA6fzOv.mjs";
19
19
  import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
20
20
  import { DataTypeSupport, PresetStorageTemplate, TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
21
- import { CodecLookupWithDescriptors, DataType } from "@prisma/orm-framework/components/codec";
21
+ import { Codec, CodecLookupWithDescriptors, CodecRef, DataType, DataTypeLookup } from "@prisma/orm-framework/components/codec";
22
22
  import { ColumnDefault, Contract, ContractWithDomain, ControlPolicy } from "@prisma/orm-framework/contract/types";
23
23
  import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
24
24
  import { NotOk, Ok, Result } from "@prisma/orm-framework/utils/result";
@@ -85,7 +85,7 @@ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchem
85
85
  readonly driver: SqlControlDriverInstance<string>;
86
86
  readonly contract?: unknown;
87
87
  }): Promise<SqlSchemaIRNode>;
88
- inferPslContract(schemaIR: SqlSchemaIRNode): PslDocumentAst;
88
+ inferPslContract(schemaIR: SqlSchemaIRNode): Promise<PslDocumentAst>;
89
89
  lowerAst(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): Promise<SqlExecuteRequest>;
90
90
  /**
91
91
  * Inserts the initial marker row for `space` (upsert on `space`).
@@ -499,7 +499,7 @@ interface SqlControlTargetDescriptor<TTargetId extends string, TTargetDetails, T
499
499
  * can omit elements they already describe, and can qualify a cross-space
500
500
  * relation with the owning pack's space id.
501
501
  */
502
- readonly inferPslContract?: (schema: SqlSchemaIRNode, context: SqlPslBuildContext, describedContracts?: readonly SqlDescribedContractSpace[]) => PslDocumentAst;
502
+ readonly inferPslContract?: (schema: SqlSchemaIRNode, context: SqlPslBuildContext, describedContracts?: readonly SqlDescribedContractSpace[]) => Promise<PslDocumentAst>;
503
503
  /**
504
504
  * Builds the PSL document of a contract, which `contract print` renders as text. `contract` must be one `contractSerializer.deserializeContract` accepted; the hook does not check its structure again. Like {@link inferPslContract} it produces a PSL document, but from an assembled contract and the stack parts in `context`. The document reads back as the same contract; the hook throws `CONTRACT.PRINT_UNSUPPORTED` for a contract PSL cannot express. The implementation sits in the target, though most of it inverts this family's PSL reader; only its column types, defaults, native enums, derived checks and row-level security are dialect logic. Optional: targets without `contract print` omit it, and the family instance throws when it is absent.
505
505
  */
@@ -541,26 +541,7 @@ interface SqlControlTargetDescriptor<TTargetId extends string, TTargetDetails, T
541
541
  //#endregion
542
542
  //#region src/core/migrations/contract-to-schema-ir.d.ts
543
543
  /**
544
- * Target-specific callback that renders a `ColumnDefault` into the raw SQL literal
545
- * string stored in `SqlColumnIR.default`.
546
- *
547
- * Default value serialization is target-specific (quoting, casting, type syntax vary
548
- * between Postgres, MySQL, SQLite, …). The target provides its renderer when calling
549
- * `contractToSchemaIR`, keeping the family layer target-agnostic. `type.dataType` is the id of
550
- * the data type the column's codec represents, and `type.baseTypeName` its base name.
551
- */
552
- type DefaultRenderer = (def: ColumnDefault, column: StorageColumn, type: {
553
- readonly dataType: string;
554
- readonly baseTypeName: string;
555
- }) => string;
556
- /**
557
- * Target-supplied hook (same IoC seam as `DefaultRenderer`)
558
- * that normalizes a contract-declared `ColumnDefault` into the resolved shape
559
- * the target's introspection parses from the live database — e.g. a
560
- * sql`'{}'::jsonb` raw default and the literal Postgres reports
561
- * are the same value in different shapes, and `resolvedDefaultsEqual`
562
- * compares `kind` before content. When omitted, the contract's raw default
563
- * is the resolved default unchanged.
544
+ * Target-supplied hook that names a contract's expression default the way the target's introspection names the same database function, such as `now()` for `CURRENT_TIMESTAMP`, so the two compare equal. When omitted, the contract's default is the resolved default unchanged.
564
545
  */
565
546
  type DefaultResolver = (def: ColumnDefault, resolvedNativeType: string) => ColumnDefault;
566
547
  /**
@@ -576,7 +557,6 @@ declare function detectDestructiveChanges(from: SqlStorage | null, to: SqlStorag
576
557
  /** Each column's type is written from the data type its codec represents, found through the lookups. */
577
558
  interface ContractToSchemaIROptions extends SqlTypeLookups {
578
559
  readonly annotationNamespace: string;
579
- readonly renderDefault?: DefaultRenderer;
580
560
  readonly resolveDefault?: DefaultResolver;
581
561
  }
582
562
  /**
@@ -840,6 +820,8 @@ interface PlanFieldEventOperationsOptions {
840
820
  * `RawSqlCall`.
841
821
  */
842
822
  readonly codecHooks: ReadonlyMap<string, CodecControlHooks>;
823
+ /** The stack's data types, which say what each column is stored as. */
824
+ readonly dataTypes: Pick<DataTypeLookup, 'get'>;
843
825
  /**
844
826
  * The table renames the plan applies. A column under a renamed table's old name is the same
845
827
  * column under its new name, so a rename alone fires no event.
@@ -1279,6 +1261,57 @@ declare function convertedColumnOf(step: SqlMigrationPlanOperationStep): Convert
1279
1261
  */
1280
1262
  declare function unconvertedFieldOf(step: SqlMigrationPlanOperationStep, contract: ContractWithDomain): MigrationSubject | undefined;
1281
1263
  //#endregion
1264
+ //#region src/core/reported-defaults.d.ts
1265
+ /**
1266
+ * A reported literal default with the target's quoting, casts and escapes taken off: one body, or a list's element bodies with `null` for SQL NULL. A body is what the target's driver hands `fromWire` for a row of the column: text, a number where the driver returns one, or bytes.
1267
+ */
1268
+ type ReportedLiteralDefault = {
1269
+ readonly kind: 'value';
1270
+ readonly body: ReportedBody;
1271
+ } | {
1272
+ readonly kind: 'list';
1273
+ readonly elements: readonly (ReportedBody | null)[];
1274
+ };
1275
+ /** One literal's body, as the driver would hand it over for a row: text, a number, or the bytes of a blob. */
1276
+ type ReportedBody = string | number | Uint8Array;
1277
+ /** What the column's codec made of a reported literal default: the value, or the codec's reason it could not read it. */
1278
+ type ReadReportedDefault = {
1279
+ readonly resolvedDefault: ColumnDefault;
1280
+ readonly defaultValue: SqlDefaultValue;
1281
+ } | {
1282
+ readonly defaultUnreadable: string;
1283
+ };
1284
+ /** Reads a reported literal default with the column's codec. `raw` is the reported text, which a refusal quotes. */
1285
+ declare function readReportedDefault(codec: Codec, literal: ReportedLiteralDefault, raw: string): Promise<ReadReportedDefault>;
1286
+ /** What introspection holds of a reported literal default: the codec's reading, and the value of the literal the contract's expression default writes, when it writes one the codec reads. */
1287
+ type ReadColumnDefault = ReadReportedDefault & {
1288
+ readonly defaultExpressionValue?: SqlDefaultValue;
1289
+ };
1290
+ /**
1291
+ * Reads a reported literal default with the column's codec, and, when the contract's default is an expression that writes a literal, that literal too, so the diff compares the two as values.
1292
+ */
1293
+ declare function readColumnDefault(codec: Codec, reported: {
1294
+ readonly literal: ReportedLiteralDefault;
1295
+ readonly raw: string;
1296
+ }, written: {
1297
+ readonly literal: ReportedLiteralDefault;
1298
+ readonly expression: string;
1299
+ } | undefined): Promise<ReadColumnDefault>;
1300
+ /** What introspection needs of a column the contract declares: its codec, and its default when that is an expression. */
1301
+ interface ContractColumn {
1302
+ readonly codecRef: CodecRef;
1303
+ readonly defaultExpression: string | undefined;
1304
+ }
1305
+ /** The columns a contract declares, for introspection to read each column's reported default with the column's codec. */
1306
+ interface ContractColumns {
1307
+ /** `table.column` in one of `namespaceIds`, or in any namespace when `undefined`. */
1308
+ columnOf(namespaceIds: readonly string[] | undefined, table: string, column: string): ContractColumn | undefined;
1309
+ }
1310
+ /**
1311
+ * The columns `contract` declares. `contract` is a contract, or the namespaces of several contract spaces merged with each space's contract under `contracts`, as multi-space introspection receives them; a table's named types are then those of the space that declares it.
1312
+ */
1313
+ declare function contractColumns(contract: unknown): ContractColumns;
1314
+ //#endregion
1282
1315
  //#region src/core/timestamp-now-generator.d.ts
1283
1316
  declare function temporalStringAuthoringPresets<const Storage extends PresetStorageTemplate, const GeneratorId extends string = typeof TIMESTAMP_NOW_GENERATOR_ID>(input: Storage & {
1284
1317
  readonly generatorId?: GeneratorId;
@@ -1380,5 +1413,5 @@ declare function temporalCodecPresetWithPrecision<const CodecId extends string,
1380
1413
  //#region src/exports/control.d.ts
1381
1414
  declare const _default: SqlFamilyDescriptor;
1382
1415
  //#endregion
1383
- export { backfillOfDefaultedField as $, SchemaTables as A, rowsWithoutValueFailure as At, StatementColumn as B, temporalStringAuthoringPresets as Bt, ModelStorageEffect as C, plannerFailure as Ct, PlannedStatements as D, requiredColumnsOfMigration as Dt, PlanFieldEventOperationsOptions as E, requiredColumnOf as Et, SqlPslBuildContext as F, sqlOfSlot as Ft, TableNameCaseGuardTable as G, SubjectStorage as H, unknownCallNames as Ht, SqlQuote as I, sqlTypeLookupsOf as It, TableRenameRequest as J, TableRename as K, SqlQuotingRules as L, storageNameOfOperation as Lt, SqlControlFamilyInstance as M, runnerFailure as Mt, SqlControlTargetDescriptor as N, runnerSuccess as Nt, RequiredColumn as O, resolveColumnRenameAgainst as Ot, SqlDescribedContractSpace as P, slotSource as Pt, assembleAuthoringContributions as Q, SqlSlot as R, subjectsOfCalls as Rt, MigrationPlannerResult as S, planStatements as St, NoTable as T, requiredColumnMeta as Tt, SuppressionRecord as U, unmatchedColumnRename as Ut, StatementPlanningTarget as V, unconvertedFieldOf as Vt, TABLE_NAME_CASE_CHANGED_CODE as W, unmatchedTableRename as Wt, _default as X, TargetMigrationsCapability as Y, appliedStatementsInOrder as Z, MigrationOperationPolicy$1 as _, modelRenameStorageEffect as _t, ColumnRename as a, convertedColumnMeta as at, MigrationPlanner as b, planFieldEventCalls as bt, ControlPolicySubject as c, createSqlTextSources as ct, DefaultResolver as d, extractCodecControlHooks as dt, checkSqlExpressionText as et, FieldEventCall as f, fieldEventStorage as ft, MigrationOperationClass$1 as g, isUnfilledSlot as gt, INIT_ADDITIVE_POLICY as h, fieldStatementColumns as ht, ColumnOnOneSide as i, controlPolicyForCall as it, SingleOperationCall as j, rowsWithoutValueSummary as jt, RequiredColumnMark as k, resolveTableRenameAgainst as kt, ConvertedColumn as l, detectDestructiveChanges as lt, FieldStorageEffect as m, fieldRenameStorageEffect as mt, CallSubjects as n, contractNamespaceToSchemaIR as nt, ColumnRenameRequest as o, convertedColumnOf as ot, FieldStatementColumns as p, fieldOfColumn as pt, TableRenameByHand as q, CallWithCompanions as r, contractToSchemaIR as rt, ContractToSchemaIROptions as s, createMigrationPlan as st, COLUMN_RENAME_UNMATCHED_CODE as t, columnTakesTemporaryValue as tt, DefaultRenderer as u, detectTableNameCaseChanges as ut, MigrationPlan$1 as v, partitionCallsByControlPolicy as vt, ModelTable as w, plannerSuccess as wt, MigrationPlannerConflict$1 as x, planFieldEventOperations as xt, MigrationPlanOperation$1 as y, partitionIssuesByControlPolicy as yt, SqlTextSources as z, temporalCodecPresetWithPrecision as zt };
1384
- //# sourceMappingURL=control-CPg4LwJV.d.mts.map
1416
+ export { TableRenameRequest as $, ReadReportedDefault as A, plannerSuccess as At, SqlPslBuildContext as B, runnerFailure as Bt, MigrationPlannerResult as C, modelRenameStorageEffect as Ct, PlanFieldEventOperationsOptions as D, planFieldEventOperations as Dt, NoTable as E, planFieldEventCalls as Et, SchemaTables as F, requiredColumnsOfMigration as Ft, StatementColumn as G, storageNameOfOperation as Gt, SqlQuotingRules as H, slotSource as Ht, SingleOperationCall as I, resolveColumnRenameAgainst as It, SuppressionRecord as J, temporalStringAuthoringPresets as Jt, StatementPlanningTarget as K, subjectsOfCalls as Kt, SqlControlFamilyInstance as L, resolveTableRenameAgainst as Lt, ReportedLiteralDefault as M, readReportedDefault as Mt, RequiredColumn as N, requiredColumnMeta as Nt, PlannedStatements as O, planStatements as Ot, RequiredColumnMark as P, requiredColumnOf as Pt, TableRenameByHand as Q, unmatchedTableRename as Qt, SqlControlTargetDescriptor as R, rowsWithoutValueFailure as Rt, MigrationPlannerConflict$1 as S, isUnfilledSlot as St, ModelTable as T, partitionIssuesByControlPolicy as Tt, SqlSlot as U, sqlOfSlot as Ut, SqlQuote as V, runnerSuccess as Vt, SqlTextSources as W, sqlTypeLookupsOf as Wt, TableNameCaseGuardTable as X, unknownCallNames as Xt, TABLE_NAME_CASE_CHANGED_CODE as Y, unconvertedFieldOf as Yt, TableRename as Z, unmatchedColumnRename as Zt, MigrationOperationClass$1 as _, extractCodecControlHooks as _t, ColumnRename as a, checkSqlExpressionText as at, MigrationPlanOperation$1 as b, fieldRenameStorageEffect as bt, ContractColumns as c, contractNamespaceToSchemaIR as ct, ConvertedColumn as d, convertedColumnMeta as dt, TargetMigrationsCapability as et, DefaultResolver as f, convertedColumnOf as ft, INIT_ADDITIVE_POLICY as g, detectTableNameCaseChanges as gt, FieldStorageEffect as h, detectDestructiveChanges as ht, ColumnOnOneSide as i, backfillOfDefaultedField as it, ReportedBody as j, readColumnDefault as jt, ReadColumnDefault as k, plannerFailure as kt, ContractToSchemaIROptions as l, contractToSchemaIR as lt, FieldStatementColumns as m, createSqlTextSources as mt, CallSubjects as n, appliedStatementsInOrder as nt, ColumnRenameRequest as o, columnTakesTemporaryValue as ot, FieldEventCall as p, createMigrationPlan as pt, SubjectStorage as q, temporalCodecPresetWithPrecision as qt, CallWithCompanions as r, assembleAuthoringContributions as rt, ContractColumn as s, contractColumns as st, COLUMN_RENAME_UNMATCHED_CODE as t, _default as tt, ControlPolicySubject as u, controlPolicyForCall as ut, MigrationOperationPolicy$1 as v, fieldEventStorage as vt, ModelStorageEffect as w, partitionCallsByControlPolicy as wt, MigrationPlanner as x, fieldStatementColumns as xt, MigrationPlan$1 as y, fieldOfColumn as yt, SqlDescribedContractSpace as z, rowsWithoutValueSummary as zt };
1417
+ //# sourceMappingURL=control-mpACqp72.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-mpACqp72.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAoBU;WACC,kBAAkB,cAAc;WAChC,cAAc;;UAEf,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,wBAAwB,SAAS,cAAc,yBAAyB;;;;;;;;;EAS9O,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB,QAAQ;EACrD,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;EACrE,cAAc,WAAW;;;;cAIb,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV,oBAAoB;WACpB;aACE;eACE;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;;;aAKR;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ,gEAAgE;aAChE;eACE;QACP;QACA;QACA;QACA;QACA;UACE;;QAEF,aAAa;QACb;UACE,2CAA2C;YACzC;4CACgC;;;;aAI/B;eACE;iBACE,MAAM,qCAAqC,wDAAwD;UAC1G;0CACgC;iBACzB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EjC;WACM,iBAAiB;WACjB,cAAc;;WAEd;;;iBAGM,oBAAoB,OAAO,OAAO,SAAS,wBAAwB,cAAc,QAAQ;;KAErG,oBAAoB;WACd,yBAAyB;;;;;iBAKnB,kBAAkB,OAAO,OAAO;WACtC,SAAS;WACT;GACR;WACQ,SAAS;WACT;gBACK,QAAQ;;UAEd;WACC,UAAU;WACV;;;UAGD;;EAER,SAAS,6CAA6C,eAAe,iBAAiB;;;;;iBAKvE,gBAAgB,oBAAoB;;;iBAGpC,qCAAqC,gBAAgB,6BAA6B,oCAAoC,4BAA4B,OAAO;WAC/J,cAAc;;WAEd;aACE;aACA,QAAQ,KAAK;eACX,cAAc;;eAEd;iBACE;mBACE;mBACA,IAAI;;;;;WAKZ;aACE;aACA,QAAQ,KAAK;eACX,cAAc;;eAEd;iBACE;mBACE;mBACA,IAAI;;iBAEN;mBACE;mBACA,IAAI;;;;;;;;;;;;;;;iBAeN,uCAAuC,8BAA8B,oCAAoC,4BAA4B;WAC3I,SAAS;WACT,cAAc;;WAEd;WACA;aACE;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT;eACE;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;eAI3B;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;cAS5B,UAAU"}
@@ -1,5 +1,5 @@
1
- import { a as ReportedSqlType } from "./types-C-z8HyiZ-1Nhw0pHj.mjs";
2
- import "./types-CJK7FBdw.mjs";
1
+ import { i as ReportedSqlType } from "./types-c1iIhJep-DdMj6TNl.mjs";
2
+ import "./types-BLyhYk6B.mjs";
3
3
  import { CodecLookupWithDescriptors, DataType, DataTypeId, DataTypeLookup, DataTypeSpec } from "@prisma/orm-framework/components/codec";
4
4
  import { Type } from "arktype";
5
5
  //#region ../../../2-sql/1-core/contract/dist/data-type.d.mts
@@ -28,6 +28,8 @@ interface SqlDataTypeSpec<Params extends SqlTypeParams = SqlTypeParams> extends
28
28
  readonly texts?: readonly SqlTypeText[];
29
29
  /** The kind of reported type this data type claims, instead of any text. */
30
30
  readonly claimsKind?: string;
31
+ /** The id of the type a column of this type is stored as, with the same parameters. A type stored as another declares no texts. */
32
+ readonly storedAs?: DataTypeId;
31
33
  readonly normalize?: (params: Params) => Params;
32
34
  readonly render?: (params: Params) => string;
33
35
  readonly fromReported?: (reported: ReportedSqlType) => Params;
@@ -35,6 +37,7 @@ interface SqlDataTypeSpec<Params extends SqlTypeParams = SqlTypeParams> extends
35
37
  interface SqlDataTypeFacts<Params extends SqlTypeParams = SqlTypeParams> {
36
38
  readonly texts: readonly SqlTypeText[];
37
39
  readonly claimsKind: string | undefined;
40
+ readonly storedAs: DataTypeId | undefined;
38
41
  readonly normalize: (params: Params) => Params;
39
42
  readonly render: ((params: Params) => string) | undefined;
40
43
  readonly fromReported: ((reported: ReportedSqlType) => Params) | undefined;
@@ -51,8 +54,6 @@ interface ResolvedSqlType {
51
54
  declare function sqlDataType<Params extends SqlTypeParams = SqlTypeParams>(id: string, spec: SqlDataTypeSpec<Params>): SqlDataType<Params>;
52
55
  /** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */
53
56
  declare function isSqlDataType(type: DataType): type is SqlDataType;
54
- /** The parameters of `typeParams` that `type` declares; codec-owned keys are dropped. */
55
- declare function dataTypeParams(type: DataType, typeParams: SqlTypeParams | undefined): SqlTypeParams;
56
57
  /** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter at fault. */
57
58
  declare function validateSqlTypeParams<Params extends SqlTypeParams>(type: SqlDataType<Params>, params: SqlTypeParams): Params;
58
59
  /** The name of `type` with no parameters, for places where parameters must not appear. */
@@ -70,7 +71,13 @@ interface SqlTypeLookups {
70
71
  }
71
72
  /** The SQL data type the codec `codecId` represents. */
72
73
  declare function sqlDataTypeOfCodec(codecId: string, lookups: SqlTypeLookups): SqlDataType;
73
- /** {@link unquotedSqlBaseName} of the data type the codec `codecId` represents. */
74
+ /** The type a column of `type` is stored as, whose name DDL writes and the database reports: `type` itself unless it names another. */
75
+ declare function sqlStorageType(type: SqlDataType, lookup: Pick<DataTypeLookup, 'get'>): SqlDataType;
76
+ /** The id of the type a column of the data type `dataTypeId` is stored as: {@link sqlStorageType} of it, which refuses a storage type the lookup does not register, or `dataTypeId` itself when the lookup does not know it as a SQL data type. */
77
+ declare function sqlStorageTypeId(dataTypeId: string, lookup: Pick<DataTypeLookup, 'get'>): string;
78
+ /** The type a column of the codec `codecId` is stored as: {@link sqlStorageType} of the data type it represents. */
79
+ declare function sqlStorageTypeOfCodec(codecId: string, lookups: SqlTypeLookups): SqlDataType;
80
+ /** {@link unquotedSqlBaseName} of the type a column of the codec `codecId` is stored as. */
74
81
  declare function unquotedSqlBaseNameOfCodec(codecId: string, typeParams: SqlTypeParams | undefined, lookups: SqlTypeLookups): string;
75
82
  /** The text a migration writes for `type` with the raw `params`. */
76
83
  declare function renderSqlTypeName<Params extends SqlTypeParams>(type: SqlDataType<Params>, params: SqlTypeParams): string;
@@ -108,5 +115,5 @@ declare function resolveReportedSqlType(reported: ReportedSqlType, dataTypes: re
108
115
  */
109
116
  declare function resolveWrittenSqlTypes(text: string, dataTypes: readonly DataType[]): readonly ResolvedSqlType[];
110
117
  //#endregion
111
- export { validateSqlTypeParams as S, sqlBaseName as _, SqlDataTypeSpec as a, unquotedSqlBaseName as b, SqlTypeText as c, isSqlDataType as d, numeralText as f, resolveWrittenSqlTypes as g, resolveReportedSqlType as h, SqlDataTypeFacts as i, dataTypeParams as l, renderSqlTypeName as m, SqlDataType as n, SqlTypeLookups as o, renderSqlCatalogText as p, SqlDataTypeCollision as r, SqlTypeParams as s, ResolvedSqlType as t, findSqlDataTypeCollision as u, sqlDataType as v, unquotedSqlBaseNameOfCodec as x, sqlDataTypeOfCodec as y };
112
- //# sourceMappingURL=data-type-CYsho6Yd.d.mts.map
118
+ export { unquotedSqlBaseNameOfCodec as C, unquotedSqlBaseName as S, sqlDataType as _, SqlDataTypeSpec as a, sqlStorageTypeId as b, SqlTypeText as c, numeralText as d, renderSqlCatalogText as f, sqlBaseName as g, resolveWrittenSqlTypes as h, SqlDataTypeFacts as i, findSqlDataTypeCollision as l, resolveReportedSqlType as m, SqlDataType as n, SqlTypeLookups as o, renderSqlTypeName as p, SqlDataTypeCollision as r, SqlTypeParams as s, ResolvedSqlType as t, isSqlDataType as u, sqlDataTypeOfCodec as v, validateSqlTypeParams as w, sqlStorageTypeOfCodec as x, sqlStorageType as y };
119
+ //# sourceMappingURL=data-type-B8N33s-_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-B8N33s-_.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type.d.mts"],"mappings":";;;;;;;;;;iBAQiB,YAAY;;;;UAInB;;WAEC;;WAEA;;WAEA;;WAEA;;KAEN,gBAAgB,SAAS;UACpB,gBAAgB,eAAe,gBAAgB,uBAAuB;WACrE,SAAS,KAAK;WACd,iBAAiB;;WAEjB;;WAEA,WAAW;WACX,aAAa,QAAQ,WAAW;WAChC,UAAU,QAAQ;WAClB,gBAAgB,UAAU,oBAAoB;;UAE/C,iBAAiB,eAAe,gBAAgB;WAC/C,gBAAgB;WAChB;WACA,UAAU;WACV,YAAY,QAAQ,WAAW;WAC/B,UAAU,QAAQ;WAClB,gBAAgB,UAAU,oBAAoB;;UAE/C,YAAY,eAAe,gBAAgB,uBAAuB;WACjE,SAAS,KAAK;WACd,KAAK,iBAAiB;;UAEvB;WACC,UAAU;WACV,YAAY;;;iBAGN,YAAY,eAAe,gBAAgB,eAAe,YAAY,MAAM,gBAAgB,UAAU,YAAY;;iBAElH,cAAc,MAAM,WAAW,QAAQ;;iBAEvC,sBAAsB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ,gBAAgB;;iBAEvG,YAAY,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;;;;;iBAM7E,oBAAoB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;UAE5F;WACC,aAAa,KAAK;WAClB,gBAAgB,KAAK;;;iBAGf,mBAAmB,iBAAiB,SAAS,iBAAiB;;iBAE9D,eAAe,MAAM,aAAa,QAAQ,KAAK,yBAAyB;;iBAExE,iBAAiB,oBAAoB,QAAQ,KAAK;;iBAElD,sBAAsB,iBAAiB,SAAS,iBAAiB;;iBAEjE,2BAA2B,iBAAiB,YAAY,2BAA2B,SAAS;;iBAE5F,kBAAkB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;iBAEnF,qBAAqB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;UAE7F;WACC,OAAO;WACP,QAAQ;WACR;aACE;aACA;aACA;;aAEA;aACA;;;;;;;;iBAQI,yBAAyB,gBAAgB,aAAa;;;;;iBAKtD,uBAAuB,UAAU,iBAAiB,oBAAoB,aAAa;;;;;;;iBAOnF,uBAAuB,cAAc,oBAAoB,sBAAsB"}
@@ -1,4 +1,4 @@
1
- //#region ../../../2-sql/1-core/contract/dist/numeral-text-Cqu87pVe.mjs
1
+ //#region ../../../2-sql/1-core/contract/dist/data-type.mjs
2
2
  /**
3
3
  * A number as a contract source writes it: no exponent, because no schema language has that syntax,
4
4
  * so the decimal point moves to where the exponent puts it. A non-finite number is its own word.
@@ -17,4 +17,4 @@ function numeralText(value) {
17
17
  //#endregion
18
18
  export { numeralText as t };
19
19
 
20
- //# sourceMappingURL=numeral-text-Cqu87pVe-DJCqBaSC.mjs.map
20
+ //# sourceMappingURL=data-type-DKk8Unnz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-DKk8Unnz.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type.mjs"],"sourcesContent":["import { a as resolveReportedSqlType, c as sqlDataType, d as sqlStorageTypeId, f as sqlStorageTypeOfCodec, h as validateSqlTypeParams, i as renderSqlTypeName, l as sqlDataTypeOfCodec, m as unquotedSqlBaseNameOfCodec, n as isSqlDataType, o as resolveWrittenSqlTypes, p as unquotedSqlBaseName, r as renderSqlCatalogText, s as sqlBaseName, t as findSqlDataTypeCollision, u as sqlStorageType } from \"./sql-data-type-Dabuwxet.mjs\";\n//#region src/numeral-text.ts\n/**\n* A number as a contract source writes it: no exponent, because no schema language has that syntax,\n* so the decimal point moves to where the exponent puts it. A non-finite number is its own word.\n*/\nfunction numeralText(value) {\n\tconst [coefficient = \"\", exponent] = String(value).split(\"e\");\n\tif (exponent === void 0) return coefficient;\n\tconst sign = coefficient.startsWith(\"-\") ? \"-\" : \"\";\n\tconst [whole = \"\", fraction = \"\"] = coefficient.slice(sign.length).split(\".\");\n\tconst digits = `${whole}${fraction}`;\n\tconst point = whole.length + Number(exponent);\n\tif (point <= 0) return `${sign}0.${\"0\".repeat(-point)}${digits}`;\n\tif (point >= digits.length) return `${sign}${digits}${\"0\".repeat(point - digits.length)}`;\n\treturn `${sign}${digits.slice(0, point)}.${digits.slice(point)}`;\n}\n//#endregion\nexport { findSqlDataTypeCollision, isSqlDataType, numeralText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, resolveWrittenSqlTypes, sqlBaseName, sqlDataType, sqlDataTypeOfCodec, sqlStorageType, sqlStorageTypeId, sqlStorageTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };\n\n//# sourceMappingURL=data-type.mjs.map"],"mappings":";;;;;AAMA,SAAS,YAAY,OAAO;CAC3B,MAAM,CAAC,cAAc,IAAI,YAAY,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG;CAC5D,IAAI,aAAa,KAAK,GAAG,OAAO;CAChC,MAAM,OAAO,YAAY,WAAW,GAAG,IAAI,MAAM;CACjD,MAAM,CAAC,QAAQ,IAAI,WAAW,MAAM,YAAY,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,GAAG;CAC5E,MAAM,SAAS,GAAG,QAAQ;CAC1B,MAAM,QAAQ,MAAM,SAAS,OAAO,QAAQ;CAC5C,IAAI,SAAS,GAAG,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,IAAI;CACxD,IAAI,SAAS,OAAO,QAAQ,OAAO,GAAG,OAAO,SAAS,IAAI,OAAO,QAAQ,OAAO,MAAM;CACtF,OAAO,GAAG,OAAO,OAAO,MAAM,GAAG,KAAK,EAAE,GAAG,OAAO,MAAM,KAAK;AAC9D"}
@@ -1,9 +1,7 @@
1
- import { t as numeralText } from "./numeral-text-Cqu87pVe-DJCqBaSC.mjs";
2
1
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
2
  import { isNonFiniteText } from "@prisma/orm-framework/components/codec";
4
3
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
5
4
  //#region ../../../2-sql/1-core/contract/dist/data-type-support.mjs
6
- const INTEGER_TEXT = /^-?\d+$/;
7
5
  const WRITTEN_INTEGER_TEXT = /^[+-]?\d+$/;
8
6
  const WRITTEN_DECIMAL_TEXT = /^[+-]?\d+\.\d+$/;
9
7
  const DECIMAL_NUMERAL = /^([+-]?)0*(\d+)(\.\d+)?$/;
@@ -15,24 +13,13 @@ function isNumeralText(text) {
15
13
  * A written numeral as the contract stores it. Leading zeros and the sign of zero never change a
16
14
  * number, so they go; trailing zeros stay, because a type without a scale keeps them.
17
15
  */
18
- function canonicalNumeralText(text) {
16
+ function storedNumeralText(text) {
19
17
  const numeral = DECIMAL_NUMERAL.exec(text);
20
18
  if (numeral === null) return text;
21
19
  const [, sign = "", whole = "", fraction = ""] = numeral;
22
20
  const digits = `${whole}${fraction}`;
23
21
  return sign !== "-" || /^[0.]+$/.test(digits) ? digits : `-${digits}`;
24
22
  }
25
- /**
26
- * The canonical form of a 64-bit integer type: digit text. A database reads an integer default back as a number when it is a safe integer, so a safe integer reads as its digit text too; any other number may already have lost digits and is refused.
27
- */
28
- const integerTextCanonicalForm = (value) => {
29
- if (typeof value === "number" && Number.isSafeInteger(value)) return numeralText(value);
30
- if (typeof value === "string" && INTEGER_TEXT.test(value)) return BigInt(value).toString();
31
- throw structuredError("CONTRACT.CAST_REFUSED", `Expected digit text or a safe integer, got ${JSON.stringify(value)}.`, {
32
- why: "A 64-bit integer type stores its value as digit text, and a number past the safe integer range may already have lost digits.",
33
- fix: "Write the value as digit text."
34
- });
35
- };
36
23
  /** A string as a contract source writes it, with the escapes its string reader resolves. */
37
24
  function escapePslString(value) {
38
25
  return value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r");
@@ -47,7 +34,7 @@ function signedRange(bits) {
47
34
  }
48
35
  /**
49
36
  * The classifier one target's plain-number authoring entry carries: it reads the digits and says
50
- * which of the target's types the value is, in that type's canonical form. `undefined` means no
37
+ * which of the target's types the value is, in that type's stored form. `undefined` means no
51
38
  * type of this target holds the number.
52
39
  */
53
40
  function createNumberClassifier(spec) {
@@ -58,7 +45,7 @@ function createNumberClassifier(spec) {
58
45
  return (text) => {
59
46
  if (isNonFiniteText(text)) return as(spec.words, spec.words?.form === "number" ? Number(text) : text);
60
47
  if (WRITTEN_DECIMAL_TEXT.test(text)) {
61
- const canonical = canonicalNumeralText(text);
48
+ const canonical = storedNumeralText(text);
62
49
  return as(spec.fraction, spec.fraction?.form === "number" ? Number(canonical) : canonical);
63
50
  }
64
51
  if (!WRITTEN_INTEGER_TEXT.test(text)) return void 0;
@@ -113,7 +100,7 @@ function nonFiniteNumberIn(value, path) {
113
100
  }
114
101
  }
115
102
  /**
116
- * The reader the SQL targets build the canonical form of each date and time type with; ADR 254
103
+ * The reader the SQL targets build the stored form of each date and time type with; ADR 254
117
104
  * states the forms and the text it reads.
118
105
  */
119
106
  const SHAPES = {
@@ -175,7 +162,7 @@ const MIDNIGHT = {
175
162
  };
176
163
  function refused(message) {
177
164
  throw structuredError("CONTRACT.CAST_REFUSED", message, {
178
- why: "A date or time type stores one canonical form for each value (ADR 254).",
165
+ why: "A date or time type stores one form for each value (ADR 254).",
179
166
  fix: "Write text the type holds, as the message shows."
180
167
  });
181
168
  }
@@ -334,18 +321,18 @@ function printed(value, shape) {
334
321
  if (shape === "dateTime") return `${dateText(date)}T${timeText(time)}`;
335
322
  return `${dateText(date)}T${timeText(time)}Z`;
336
323
  }
337
- /** The position of a range bound, which the data type declares in canonical form. */
324
+ /** The position of a range bound, which the data type declares in stored form. */
338
325
  function boundPosition(text, shape) {
339
326
  const written = readWritten(text);
340
- if (written === void 0) throw new InternalError(`The range bound "${text}" is not in canonical form.`);
327
+ if (written === void 0) throw new InternalError(`The range bound "${text}" is not in its stored form.`);
341
328
  return position(normalized(written, shape));
342
329
  }
343
330
  /**
344
- * The canonical form of written date or time text, or a refusal with a message that says what is
331
+ * The stored form of written date or time text, or a refusal with a message that says what is
345
332
  * wrong and shows text the type holds. `written` is the text as its author wrote it, which the
346
333
  * message shows, when a target rewrote it into ISO 8601 before calling this.
347
334
  */
348
- function canonicalDateTime(text, options, written = text) {
335
+ function dateTimeStoredText(text, options, written = text) {
349
336
  const shape = SHAPES[options.shape];
350
337
  const { ownerId: id } = options;
351
338
  const parts = readWritten(text);
@@ -372,6 +359,6 @@ function canonicalDateTime(text, options, written = text) {
372
359
  return printed(value, options.shape);
373
360
  }
374
361
  //#endregion
375
- export { integerTextCanonicalForm as a, printJsonText as c, escapePslString as i, signedRange as l, canonicalNumeralText as n, isNumeralText as o, createNumberClassifier as r, parseJsonText as s, canonicalDateTime as t };
362
+ export { parseJsonText as a, storedNumeralText as c, isNumeralText as i, dateTimeStoredText as n, printJsonText as o, escapePslString as r, signedRange as s, createNumberClassifier as t };
376
363
 
377
- //# sourceMappingURL=data-type-support-CfhpAKLX.mjs.map
364
+ //# sourceMappingURL=data-type-support-C5-XxxeB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-support-C5-XxxeB.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type-support.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\nimport { isNonFiniteText } from \"@internal/framework-components/codec\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/data-type-support.ts\nconst WRITTEN_INTEGER_TEXT = /^[+-]?\\d+$/;\nconst WRITTEN_DECIMAL_TEXT = /^[+-]?\\d+\\.\\d+$/;\nconst DECIMAL_NUMERAL = /^([+-]?)0*(\\d+)(\\.\\d+)?$/;\n/** Whether `text` is a whole number or a decimal as a contract source writes one. */\nfunction isNumeralText(text) {\n\treturn WRITTEN_INTEGER_TEXT.test(text) || WRITTEN_DECIMAL_TEXT.test(text);\n}\n/**\n* A written numeral as the contract stores it. Leading zeros and the sign of zero never change a\n* number, so they go; trailing zeros stay, because a type without a scale keeps them.\n*/\nfunction storedNumeralText(text) {\n\tconst numeral = DECIMAL_NUMERAL.exec(text);\n\tif (numeral === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = numeral;\n\tconst digits = `${whole}${fraction}`;\n\treturn sign !== \"-\" || /^[0.]+$/.test(digits) ? digits : `-${digits}`;\n}\n/** A string as a contract source writes it, with the escapes its string reader resolves. */\nfunction escapePslString(value) {\n\treturn value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\").replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\");\n}\n/** The range of a signed integer of `bits` bits. */\nfunction signedRange(bits) {\n\tconst half = 2n ** (BigInt(bits) - 1n);\n\treturn {\n\t\tmin: -half,\n\t\tmax: half - 1n\n\t};\n}\n/**\n* The classifier one target's plain-number authoring entry carries: it reads the digits and says\n* which of the target's types the value is, in that type's stored form. `undefined` means no\n* type of this target holds the number.\n*/\nfunction createNumberClassifier(spec) {\n\tconst as = (classification, value) => classification === void 0 ? void 0 : {\n\t\ttype: classification.type,\n\t\tvalue\n\t};\n\treturn (text) => {\n\t\tif (isNonFiniteText(text)) return as(spec.words, spec.words?.form === \"number\" ? Number(text) : text);\n\t\tif (WRITTEN_DECIMAL_TEXT.test(text)) {\n\t\t\tconst canonical = storedNumeralText(text);\n\t\t\treturn as(spec.fraction, spec.fraction?.form === \"number\" ? Number(canonical) : canonical);\n\t\t}\n\t\tif (!WRITTEN_INTEGER_TEXT.test(text)) return void 0;\n\t\tconst digits = BigInt(text);\n\t\tconst classification = spec.integers.find(({ min, max }) => digits >= min && digits <= max) ?? spec.largerWhole;\n\t\treturn as(classification, classification?.form === \"number\" ? Number(digits) : digits.toString());\n\t};\n}\n/**\n* Read JSON text into the document it holds.\n*\n* `JSON.parse` reads a numeral too large for a double as `Infinity`, and `JSON.stringify` writes\n* that back as `null`, so a document holding one would not be the document stored; it is refused\n* here instead, naming where the number is.\n*/\nfunction parseJsonText(text) {\n\tlet value;\n\ttry {\n\t\tvalue = JSON.parse(text);\n\t} catch (error) {\n\t\tthrow structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", error instanceof Error ? error.message : String(error), {\n\t\t\twhy: \"The text is not a JSON document.\",\n\t\t\tfix: \"Write a JSON document.\"\n\t\t});\n\t}\n\tconst overflowed = nonFiniteNumberIn(value, \"\");\n\tif (overflowed !== void 0) throw structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", `${overflowed.path} is ${overflowed.value}, which JSON cannot write back: the number in the text is outside the range a JSON number holds.`, {\n\t\twhy: \"JSON.parse reads a numeral too large for a double as Infinity, which JSON.stringify writes back as null.\",\n\t\tfix: \"Write a number JSON can hold, or write it as text.\"\n\t});\n\treturn value;\n}\n/** Write a document as the text of a JSON literal. */\nfunction printJsonText(value) {\n\treturn JSON.stringify(value);\n}\nfunction nonFiniteNumberIn(value, path) {\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : {\n\t\tpath: path === \"\" ? \"The value\" : path,\n\t\tvalue\n\t};\n\tif (Array.isArray(value)) {\n\t\tfor (const [index, element] of value.entries()) {\n\t\t\tconst found = nonFiniteNumberIn(element, `${path}[${index}]`);\n\t\t\tif (found !== void 0) return found;\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof value === \"object\" && value !== null) for (const [key, member] of Object.entries(value)) {\n\t\tconst found = nonFiniteNumberIn(member, path === \"\" ? key : `${path}.${key}`);\n\t\tif (found !== void 0) return found;\n\t}\n}\n//#endregion\n//#region src/date-time-stored-form.ts\n/**\n* The reader the SQL targets build the stored form of each date and time type with; ADR 254\n* states the forms and the text it reads.\n*/\nconst SHAPES = {\n\tdate: {\n\t\tdescription: \"a date\",\n\t\tplural: \"dates\",\n\t\texample: \"2024-01-01\",\n\t\tdate: true,\n\t\ttime: false,\n\t\toffset: false\n\t},\n\ttime: {\n\t\tdescription: \"a time of day\",\n\t\tplural: \"times of day\",\n\t\texample: \"12:34:56\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\ttimeWithOffset: {\n\t\tdescription: \"a time of day with a UTC offset\",\n\t\tplural: \"times of day with a UTC offset\",\n\t\texample: \"12:34:56+02:00\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: true\n\t},\n\tdateTime: {\n\t\tdescription: \"a date and time\",\n\t\tplural: \"dates and times\",\n\t\texample: \"2024-01-01T12:34:56\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\tinstant: {\n\t\tdescription: \"a date and time with a UTC offset\",\n\t\tplural: \"instants\",\n\t\texample: \"2024-01-01T12:34:56Z\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: true\n\t}\n};\nconst DATE_PREFIX = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})/;\nconst TIME_PREFIX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?/;\nconst OFFSET = /^([+-])(\\d{2})(?::(\\d{2})(?::(\\d{2}))?)?$/;\nconst MAX_FRACTION_DIGITS = 6;\nconst FRACTION_UNITS = {\n\t3: \"milliseconds\",\n\t6: \"microseconds\"\n};\nconst SECONDS_PER_DAY = 86400;\nconst MIDNIGHT = {\n\thour: 0,\n\tminute: 0,\n\tsecond: 0,\n\tfraction: \"\"\n};\nfunction refused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"A date or time type stores one form for each value (ADR 254).\",\n\t\tfix: \"Write text the type holds, as the message shows.\"\n\t});\n}\nfunction isLeapYear(year) {\n\treturn year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nfunction daysInMonth(year, month) {\n\tif (month === 2) return isLeapYear(year) ? 29 : 28;\n\treturn [\n\t\t4,\n\t\t6,\n\t\t9,\n\t\t11\n\t].includes(month) ? 30 : 31;\n}\n/** Days from 1970-01-01 to a date of the proleptic Gregorian calendar, with year 0 as 1 BC. */\nfunction daysFromCivil({ year, month, day }) {\n\tconst shifted = month <= 2 ? year - 1 : year;\n\tconst era = Math.floor(shifted / 400);\n\tconst yearOfEra = shifted - era * 400;\n\tconst dayOfYear = Math.floor((153 * (month + (month > 2 ? -3 : 9)) + 2) / 5) + day - 1;\n\tconst dayOfEra = yearOfEra * 365 + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100) + dayOfYear;\n\treturn era * 146097 + dayOfEra - 719468;\n}\nfunction civilFromDays(days) {\n\tconst shifted = days + 719468;\n\tconst era = Math.floor(shifted / 146097);\n\tconst dayOfEra = shifted - era * 146097;\n\tconst yearOfEra = Math.floor((dayOfEra - Math.floor(dayOfEra / 1460) + Math.floor(dayOfEra / 36524) - Math.floor(dayOfEra / 146096)) / 365);\n\tconst dayOfYear = dayOfEra - (365 * yearOfEra + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100));\n\tconst monthIndex = Math.floor((5 * dayOfYear + 2) / 153);\n\tconst day = dayOfYear - Math.floor((153 * monthIndex + 2) / 5) + 1;\n\tconst month = monthIndex < 10 ? monthIndex + 3 : monthIndex - 9;\n\treturn {\n\t\tyear: yearOfEra + era * 400 + (month <= 2 ? 1 : 0),\n\t\tmonth,\n\t\tday\n\t};\n}\nfunction pad(value, width = 2) {\n\treturn String(value).padStart(width, \"0\");\n}\nfunction yearText(year) {\n\tif (year >= 0 && year <= 9999) return pad(year, 4);\n\treturn `${year < 0 ? \"-\" : \"+\"}${pad(Math.abs(year), 6)}`;\n}\nfunction dateText(date) {\n\treturn `${yearText(date.year)}-${pad(date.month)}-${pad(date.day)}`;\n}\nfunction timeText(time) {\n\tconst fraction = time.fraction.replace(/0+$/, \"\");\n\treturn `${pad(time.hour)}:${pad(time.minute)}:${pad(time.second)}${fraction === \"\" ? \"\" : `.${fraction}`}`;\n}\nfunction offsetText(seconds) {\n\tif (seconds === 0) return \"Z\";\n\tconst magnitude = Math.abs(seconds);\n\tconst rest = magnitude % 60;\n\treturn `${seconds < 0 ? \"-\" : \"+\"}${pad(Math.floor(magnitude / 3600))}:${pad(Math.floor(magnitude / 60) % 60)}${rest === 0 ? \"\" : `:${pad(rest)}`}`;\n}\n/**\n* The fields of an ISO 8601 date, time, or date and time, or `undefined` when the text is not one.\n* Ranges are checked by the caller, which words the refusal.\n*/\nfunction readWritten(text) {\n\tlet rest = text;\n\tlet date;\n\tlet timeFollows = true;\n\tconst dateMatch = DATE_PREFIX.exec(rest);\n\tif (dateMatch !== null) {\n\t\tconst [whole, yearDigits = \"\", month = \"\", day = \"\"] = dateMatch;\n\t\tif (yearDigits === \"-000000\") return void 0;\n\t\tdate = {\n\t\t\tyear: Number(yearDigits),\n\t\t\tmonth: Number(month),\n\t\t\tday: Number(day)\n\t\t};\n\t\trest = rest.slice(whole.length);\n\t\ttimeFollows = /^[Tt ]/.test(rest);\n\t\tif (timeFollows) rest = rest.slice(1);\n\t}\n\tlet time;\n\tlet fractionDigits = 0;\n\tif (timeFollows) {\n\t\tconst timeMatch = TIME_PREFIX.exec(rest);\n\t\tif (timeMatch === null) return void 0;\n\t\tconst [whole, hour = \"\", minute = \"\", second = \"00\", fraction = \"\"] = timeMatch;\n\t\ttime = {\n\t\t\thour: Number(hour),\n\t\t\tminute: Number(minute),\n\t\t\tsecond: Number(second),\n\t\t\tfraction\n\t\t};\n\t\tfractionDigits = fraction.length;\n\t\trest = rest.slice(whole.length);\n\t}\n\tlet offsetSeconds;\n\tif (rest === \"Z\" || rest === \"z\") offsetSeconds = 0;\n\telse if (rest !== \"\") {\n\t\tconst offset = OFFSET.exec(rest);\n\t\tif (offset === null) return void 0;\n\t\tconst [, sign, hours = \"\", minutes = \"00\", seconds = \"00\"] = offset;\n\t\tif (Number(minutes) > 59 || Number(seconds) > 59) return void 0;\n\t\tconst magnitude = Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds);\n\t\toffsetSeconds = sign === \"-\" ? -magnitude : magnitude;\n\t}\n\treturn {\n\t\tdate,\n\t\ttime,\n\t\toffsetSeconds,\n\t\tfractionDigits\n\t};\n}\nfunction withFraction(example, digits) {\n\treturn example.replace(/(\\d{2}:\\d{2}:\\d{2})/, `$1.${\"123456\".slice(0, digits)}`);\n}\n/** The value with an instant moved to UTC. */\nfunction normalized(written, shape) {\n\tconst clock = written.time ?? MIDNIGHT;\n\tconst offsetSeconds = written.offsetSeconds ?? 0;\n\tif (written.date === void 0 || shape !== \"instant\") return {\n\t\tdate: written.date,\n\t\ttime: clock,\n\t\toffsetSeconds\n\t};\n\tconst utc = daysFromCivil(written.date) * SECONDS_PER_DAY + clock.hour * 3600 + clock.minute * 60 + clock.second - offsetSeconds;\n\tconst days = Math.floor(utc / SECONDS_PER_DAY);\n\tconst secondOfDay = utc - days * SECONDS_PER_DAY;\n\treturn {\n\t\tdate: civilFromDays(days),\n\t\ttime: {\n\t\t\thour: Math.floor(secondOfDay / 3600),\n\t\t\tminute: Math.floor(secondOfDay / 60) % 60,\n\t\t\tsecond: secondOfDay % 60,\n\t\t\tfraction: clock.fraction\n\t\t},\n\t\toffsetSeconds: 0\n\t};\n}\nfunction position(value) {\n\tconst { time } = value;\n\treturn [\n\t\tvalue.date === void 0 ? 0 : daysFromCivil(value.date),\n\t\ttime.hour * 3600 + time.minute * 60 + time.second,\n\t\ttime.fraction.padEnd(MAX_FRACTION_DIGITS, \"0\")\n\t];\n}\nfunction isBefore(left, right) {\n\tif (left[0] !== right[0]) return left[0] < right[0];\n\tif (left[1] !== right[1]) return left[1] < right[1];\n\treturn left[2] < right[2];\n}\nfunction printed(value, shape) {\n\tconst { date, time, offsetSeconds } = value;\n\tif (date === void 0) return shape === \"timeWithOffset\" ? `${timeText(time)}${offsetText(offsetSeconds)}` : timeText(time);\n\tif (shape === \"date\") return dateText(date);\n\tif (shape === \"dateTime\") return `${dateText(date)}T${timeText(time)}`;\n\treturn `${dateText(date)}T${timeText(time)}Z`;\n}\n/** The position of a range bound, which the data type declares in stored form. */\nfunction boundPosition(text, shape) {\n\tconst written = readWritten(text);\n\tif (written === void 0) throw new InternalError(`The range bound \"${text}\" is not in its stored form.`);\n\treturn position(normalized(written, shape));\n}\n/**\n* The stored form of written date or time text, or a refusal with a message that says what is\n* wrong and shows text the type holds. `written` is the text as its author wrote it, which the\n* message shows, when a target rewrote it into ISO 8601 before calling this.\n*/\nfunction dateTimeStoredText(text, options, written = text) {\n\tconst shape = SHAPES[options.shape];\n\tconst { ownerId: id } = options;\n\tconst parts = readWritten(text);\n\tif (parts === void 0) refused(`${id} cannot read \"${written}\". Write ${shape.description}, as in \"${shape.example}\".`);\n\tif (parts.date !== void 0 && !shape.date) refused(`${id} holds a time of day without a date, but \"${written}\" has a date. Write the time alone, as in \"${shape.example}\".`);\n\tif (parts.date === void 0 && shape.date) refused(shape.time ? `${id} holds ${shape.description}, but \"${written}\" has no date. Write the date too, as in \"${shape.example}\".` : `${id} holds a date, and \"${written}\" is a time of day. Write a date, as in \"${shape.example}\".`);\n\tif (parts.time !== void 0 && !shape.time) refused(`${id} holds a date without a time of day, but \"${written}\" has a time. Write the date alone, as in \"${shape.example}\".`);\n\tif (parts.time === void 0 && shape.offset) refused(`${id} holds ${shape.description}, but \"${written}\" has no time of day. Write the time too, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds !== void 0 && !shape.offset) refused(`${id} holds no UTC offset, but \"${written}\" has one. Leave it out, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds === void 0 && shape.offset) refused(`${id} needs a UTC offset, but \"${written}\" has none. Add Z for UTC or an offset such as +02:00, as in \"${shape.example}\".`);\n\tconst maxFractionDigits = options.maxFractionDigits ?? MAX_FRACTION_DIGITS;\n\tif (parts.fractionDigits > maxFractionDigits) refused(`\"${written}\" has ${parts.fractionDigits} digits after the decimal point, but ${id} holds ${FRACTION_UNITS[maxFractionDigits]}, so at most ${maxFractionDigits}. Round it, as in \"${withFraction(shape.example, maxFractionDigits)}\".`);\n\tconst { date, time } = parts;\n\tif (date !== void 0 && (date.month < 1 || date.month > 12 || date.day < 1 || date.day > daysInMonth(date.year, date.month))) refused(`\"${written}\" is not a date that exists. Write a real date, as in \"${shape.example}\".`);\n\tif (time !== void 0 && (time.hour > 23 || time.minute > 59 || time.second > 59)) refused(`\"${written}\" is not a time of day that exists: hours run from 00 to 23, and minutes and seconds from 00 to 59. Write one, as in \"${shape.example}\".`);\n\tconst offsetLimit = options.maxOffsetHours ?? 23;\n\tif (parts.offsetSeconds !== void 0 && Math.abs(parts.offsetSeconds) >= (offsetLimit + 1) * 3600) refused(`\"${written}\" has a UTC offset outside -${pad(offsetLimit)}:59 to +${pad(offsetLimit)}:59, which ${id} does not hold. Write a smaller offset, as in \"${shape.example}\".`);\n\tconst value = normalized(parts, options.shape);\n\tconst { range } = options;\n\tif (range !== void 0) {\n\t\tconst at = position(value);\n\t\tif (isBefore(at, boundPosition(range.earliest, options.shape)) || isBefore(boundPosition(range.latest, options.shape), at)) refused(`${id} holds ${shape.plural} from ${range.earliest} to ${range.latest}, and \"${written}\" is outside them.`);\n\t}\n\treturn printed(value, options.shape);\n}\n//#endregion\nexport { createNumberClassifier, dateTimeStoredText, escapePslString, isNumeralText, parseJsonText, printJsonText, signedRange, storedNumeralText };\n\n//# sourceMappingURL=data-type-support.mjs.map"],"mappings":";;;;AAIA,MAAM,uBAAuB;AAC7B,MAAM,uBAAuB;AAC7B,MAAM,kBAAkB;;AAExB,SAAS,cAAc,MAAM;CAC5B,OAAO,qB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Aa,GAAG,iDAAiD,MAAM,QAAQ,GAAG;CACjR,MAAM,QAAQ,WAAW,OAAO,QAAQ,KAAK;CAC7C,MAAM,EAAE,UAAU;CAClB,IAAI,UAAU,KAAK,GAAG;EACrB,MAAM,KAAK,SAAS,KAAK;EACzB,IAAI,SAAS,IAAI,cAAc,MAAM,UAAU,QAAQ,KAAK,CAAC,KAAK,SAAS,cAAc,MAAM,QAAQ,QAAQ,KAAK,GAAG,EAAE,GAAG,QAAQ,GAAG,GAAG,SAAS,MAAM,OAAO,QAAQ,MAAM,SAAS,MAAM,MAAM,OAAO,SAAS,QAAQ,mBAAmB;CAC/O;CACA,OAAO,QAAQ,OAAO,QAAQ,KAAK;AACpC"}
@@ -1,4 +1,4 @@
1
- import { DataTypeId, ToCanonicalForm } from "@prisma/orm-framework/components/codec";
1
+ import { DataTypeId } from "@prisma/orm-framework/components/codec";
2
2
  import { JsonValue } from "@prisma/orm-framework/contract/types";
3
3
  //#region ../../../2-sql/1-core/contract/dist/data-type-support.d.mts
4
4
  //#region src/data-type-support.d.ts
@@ -8,11 +8,7 @@ declare function isNumeralText(text: string): boolean;
8
8
  * A written numeral as the contract stores it. Leading zeros and the sign of zero never change a
9
9
  * number, so they go; trailing zeros stay, because a type without a scale keeps them.
10
10
  */
11
- declare function canonicalNumeralText(text: string): string;
12
- /**
13
- * The canonical form of a 64-bit integer type: digit text. A database reads an integer default back as a number when it is a safe integer, so a safe integer reads as its digit text too; any other number may already have lost digits and is refused.
14
- */
15
- declare const integerTextCanonicalForm: ToCanonicalForm;
11
+ declare function storedNumeralText(text: string): string;
16
12
  /** A string as a contract source writes it, with the escapes its string reader resolves. */
17
13
  declare function escapePslString(value: string): string;
18
14
  /** Which data type a written number is, and whether that type stores it as a number or as text. */
@@ -42,7 +38,7 @@ interface NumberClassifierSpec {
42
38
  }
43
39
  /**
44
40
  * The classifier one target's plain-number authoring entry carries: it reads the digits and says
45
- * which of the target's types the value is, in that type's canonical form. `undefined` means no
41
+ * which of the target's types the value is, in that type's stored form. `undefined` means no
46
42
  * type of this target holds the number.
47
43
  */
48
44
  declare function createNumberClassifier(spec: NumberClassifierSpec): (text: string) => {
@@ -60,33 +56,33 @@ declare function parseJsonText(text: string): JsonValue;
60
56
  /** Write a document as the text of a JSON literal. */
61
57
  declare function printJsonText(value: JsonValue): string;
62
58
  //#endregion
63
- //#region src/date-time-canonical-form.d.ts
59
+ //#region src/date-time-stored-form.d.ts
64
60
  /**
65
- * The reader the SQL targets build the canonical form of each date and time type with; ADR 254
61
+ * The reader the SQL targets build the stored form of each date and time type with; ADR 254
66
62
  * states the forms and the text it reads.
67
63
  */
68
64
  /** What a date or time type holds, which decides the text it reads and writes. */
69
65
  type DateTimeShape = 'date' | 'time' | 'timeWithOffset' | 'dateTime' | 'instant';
70
- interface CanonicalDateTimeOptions {
66
+ interface DateTimeStoredTextOptions {
71
67
  readonly shape: DateTimeShape;
72
- /** The id of the data type or codec that declares this canonical form, which messages name. */
68
+ /** The id of the data type or codec that declares this stored form, which messages name. */
73
69
  readonly ownerId: string;
74
70
  /** The largest UTC offset the type holds, in hours. Defaults to 23. */
75
71
  readonly maxOffsetHours?: number;
76
72
  /** The most digits after the decimal point the type holds. Defaults to 6, microseconds. */
77
73
  readonly maxFractionDigits?: 3 | 6;
78
- /** The earliest and latest values the type holds, each in canonical form. */
74
+ /** The earliest and latest values the type holds, each in stored form. */
79
75
  readonly range?: {
80
76
  readonly earliest: string;
81
77
  readonly latest: string;
82
78
  };
83
79
  }
84
80
  /**
85
- * The canonical form of written date or time text, or a refusal with a message that says what is
81
+ * The stored form of written date or time text, or a refusal with a message that says what is
86
82
  * wrong and shows text the type holds. `written` is the text as its author wrote it, which the
87
83
  * message shows, when a target rewrote it into ISO 8601 before calling this.
88
84
  */
89
- declare function canonicalDateTime(text: string, options: CanonicalDateTimeOptions, written?: string): string;
85
+ declare function dateTimeStoredText(text: string, options: DateTimeStoredTextOptions, written?: string): string;
90
86
  //#endregion
91
- export { NumberClassifierSpec as a, createNumberClassifier as c, isNumeralText as d, parseJsonText as f, NumberClassification as i, escapePslString as l, signedRange as m, DateTimeShape as n, canonicalDateTime as o, printJsonText as p, IntegerStep as r, canonicalNumeralText as s, CanonicalDateTimeOptions as t, integerTextCanonicalForm as u };
92
- //# sourceMappingURL=data-type-support-4TcZuD7d.d.mts.map
87
+ export { NumberClassifierSpec as a, escapePslString as c, printJsonText as d, signedRange as f, NumberClassification as i, isNumeralText as l, DateTimeStoredTextOptions as n, createNumberClassifier as o, storedNumeralText as p, IntegerStep as r, dateTimeStoredText as s, DateTimeShape as t, parseJsonText as u };
88
+ //# sourceMappingURL=data-type-support-CBcYhSkD.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-support-CBcYhSkD.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type-support.d.mts"],"mappings":";;;;;iBAIiB,cAAc;;;;;iBAKd,kBAAkB;;iBAElB,gBAAgB;;UAEvB;WACC,MAAM;WACN;;;UAGD,oBAAoB;WACnB;WACA;;;iBAGM,YAAY;WAClB;WACA;;UAED;;WAEC,mBAAmB;;WAEnB,cAAc;;WAEd,WAAW;;WAEX,QAAQ;;;;;;;iBAOF,uBAAuB,MAAM,wBAAwB;WAC3D,MAAM;WACN,OAAO;;;;;;;;;iBASD,cAAc,eAAe;;iBAE7B,cAAc,OAAO;;;;;;;;KAQjC;UACK;WACC,OAAO;;WAEP;;WAEA;;WAEA;;WAEA;aACE;aACA;;;;;;;;iBAQI,mBAAmB,cAAc,SAAS,2BAA2B"}
@@ -1,15 +1,15 @@
1
1
  import { r as StorageTable } from "./storage-table-DC9afJhr-CmRU56OS.mjs";
2
2
  import { D as QueryOperationTypesBase, _ as ExtractStorageColumnTypes, d as ExtractAggregateTypes, f as ExtractCodecTypes, g as ExtractStorageColumnInputTypes, h as ExtractQueryOperationTypes, r as AggregateTypesBase } from "./types-Dqf87mfA-BOElvimQ.mjs";
3
3
  import { c as StorageColumnMapAt } from "./types-DMfBh16_.mjs";
4
- import { St as OrderByNulls, l as AnyFromSource } from "./types-Sh5HuaZE-BwZNUDEi.mjs";
5
- import { n as SqlQueryPlan } from "./plan-cGEaSXHv-yuz43WrR.mjs";
6
- import { C as TraitExpression, S as StorageColumnScopeField, c as RawAffectedCountQuery, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, o as Expression, s as NoReservedRowColumn, x as ScopeField } from "./expression-Ck1wys3N-Cdc7eUQS.mjs";
7
- import "./expression-DUYovBa6.mjs";
8
- import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-DSwXxsTg.mjs";
9
- import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-BoM9T1b2.mjs";
10
- import { r as TableIndexReferences } from "./index-reference-DJX-CNsb-D5uoBnH_.mjs";
11
- import "./index-reference-DGQdSRjQ.mjs";
12
- import "./plan-DdpaNNu1.mjs";
4
+ import { St as OrderByNulls, l as AnyFromSource } from "./types-DVaVM20q-B-QcMIOa.mjs";
5
+ import { n as SqlQueryPlan } from "./plan-Cbed2eDu-BZM3geSm.mjs";
6
+ import { C as TraitExpression, S as StorageColumnScopeField, c as RawAffectedCountQuery, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, o as Expression, s as NoReservedRowColumn, x as ScopeField } from "./expression-BzrfOiPC-3NqR8UzK.mjs";
7
+ import "./expression-CeerCjQG.mjs";
8
+ import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-Cp8soSAv.mjs";
9
+ import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-Dzsat0Zb.mjs";
10
+ import { r as TableIndexReferences } from "./index-reference-DJaQLZA3-DxmYkkX-.mjs";
11
+ import "./index-reference-CWppFpUV.mjs";
12
+ import "./plan-BZpZafiQ.mjs";
13
13
  import { AnnotationValue, OperationKind, ValidAnnotations } from "@prisma/orm-framework/components/runtime";
14
14
  //#region ../../../2-sql/4-lanes/sql-builder/dist/db-BmrN9nRS.d.mts
15
15
  //#region src/scope.d.ts
@@ -531,4 +531,4 @@ type Namespace<C extends TableProxyContract, NsId extends string & keyof C['stor
531
531
  type Db<C extends TableProxyContract> = { readonly [Ns in keyof C['storage']['namespaces'] & string]: Namespace<C, Ns>; };
532
532
  //#endregion
533
533
  export { WhereFilter as C, UpdateQuery as S, TableInAnyNamespace as _, FieldProxy as a, TableProxyContract as b, IndexReferences as c, QueryContext as d, RawLane as f, SelectQuery as g, Scope as h, DeleteQuery as i, InsertQuery as l, ResolveRow as m, ContractRawTag as n, GatedMethod as o, RawTagFor as p, Db as r, GroupedQuery as s, AggregateFunctions as t, Namespace as u, TableNamesAcrossNamespaces as v, UnboundTables as x, TableProxy as y };
534
- //# sourceMappingURL=db-BmrN9nRS-CzyybGKR.d.mts.map
534
+ //# sourceMappingURL=db-BmrN9nRS-xynLbnAy.d.mts.map