@prisma/orm-target-postgres 8.0.0-rc.14-dev.6 → 8.0.0-rc.14-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/{adapter-CK9Nv-pg-DiFXST2r.mjs → adapter-Bb_FFDea-O-uPaHCy.mjs} +5 -5
  2. package/dist/{adapter-CK9Nv-pg-DiFXST2r.mjs.map → adapter-Bb_FFDea-O-uPaHCy.mjs.map} +1 -1
  3. package/dist/{adapter-DP_SQYED.d.mts → adapter-WLK_P3mT.d.mts} +3 -3
  4. package/dist/{adapter-DP_SQYED.d.mts.map → adapter-WLK_P3mT.d.mts.map} +1 -1
  5. package/dist/adapter.d.mts +8 -8
  6. package/dist/adapter.mjs +6 -6
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +1 -1
  9. package/dist/adapter__control.d.mts +3 -3
  10. package/dist/adapter__control.mjs +8 -369
  11. package/dist/adapter__control.mjs.map +1 -1
  12. package/dist/adapter__runtime.d.mts +1 -1
  13. package/dist/adapter__runtime.mjs +4 -5
  14. package/dist/adapter__runtime.mjs.map +1 -1
  15. package/dist/adapter__sql-renderer.d.mts +1 -1
  16. package/dist/adapter__sql-renderer.mjs +1 -1
  17. package/dist/adapter__types.d.mts +3 -3
  18. package/dist/{authoring-BmQxOggr-CK871YR4.mjs → authoring-DKN1ccEX-DgmJWx1r.mjs} +4 -4
  19. package/dist/{authoring-BmQxOggr-CK871YR4.mjs.map → authoring-DKN1ccEX-DgmJWx1r.mjs.map} +1 -1
  20. package/dist/{codec-descriptor-BfoHQP3R-CMRVT-F6.mjs → codec-descriptor-B61d-k4C-BdWVU6Fu.mjs} +4 -3
  21. package/dist/codec-descriptor-B61d-k4C-BdWVU6Fu.mjs.map +1 -0
  22. package/dist/codec-descriptor-D8_e5hpo.d.mts +1 -0
  23. package/dist/{codec-descriptor-DUUGoeyI-WGLGXEoI.d.mts → codec-descriptor-HYqjI24K-CTO3gTEs.d.mts} +11 -5
  24. package/dist/codec-descriptor-HYqjI24K-CTO3gTEs.d.mts.map +1 -0
  25. package/dist/{data-types-Cl18KnNY-5I34Vd6Z.mjs → codec-helpers-D83-1eDB-nqAEMr7N.mjs} +39 -216
  26. package/dist/codec-helpers-D83-1eDB-nqAEMr7N.mjs.map +1 -0
  27. package/dist/{codec-type-map-Cp91lhQd-D6zQ14YE.d.mts → codec-type-map-DMKy_xZb-DymgX4w7.d.mts} +4 -4
  28. package/dist/{codec-type-map-Cp91lhQd-D6zQ14YE.d.mts.map → codec-type-map-DMKy_xZb-DymgX4w7.d.mts.map} +1 -1
  29. package/dist/{codec-types-BQNq7Y1u-CGfS7PuD.d.mts → codec-types-B4-xhn7m-RQS461us.d.mts} +4 -4
  30. package/dist/{codec-types-BQNq7Y1u-CGfS7PuD.d.mts.map → codec-types-B4-xhn7m-RQS461us.d.mts.map} +1 -1
  31. package/dist/codec-types-Ci1nfCYh.d.mts +2 -0
  32. package/dist/{codecs-DQGmsnk3-H6nVRPCC.mjs → codecs-BHNqtI1J-BSS9sL3H.mjs} +263 -69
  33. package/dist/codecs-BHNqtI1J-BSS9sL3H.mjs.map +1 -0
  34. package/dist/{codecs-BKV97Xsa.d.mts → codecs-Ba3gUr67.d.mts} +11 -5
  35. package/dist/{codecs-BKV97Xsa.d.mts.map → codecs-Ba3gUr67.d.mts.map} +1 -1
  36. package/dist/{codecs-BZ87E3MY-Bub4t0ma.d.mts → codecs-Bkmbmo_r-Ct7hFY0S.d.mts} +31 -10
  37. package/dist/{codecs-BZ87E3MY-Bub4t0ma.d.mts.map → codecs-Bkmbmo_r-Ct7hFY0S.d.mts.map} +1 -1
  38. package/dist/{codecs-C4DVdgQG.mjs → codecs-Cytq8Ymj.mjs} +12 -4
  39. package/dist/codecs-Cytq8Ymj.mjs.map +1 -0
  40. package/dist/control-CUzQZfhu.d.mts +399 -0
  41. package/dist/control-CUzQZfhu.d.mts.map +1 -0
  42. package/dist/{control-BwOrmTN-.mjs → control-CYQReJto.mjs} +441 -72
  43. package/dist/control-CYQReJto.mjs.map +1 -0
  44. package/dist/{control-DhZYlj-u.d.mts → control-DoIm71dz.d.mts} +5 -4
  45. package/dist/control-DoIm71dz.d.mts.map +1 -0
  46. package/dist/{control-adapter-BaVlICog-BuVBXKoL.mjs → control-adapter-C6kz--Q4-3C9-f7Uv.mjs} +70 -47
  47. package/dist/control-adapter-C6kz--Q4-3C9-f7Uv.mjs.map +1 -0
  48. package/dist/{control-policy-BYo5QPof-BLT07t1y.mjs → control-policy-voGArjr--BeHlQRg0.mjs} +19 -17
  49. package/dist/control-policy-voGArjr--BeHlQRg0.mjs.map +1 -0
  50. package/dist/{data-type-entries-CvkBtAG--D-5Wtm9_.mjs → data-type-entries-BDSHvsdE-Bbe1cdbR.mjs} +3 -3
  51. package/dist/{data-type-entries-CvkBtAG--D-5Wtm9_.mjs.map → data-type-entries-BDSHvsdE-Bbe1cdbR.mjs.map} +1 -1
  52. package/dist/data-types-BqeC7aZP-CwvA08pH.mjs +200 -0
  53. package/dist/data-types-BqeC7aZP-CwvA08pH.mjs.map +1 -0
  54. package/dist/{default-normalizer-DKE2xbCP-EMLD6yNw.mjs → default-normalizer-Cb7nWBUa-DXchlOUk.mjs} +18 -8
  55. package/dist/default-normalizer-Cb7nWBUa-DXchlOUk.mjs.map +1 -0
  56. package/dist/{descriptor-meta-F1wsOtt2-D014LIGM.mjs → descriptor-meta-BEigA5Gj-By_dcUjB.mjs} +9 -7
  57. package/dist/descriptor-meta-BEigA5Gj-By_dcUjB.mjs.map +1 -0
  58. package/dist/{descriptor-meta-BOx9pvBv-C4TEXck8.mjs → descriptor-meta-DF0hODA0-DnO80XvH.mjs} +4 -4
  59. package/dist/{descriptor-meta-BOx9pvBv-C4TEXck8.mjs.map → descriptor-meta-DF0hODA0-DnO80XvH.mjs.map} +1 -1
  60. package/dist/{diff-database-schema-D835UIq8-BVO7jCE4.mjs → diff-database-schema-MYPfxeRf-DdgnOIIl.mjs} +17 -7
  61. package/dist/diff-database-schema-MYPfxeRf-DdgnOIIl.mjs.map +1 -0
  62. package/dist/{full-text-jDpkANi7.d.mts → full-text-Cth_mXe_.d.mts} +2 -2
  63. package/dist/{full-text-jDpkANi7.d.mts.map → full-text-Cth_mXe_.d.mts.map} +1 -1
  64. package/dist/{full-text-index-expression-PZszha7L-CW7i1TUY.mjs → full-text-index-expression-BM_vGygX-BOuja7X4.mjs} +3 -3
  65. package/dist/{full-text-index-expression-PZszha7L-CW7i1TUY.mjs.map → full-text-index-expression-BM_vGygX-BOuja7X4.mjs.map} +1 -1
  66. package/dist/{full-text-parsers-Dp_ANr31-DVxYUNS-.d.mts → full-text-parsers-CLZpb096-BN1xyHeO.d.mts} +3 -3
  67. package/dist/{full-text-parsers-Dp_ANr31-DVxYUNS-.d.mts.map → full-text-parsers-CLZpb096-BN1xyHeO.d.mts.map} +1 -1
  68. package/dist/{infer-psl-contract-pxmVP3E9-Bvk8NzS0.mjs → infer-psl-contract-D7XJnfJv-Cd_Mf0UH.mjs} +78 -82
  69. package/dist/infer-psl-contract-D7XJnfJv-Cd_Mf0UH.mjs.map +1 -0
  70. package/dist/{issue-planner-D9rRu2pB.d.mts → issue-planner-C4iR-Ik-.d.mts} +2 -2
  71. package/dist/{issue-planner-D9rRu2pB.d.mts.map → issue-planner-C4iR-Ik-.d.mts.map} +1 -1
  72. package/dist/{migration-Du89zGmx.d.mts → migration-BTiY0PPC.d.mts} +3 -3
  73. package/dist/{migration-Du89zGmx.d.mts.map → migration-BTiY0PPC.d.mts.map} +1 -1
  74. package/dist/migration-PTHAY9Cv.mjs.map +1 -1
  75. package/dist/{native-type-normalizer-DhbUgdrI.d.mts → native-type-normalizer-BFo5tSyh.d.mts} +2 -5
  76. package/dist/native-type-normalizer-BFo5tSyh.d.mts.map +1 -0
  77. package/dist/native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs +102 -0
  78. package/dist/native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs.map +1 -0
  79. package/dist/op-factory-call-Bi1XxJEv.d.mts +1 -0
  80. package/dist/{op-factory-call-t4k8mlRJ-BgtGXlIC.d.mts → op-factory-call-VLJFI-b_-Du23HNYc.d.mts} +5 -5
  81. package/dist/op-factory-call-VLJFI-b_-Du23HNYc.d.mts.map +1 -0
  82. package/dist/{op-factory-call-BBkvFvKK-7MkUHWJq.mjs → op-factory-call-y5YADY2E-CnhkIujC.mjs} +39 -26
  83. package/dist/op-factory-call-y5YADY2E-CnhkIujC.mjs.map +1 -0
  84. package/dist/{operation-types-DZyRBrnm.d.mts → operation-types-Cj4S6KNP.d.mts} +2 -2
  85. package/dist/{operation-types-DZyRBrnm.d.mts.map → operation-types-Cj4S6KNP.d.mts.map} +1 -1
  86. package/dist/{pack-B8SM_MTs.d.mts → pack-DO2bXv9P.d.mts} +3 -3
  87. package/dist/{pack-B8SM_MTs.d.mts.map → pack-DO2bXv9P.d.mts.map} +1 -1
  88. package/dist/{planner-CquxMKq_-CZQAaWfK.mjs → planner-DMVaXRSK-DCAGfALs.mjs} +6 -6
  89. package/dist/{planner-CquxMKq_-CZQAaWfK.mjs.map → planner-DMVaXRSK-DCAGfALs.mjs.map} +1 -1
  90. package/dist/{planner-o0_69Y9q.d.mts → planner-SLaWpf7q.d.mts} +2 -2
  91. package/dist/{planner-o0_69Y9q.d.mts.map → planner-SLaWpf7q.d.mts.map} +1 -1
  92. package/dist/{planner-ddl-builders-BQ_1YXut.d.mts → planner-ddl-builders-DYLyFXrj.d.mts} +2 -5
  93. package/dist/planner-ddl-builders-DYLyFXrj.d.mts.map +1 -0
  94. package/dist/{planner-ddl-builders-GTcVPpwb-ClvrXb26.mjs → planner-ddl-builders-iE35pyxA-g7b_clbn.mjs} +6 -27
  95. package/dist/planner-ddl-builders-iE35pyxA-g7b_clbn.mjs.map +1 -0
  96. package/dist/planner-produced-postgres-migration-Bi_Otmtx.d.mts +1 -0
  97. package/dist/{planner-produced-postgres-migration-DEJQPRjI-C9GuvVOY.mjs → planner-produced-postgres-migration-C8TUIl2Z-DHjubKQ-.mjs} +3 -3
  98. package/dist/{planner-produced-postgres-migration-DEJQPRjI-C9GuvVOY.mjs.map → planner-produced-postgres-migration-C8TUIl2Z-DHjubKQ-.mjs.map} +1 -1
  99. package/dist/{planner-produced-postgres-migration-Xd83anY_-vp2DJ5fk.d.mts → planner-produced-postgres-migration-CoOcn-b9-8kOq82_P.d.mts} +3 -3
  100. package/dist/planner-produced-postgres-migration-CoOcn-b9-8kOq82_P.d.mts.map +1 -0
  101. package/dist/{planner-sql-checks-Bd8nN9P8-Cd98iEee.mjs → planner-sql-checks-ZMXeCK6W-D1VMBywZ.mjs} +55 -15
  102. package/dist/planner-sql-checks-ZMXeCK6W-D1VMBywZ.mjs.map +1 -0
  103. package/dist/{postgres-contract-view-DxcRT-qe-LQBHHgaS.mjs → postgres-contract-view-BBMpf_qi-8V4vTm9U.mjs} +3 -3
  104. package/dist/{postgres-contract-view-DxcRT-qe-LQBHHgaS.mjs.map → postgres-contract-view-BBMpf_qi-8V4vTm9U.mjs.map} +1 -1
  105. package/dist/{postgres-migration-B7ihBnbW-DOmrgtms.d.mts → postgres-migration-B03W06rR-DTB0R3cj.d.mts} +4 -5
  106. package/dist/{postgres-migration-B7ihBnbW-DOmrgtms.d.mts.map → postgres-migration-B03W06rR-DTB0R3cj.d.mts.map} +1 -1
  107. package/dist/{postgres-migration-qwigEUIO-BWxjALsx.mjs → postgres-migration-UzDaU7Or-Dvc0Cdv5.mjs} +22 -5
  108. package/dist/postgres-migration-UzDaU7Or-Dvc0Cdv5.mjs.map +1 -0
  109. package/dist/{prisma7-binding-B-JcNfUc.mjs → prisma7-binding-D_Q6ou4j.mjs} +7 -6
  110. package/dist/prisma7-binding-D_Q6ou4j.mjs.map +1 -0
  111. package/dist/{prisma7-binding-1CMtcbOk.d.mts → prisma7-binding-c5vWJV6k.d.mts} +3 -3
  112. package/dist/{prisma7-binding-1CMtcbOk.d.mts.map → prisma7-binding-c5vWJV6k.d.mts.map} +1 -1
  113. package/dist/{runtime-aN2tMH8u.d.mts → runtime-Bm1hGqOh.d.mts} +2 -2
  114. package/dist/{runtime-aN2tMH8u.d.mts.map → runtime-Bm1hGqOh.d.mts.map} +1 -1
  115. package/dist/{sql-renderer-DmJ5aZwd.d.mts → sql-renderer-CfXWPuXU.d.mts} +4 -4
  116. package/dist/{sql-renderer-DmJ5aZwd.d.mts.map → sql-renderer-CfXWPuXU.d.mts.map} +1 -1
  117. package/dist/{sql-renderer-CgUgFbU4-CRUChEAY.mjs → sql-renderer-CgUgFbU4-DqTf31OD.mjs} +2 -2
  118. package/dist/{sql-renderer-CgUgFbU4-CRUChEAY.mjs.map → sql-renderer-CgUgFbU4-DqTf31OD.mjs.map} +1 -1
  119. package/dist/target.d.mts +23 -23
  120. package/dist/target.mjs +21 -22
  121. package/dist/target__codec-descriptor.d.mts +2 -2
  122. package/dist/target__codec-descriptor.mjs +1 -1
  123. package/dist/target__codec-types.d.mts +3 -3
  124. package/dist/target__codecs.d.mts +3 -3
  125. package/dist/target__codecs.mjs +3 -4
  126. package/dist/target__control.d.mts +2 -2
  127. package/dist/target__control.mjs +3 -3
  128. package/dist/target__data-types.mjs +2 -2
  129. package/dist/target__default-normalizer.mjs +1 -1
  130. package/dist/target__diff-database-schema.mjs +1 -1
  131. package/dist/target__full-text.d.mts +2 -2
  132. package/dist/target__issue-planner.d.mts +1 -1
  133. package/dist/target__issue-planner.mjs +1 -1
  134. package/dist/target__migration.d.mts +2 -2
  135. package/dist/target__migration.mjs +2 -2
  136. package/dist/target__native-type-normalizer.d.mts +1 -1
  137. package/dist/target__native-type-normalizer.mjs +1 -1
  138. package/dist/target__op-factory-call.d.mts +2 -2
  139. package/dist/target__op-factory-call.mjs +1 -1
  140. package/dist/target__operation-types.d.mts +1 -1
  141. package/dist/target__pack.d.mts +1 -1
  142. package/dist/target__pack.mjs +1 -1
  143. package/dist/target__planner-ddl-builders.d.mts +2 -2
  144. package/dist/target__planner-ddl-builders.mjs +2 -2
  145. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  146. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  147. package/dist/target__planner-sql-checks.mjs +1 -1
  148. package/dist/target__planner.d.mts +1 -1
  149. package/dist/target__planner.mjs +2 -2
  150. package/dist/target__prisma7-binding.d.mts +1 -1
  151. package/dist/target__prisma7-binding.mjs +1 -1
  152. package/dist/target__runtime.mjs +2 -2
  153. package/dist/target__runtime.mjs.map +1 -1
  154. package/dist/target__sql-utils.mjs +1 -1
  155. package/dist/{types-BPubHbiE-mnhvO20x.d.mts → types-BPubHbiE-SaR3Cngi.d.mts} +3 -3
  156. package/dist/{types-BPubHbiE-mnhvO20x.d.mts.map → types-BPubHbiE-SaR3Cngi.d.mts.map} +1 -1
  157. package/dist/types-DvEixgWS.d.mts +2 -0
  158. package/package.json +9 -9
  159. package/dist/codec-descriptor-BfoHQP3R-CMRVT-F6.mjs.map +0 -1
  160. package/dist/codec-descriptor-Cf1qfOwo.d.mts +0 -1
  161. package/dist/codec-descriptor-DUUGoeyI-WGLGXEoI.d.mts.map +0 -1
  162. package/dist/codec-types-BXbWuRzS.d.mts +0 -2
  163. package/dist/codecs-C4DVdgQG.mjs.map +0 -1
  164. package/dist/codecs-DQGmsnk3-H6nVRPCC.mjs.map +0 -1
  165. package/dist/control-BwOrmTN-.mjs.map +0 -1
  166. package/dist/control-CDRHOvkm.d.mts +0 -12
  167. package/dist/control-CDRHOvkm.d.mts.map +0 -1
  168. package/dist/control-DhZYlj-u.d.mts.map +0 -1
  169. package/dist/control-adapter-BaVlICog-BuVBXKoL.mjs.map +0 -1
  170. package/dist/control-policy-BYo5QPof-BLT07t1y.mjs.map +0 -1
  171. package/dist/data-types-Cl18KnNY-5I34Vd6Z.mjs.map +0 -1
  172. package/dist/default-normalizer-DKE2xbCP-EMLD6yNw.mjs.map +0 -1
  173. package/dist/descriptor-meta-F1wsOtt2-D014LIGM.mjs.map +0 -1
  174. package/dist/diff-database-schema-D835UIq8-BVO7jCE4.mjs.map +0 -1
  175. package/dist/infer-psl-contract-pxmVP3E9-Bvk8NzS0.mjs.map +0 -1
  176. package/dist/native-type-normalizer-DWc6cr5r.mjs +0 -94
  177. package/dist/native-type-normalizer-DWc6cr5r.mjs.map +0 -1
  178. package/dist/native-type-normalizer-DhbUgdrI.d.mts.map +0 -1
  179. package/dist/op-factory-call-7Dtfo3GK.d.mts +0 -1
  180. package/dist/op-factory-call-BBkvFvKK-7MkUHWJq.mjs.map +0 -1
  181. package/dist/op-factory-call-t4k8mlRJ-BgtGXlIC.d.mts.map +0 -1
  182. package/dist/planner-ddl-builders-BQ_1YXut.d.mts.map +0 -1
  183. package/dist/planner-ddl-builders-GTcVPpwb-ClvrXb26.mjs.map +0 -1
  184. package/dist/planner-produced-postgres-migration-B0pwyA94.d.mts +0 -1
  185. package/dist/planner-produced-postgres-migration-Xd83anY_-vp2DJ5fk.d.mts.map +0 -1
  186. package/dist/planner-sql-checks-Bd8nN9P8-Cd98iEee.mjs.map +0 -1
  187. package/dist/postgres-migration-qwigEUIO-BWxjALsx.mjs.map +0 -1
  188. package/dist/prisma7-binding-B-JcNfUc.mjs.map +0 -1
  189. package/dist/registry-ld2ZUt1j-CH85fY3r.mjs +0 -15
  190. package/dist/registry-ld2ZUt1j-CH85fY3r.mjs.map +0 -1
  191. package/dist/types-CS-qi6YZ.d.mts +0 -2
@@ -1,31 +1,31 @@
1
1
  import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, s as PG_ENUM_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
- import { i as isPostgresCodecDescriptor } from "./codec-descriptor-BfoHQP3R-CMRVT-F6.mjs";
2
+ import { i as isPostgresCodecDescriptor } from "./codec-descriptor-B61d-k4C-BdWVU6Fu.mjs";
3
3
  import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
4
4
  import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
5
5
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
6
- import { M as setFallbackTemporal } from "./codecs-DQGmsnk3-H6nVRPCC.mjs";
6
+ import { P as setFallbackTemporal, n as NUMERIC_SCALE_RANGE, t as NUMERIC_PRECISION_RANGE } from "./codecs-BHNqtI1J-BSS9sL3H.mjs";
7
7
  import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-yugFGBdS-5cY1PCmb.mjs";
8
- import { n as postgresResolveDefault } from "./default-normalizer-DKE2xbCP-EMLD6yNw.mjs";
8
+ import { n as postgresResolveDefault } from "./default-normalizer-Cb7nWBUa-DXchlOUk.mjs";
9
9
  import { n as computeContentHash } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
10
- import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-BmQxOggr-CK871YR4.mjs";
10
+ import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-DKN1ccEX-DgmJWx1r.mjs";
11
11
  import { t as postgresRenderCheckExpressions } from "./check-expressions-DLCs-SXx-itMQrUsX.mjs";
12
- import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-BOx9pvBv-C4TEXck8.mjs";
12
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DF0hODA0-DnO80XvH.mjs";
13
13
  import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
14
14
  import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
15
- import { a as renderDefaultLiteral } from "./planner-ddl-builders-GTcVPpwb-ClvrXb26.mjs";
16
- import { n as contractToPostgresDatabaseSchemaNode, r as diffPostgresSchema } from "./diff-database-schema-D835UIq8-BVO7jCE4.mjs";
17
- import { t as PostgresContractSerializer } from "./postgres-contract-view-DxcRT-qe-LQBHHgaS.mjs";
18
- import { t as createPostgresMigrationPlanner } from "./planner-CquxMKq_-CZQAaWfK.mjs";
19
- import { a as buildMapAttribute, d as inferPostgresPslContract, f as namedArg, i as buildIndexAttribute, m as positionalArg, n as buildAttribute, o as buildModelConstraintAttribute, p as parseDefaultAttributeString, r as buildCheckAttribute, s as buildNativeEnumBlock, t as SYNTHETIC_SPAN, u as createPostgresTypeMap } from "./infer-psl-contract-pxmVP3E9-Bvk8NzS0.mjs";
15
+ import { i as renderDefaultLiteral } from "./planner-ddl-builders-iE35pyxA-g7b_clbn.mjs";
16
+ import { i as diffPostgresSchema, r as contractToPostgresDatabaseSchemaNode, t as buildPostgresNativeTypeExpander } from "./diff-database-schema-MYPfxeRf-DdgnOIIl.mjs";
17
+ import { t as PostgresContractSerializer } from "./postgres-contract-view-BBMpf_qi-8V4vTm9U.mjs";
18
+ import { t as createPostgresMigrationPlanner } from "./planner-DMVaXRSK-DCAGfALs.mjs";
19
+ import { a as buildMapAttribute, d as inferPostgresPslContract, f as namedArg, h as positionalArg, i as buildIndexAttribute, m as parseDefaultAttributeString, n as buildAttribute, o as buildModelConstraintAttribute, r as buildCheckAttribute, s as buildNativeEnumBlock, t as SYNTHETIC_SPAN, u as createPostgresTypeMap } from "./infer-psl-contract-D7XJnfJv-Cd_Mf0UH.mjs";
20
20
  import { escapePslString } from "@prisma/orm-family-sql/relational-core/ast";
21
21
  import { blindCast } from "@prisma/orm-framework/utils/casts";
22
22
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
23
- import { StorageColumn } from "@prisma/orm-family-sql/contract/types";
23
+ import { StorageColumn, resolvedTypeParams } from "@prisma/orm-family-sql/contract/types";
24
24
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
25
25
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
26
26
  import { composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName } from "@prisma/orm-family-sql/schema-ir/naming";
27
27
  import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
28
- import { buildDataTypeResolver, buildNativeTypeExpander, runnerFailure, runnerSuccess } from "@prisma/orm-family-sql/family/control";
28
+ import { buildDataTypeResolver, runnerFailure, runnerSuccess } from "@prisma/orm-family-sql/family/control";
29
29
  import { findAuthoringTypeConstructorCall } from "@prisma/orm-framework/components/authoring";
30
30
  import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
31
31
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -580,26 +580,26 @@ function refuseUnwrittenExecutionDefaults(contract, written) {
580
580
  }
581
581
  }
582
582
  /**
583
- * The value-set references the PSL source gives a field typed by a domain enum and its column: the
584
- * column names the enum's value set, and a field that is not a list names the enum, both in the
585
- * default namespace. A field with no domain enum has neither.
583
+ * The value-set references the PSL source gives a field typed by a domain enum, one per plane: the
584
+ * domain names the enum and the storage column names the enum's value set, both in the default
585
+ * namespace. A field with no domain enum has neither.
586
586
  */
587
- function derivedValueSetRefs(enumName, list) {
587
+ function derivedValueSetRefs(enumName) {
588
588
  if (enumName === void 0) return {
589
- field: void 0,
590
- column: void 0
589
+ domain: void 0,
590
+ storage: void 0
591
591
  };
592
592
  const common = {
593
593
  namespaceId: DEFAULT_NAMESPACE_ID,
594
594
  entityName: enumName
595
595
  };
596
596
  return {
597
- field: list ? void 0 : {
597
+ domain: {
598
598
  plane: "domain",
599
599
  entityKind: "enum",
600
600
  ...common
601
601
  },
602
- column: {
602
+ storage: {
603
603
  plane: "storage",
604
604
  entityKind: "valueSet",
605
605
  ...common
@@ -614,18 +614,19 @@ function derivedValueSetRefs(enumName, list) {
614
614
  function refuseFieldColumnMismatch(input) {
615
615
  const { field, column, coordinate } = input;
616
616
  const fix = "Make the field and its column agree, or keep authoring this contract in its current source.";
617
+ const fixForEarlierRelease = `If an earlier release emitted this contract, emit it again. ${fix}`;
617
618
  if (input.singleTableVariant && !column.nullable) throw unsupported(`column ${coordinate} of single-table variant "${input.modelName}" is not nullable, which cannot be written in Prisma 8 PSL.`, "The PSL source makes every column of a single-table variant nullable, because the base's other rows leave it empty.", fix, { coordinate });
618
619
  if (!input.singleTableVariant && field.nullable !== column.nullable) throw unsupported(`field ${coordinate} is ${field.nullable ? "optional" : "required"} but its column is ${column.nullable ? "nullable" : "not nullable"}, which cannot be written in Prisma 8 PSL.`, "PSL writes `?` once, and the PSL source derives the column from the field.", fix, { coordinate });
619
620
  if ((field.type.kind === "scalar" && field.many === true) !== (column.many === true)) throw unsupported(`field ${coordinate} is ${field.many === true ? "a list" : "not a list"} but its column is ${column.many === true ? "a list" : "not a list"}, which cannot be written in Prisma 8 PSL.`, "PSL writes `[]` once: the PSL source stores a list of scalars in a list column, and a list of value objects in one JSON column.", fix, { coordinate });
620
- if (field.type.kind === "scalar" && (field.type.codecId !== column.codecId || !sameJson(field.type.typeParams, column.typeParams))) throw unsupported(`field ${coordinate} has a different codec or type parameters from its column, which cannot be written in Prisma 8 PSL.`, "The PSL source derives a scalar field's codec and type parameters from its column.", fix, { coordinate });
621
+ if (field.type.kind === "scalar" && (field.type.codecId !== column.codecId || !sameJson(resolvedTypeParams(field.type, void 0), resolvedTypeParams(column, input.namedTypes)))) throw unsupported(`field ${coordinate} has a different codec or type parameters from its column, which cannot be written in Prisma 8 PSL.`, "The PSL source derives a scalar field's codec and type parameters from its column.", fixForEarlierRelease, { coordinate });
621
622
  if (field.type.kind !== "scalar" || column.codecId === "pg/enum@1") return;
622
623
  const enumName = column.valueSet?.entityName;
623
- const derived = derivedValueSetRefs(enumName, field.many === true);
624
- if (!sameJson(field.valueSet, derived.field) || !sameJson(column.valueSet, derived.column) || enumName !== void 0 && !input.domainEnumNames.has(enumName)) throw unsupported(`field ${coordinate} and its column do not name the enum of the default namespace and its value set that the PSL source derives for a field typed by an enum, which cannot be written in Prisma 8 PSL.`, "PSL types the field by the enum name, and the PSL source then points the column at the value set of that enum in the default namespace, and a field that is not a list at the enum.", fix, { coordinate });
624
+ const derived = derivedValueSetRefs(enumName);
625
+ if (!sameJson(field.valueSet, derived.domain) || !sameJson(column.valueSet, derived.storage) || enumName !== void 0 && !input.domainEnumNames.has(enumName)) throw unsupported(`field ${coordinate} and its column do not name the enum of the default namespace and its value set that the PSL source derives for a field typed by an enum, which cannot be written in Prisma 8 PSL.`, "PSL types the field by the enum name, and the PSL source then points the column at the value set of that enum in the default namespace, and the field at the enum.", fixForEarlierRelease, { coordinate });
625
626
  }
626
627
  /**
627
628
  * Refuses a field PSL has no form for: one whose type is a union of types, or one that is a
628
- * dictionary. Runs for model fields and value-object fields alike.
629
+ * dictionary. Runs for model fields and value-object members alike.
629
630
  */
630
631
  function refuseUnwritableFieldShape(field, coordinate) {
631
632
  if (field.type.kind === "union") throw unsupported(`field ${coordinate} has a ${field.type.kind} type, which cannot be written in Prisma 8 PSL.`, "A PSL field names one scalar, enum, or value-object type; a union of types has no PSL form.", "Give the field a single type, or keep authoring this contract in its current source.", {
@@ -636,21 +637,24 @@ function refuseUnwritableFieldShape(field, coordinate) {
636
637
  throw unsupported(`field ${coordinate} is a dictionary, which cannot be written in Prisma 8 PSL.`, "PSL writes a field as one value or a list; it has no form for a keyed dictionary.", KEEP_SOURCE, { coordinate });
637
638
  }
638
639
  /**
639
- * Refuses a value-object field with type parameters or a value set: the PSL source keeps only the
640
- * codec of a value-object field's type, so either would be lost.
640
+ * Refuses a value-object member with a value set other than the one the PSL source derives for a member typed by an enum: the enum of the default namespace, with the enum's codec and no type parameters.
641
641
  */
642
- function refuseValueObjectFieldPartsTheSourceDrops(field, coordinate) {
643
- if (Object.keys(field.type.typeParams ?? {}).length === 0 && field.valueSet === void 0) return;
644
- throw unsupported(`value-object field ${coordinate} carries type parameters or a value set, which cannot be written in Prisma 8 PSL.`, "The PSL source keeps only the codec of a value-object field's type, so its type parameters and value set would be lost.", KEEP_SOURCE, { coordinate });
645
- }
646
- function refuseValueObjectFieldCodecWithoutNativeType(codecId, coordinate) {
647
- throw unsupported(`field ${coordinate} uses codec "${codecId}", which no Postgres codec in the configured stack names a native type for.`, "A value-object field has no storage column, so its PSL type is derived from the native type its codec names.", KEEP_SOURCE, {
642
+ function refuseUnderivedMemberValueSet(input) {
643
+ const { field, type, coordinate } = input;
644
+ const { valueSet } = field;
645
+ if (valueSet === void 0) return;
646
+ const domainEnum = input.domainEnums[valueSet.entityName];
647
+ if (sameJson(valueSet, derivedValueSetRefs(valueSet.entityName).domain) && domainEnum?.codecId === type.codecId && type.typeParams === void 0) return;
648
+ throw unsupported(`value-object member ${coordinate} carries a value set other than an enum of the default namespace with that enum's codec and no type parameters, which cannot be written in Prisma 8 PSL.`, "PSL types the member by the enum name, and the PSL source then points the member at that enum in the default namespace and gives it the enum's codec.", KEEP_SOURCE, { coordinate });
649
+ }
650
+ function refuseMemberCodecWithoutNativeType(codecId, coordinate) {
651
+ throw unsupported(`value-object member ${coordinate} uses codec "${codecId}", which no Postgres codec in the configured stack names a native type for.`, "A value-object member has no storage column, so its PSL type is derived from the native type its codec names.", KEEP_SOURCE, {
648
652
  coordinate,
649
653
  codecId
650
654
  });
651
655
  }
652
- function refuseValueObjectFieldCodecNeedingTypeParameters(codecId, coordinate) {
653
- throw unsupported(`field ${coordinate} uses codec "${codecId}", which names a native type only from type parameters, and the PSL source keeps none on a value-object field.`, "The PSL source keeps only the codec of a value-object field's type, so a codec that needs type parameters cannot be written there.", KEEP_SOURCE, {
656
+ function refuseMemberCodecNeedingTypeParameters(codecId, coordinate) {
657
+ throw unsupported(`value-object member ${coordinate} uses codec "${codecId}", which names a native type only from type parameters the member does not carry.`, "A value-object member has no storage column, so its PSL type is derived from the native type its codec names for its type parameters.", KEEP_SOURCE, {
654
658
  coordinate,
655
659
  codecId
656
660
  });
@@ -1186,39 +1190,42 @@ function buildColumnType(input) {
1186
1190
  if (call !== void 0) return typeCall(call.path, call.args.map((value) => typeArgumentText(value, coordinate)));
1187
1191
  refuseColumnWithoutPslType(column, coordinate);
1188
1192
  }
1189
- /**
1190
- * The native type the stack's codec names for a value-object field. The field has no column of its
1191
- * own, and no type parameters, which the PSL source would not keep.
1192
- */
1193
- function nativeTypeOfValueObjectField(field, coordinate, context) {
1194
- const { codecId } = field.type;
1195
- const descriptor = context.codecLookup.descriptorFor?.(codecId);
1196
- if (!isPostgresCodecDescriptor(descriptor)) refuseValueObjectFieldCodecWithoutNativeType(codecId, coordinate);
1193
+ /** The native type the stack's codec names for a value-object member, which has no column of its own. */
1194
+ function nativeTypeOfMember(type, coordinate, context) {
1195
+ const { codecId } = type;
1196
+ const descriptor = context.codecLookup.descriptorFor(codecId);
1197
+ if (!isPostgresCodecDescriptor(descriptor)) refuseMemberCodecWithoutNativeType(codecId, coordinate);
1198
+ const typeParams = resolvedTypeParams(type, void 0);
1199
+ if (typeParams !== void 0) return descriptor.nativeTypeFor({
1200
+ codecId,
1201
+ typeParams: blindCast(typeParams)
1202
+ });
1197
1203
  try {
1198
1204
  return descriptor.nativeTypeFor({ codecId });
1199
1205
  } catch {
1200
- refuseValueObjectFieldCodecNeedingTypeParameters(codecId, coordinate);
1206
+ refuseMemberCodecNeedingTypeParameters(codecId, coordinate);
1201
1207
  }
1202
1208
  }
1203
- /** The PSL type position of a domain field: a value object by name, or a scalar as a column would print. */
1204
- function buildDomainFieldType(input) {
1209
+ /** The PSL type position of a value-object member: a value object or an enum by name, or a scalar as a column would print. */
1210
+ function buildMemberType(input) {
1205
1211
  const { field, coordinate } = input;
1206
1212
  refuseUnwritableFieldShape(field, coordinate);
1207
1213
  const { type } = field;
1208
1214
  if (type.kind === "valueObject") return { typeName: type.name };
1209
- refuseValueObjectFieldPartsTheSourceDrops({
1210
- ...field,
1211
- type
1212
- }, coordinate);
1215
+ refuseUnderivedMemberValueSet({
1216
+ field,
1217
+ type,
1218
+ coordinate,
1219
+ domainEnums: input.domainEnums
1220
+ });
1221
+ if (field.valueSet !== void 0) return { typeName: field.valueSet.entityName };
1213
1222
  return buildColumnType({
1214
1223
  column: new StorageColumn({
1215
- nativeType: nativeTypeOfValueObjectField({
1216
- ...field,
1217
- type
1218
- }, coordinate, input.context),
1224
+ nativeType: nativeTypeOfMember(type, coordinate, input.context),
1219
1225
  codecId: type.codecId,
1220
1226
  nullable: field.nullable,
1221
- ...ifDefined("many", field.many)
1227
+ ...ifDefined("many", field.many),
1228
+ ...ifDefined("typeParams", type.typeParams)
1222
1229
  }),
1223
1230
  typeMap: input.typeMap,
1224
1231
  authoringTypes: input.context.authoringContributions.type,
@@ -1237,12 +1244,13 @@ function buildCompositeTypes(input) {
1237
1244
  name,
1238
1245
  fields: Object.entries(valueObject.fields).map(([fieldName, field]) => {
1239
1246
  refuseUnwritableName("field", fieldName);
1240
- const { typeName, typeConstructor } = buildDomainFieldType({
1247
+ const { typeName, typeConstructor } = buildMemberType({
1241
1248
  field,
1242
1249
  coordinate: `"${input.namespaceId}".${name}.${fieldName}`,
1243
1250
  typeMap: input.typeMap,
1244
1251
  context: input.context,
1245
- enumBlockNames: input.enumBlockNames
1252
+ enumBlockNames: input.enumBlockNames,
1253
+ domainEnums: input.domainEnums
1246
1254
  });
1247
1255
  return {
1248
1256
  kind: "field",
@@ -1858,7 +1866,7 @@ function buildColumnDefault(input) {
1858
1866
  const result = mapDefault(columnDefault, {
1859
1867
  dataTypeEntries: context.authoringContributions.dataTypes,
1860
1868
  dataTypes: context.dataTypeLookup,
1861
- columnDataType: context.codecLookup.descriptorFor?.(input.isEnum ? PG_TEXT_CODEC_ID : input.column.codecId)?.dataType,
1869
+ columnDataType: context.codecLookup.descriptorFor(input.isEnum ? PG_TEXT_CODEC_ID : input.column.codecId)?.dataType,
1862
1870
  list: input.column.many === true
1863
1871
  });
1864
1872
  if (result === void 0) refuseUnwritableLiteralDefault({
@@ -1998,7 +2006,8 @@ function buildScalarFields(input) {
1998
2006
  coordinate,
1999
2007
  modelName: entry.name,
2000
2008
  singleTableVariant: variant?.singleTable === true,
2001
- domainEnumNames: input.defaultDomainEnumNames
2009
+ domainEnumNames: input.defaultDomainEnumNames,
2010
+ namedTypes: input.namedTypes
2002
2011
  });
2003
2012
  if (column.typeRef !== void 0) refuseColumnDifferingFromNamedType({
2004
2013
  column,
@@ -2006,13 +2015,7 @@ function buildScalarFields(input) {
2006
2015
  namedType: input.namedTypes[column.typeRef],
2007
2016
  coordinate
2008
2017
  });
2009
- const columnType = column.typeRef !== void 0 ? { typeName: column.typeRef } : field.type.kind === "valueObject" ? buildDomainFieldType({
2010
- field,
2011
- coordinate,
2012
- typeMap,
2013
- context,
2014
- enumBlockNames: enums.blockNamesByTypeName
2015
- }) : buildColumnType({
2018
+ const columnType = column.typeRef !== void 0 ? { typeName: column.typeRef } : field.type.kind === "valueObject" ? { typeName: field.type.name } : buildColumnType({
2016
2019
  column,
2017
2020
  typeMap,
2018
2021
  authoringTypes: context.authoringContributions.type,
@@ -2177,7 +2180,8 @@ function buildNamespace(all, namespaceId, namespace) {
2177
2180
  namespaceId,
2178
2181
  typeMap: all.typeMap,
2179
2182
  context: all.context,
2180
- enumBlockNames: enums.blockNamesByTypeName
2183
+ enumBlockNames: enums.blockNamesByTypeName,
2184
+ domainEnums: all.defaultDomainEnums
2181
2185
  });
2182
2186
  const modelNameForTable = (tableName) => models.find((entry) => entry.namespaceId === namespaceId && entry.tableName === tableName && variants.get(entry)?.singleTable !== true)?.name;
2183
2187
  for (const tableName of rlsTables) if (modelNameForTable(tableName) === void 0) refuseRlsWithoutModel(namespaceId, tableName);
@@ -2269,6 +2273,371 @@ function buildPostgresPslContract(contract, context) {
2269
2273
  span: SYNTHETIC_SPAN
2270
2274
  };
2271
2275
  }
2276
+ /**
2277
+ * The base PSL scalars as zero-arg type constructors in the unified authoring
2278
+ * channel, with explicit `nativeType` values pinned to the codec manifests
2279
+ * (`codecLookup.targetTypesFor(codecId)[0]`).
2280
+ *
2281
+ * The type position is the only storage decider: a mutation-default generator
2282
+ * (`@default(uuid())`) never re-picks a column's storage.
2283
+ *
2284
+ * These and `postgresNativeAuthoringTypes` are defined here, next to the codecs they name, but the adapter contributes them: the TypeScript contract builder builds its `type.*` helpers from the target, so a target contribution would add `type.String()` and the like there.
2285
+ */
2286
+ const postgresScalarAuthoringTypes = {
2287
+ String: {
2288
+ kind: "typeConstructor",
2289
+ documentation: "Variable-length text stored as PostgreSQL text.",
2290
+ output: {
2291
+ codecId: "pg/text@1",
2292
+ nativeType: "text"
2293
+ }
2294
+ },
2295
+ Boolean: {
2296
+ kind: "typeConstructor",
2297
+ documentation: "A true or false value stored as PostgreSQL boolean.",
2298
+ output: {
2299
+ codecId: "pg/bool@1",
2300
+ nativeType: "bool"
2301
+ }
2302
+ },
2303
+ Int: {
2304
+ kind: "typeConstructor",
2305
+ documentation: "A signed 32-bit integer represented as a JavaScript number.",
2306
+ output: {
2307
+ codecId: "pg/int4@1",
2308
+ nativeType: "int4"
2309
+ }
2310
+ },
2311
+ BigInt: {
2312
+ kind: "typeConstructor",
2313
+ documentation: "A signed 64-bit integer represented as a JavaScript bigint.",
2314
+ output: {
2315
+ codecId: "pg/int8@1",
2316
+ nativeType: "int8"
2317
+ }
2318
+ },
2319
+ Float: {
2320
+ kind: "typeConstructor",
2321
+ documentation: "A double-precision floating-point number.",
2322
+ output: {
2323
+ codecId: "pg/float8@1",
2324
+ nativeType: "float8"
2325
+ }
2326
+ },
2327
+ Decimal: {
2328
+ kind: "typeConstructor",
2329
+ documentation: "An exact decimal value stored as PostgreSQL numeric.",
2330
+ output: {
2331
+ codecId: "pg/numeric@1",
2332
+ nativeType: "numeric"
2333
+ }
2334
+ },
2335
+ DateTime: {
2336
+ kind: "typeConstructor",
2337
+ documentation: "An instant stored as PostgreSQL timestamptz and represented as Temporal.Instant.",
2338
+ output: {
2339
+ codecId: "pg/timestamptz-temporal@1",
2340
+ nativeType: "timestamptz"
2341
+ }
2342
+ },
2343
+ Json: {
2344
+ kind: "typeConstructor",
2345
+ documentation: "A JSON value stored as PostgreSQL json.",
2346
+ output: {
2347
+ codecId: "pg/json@1",
2348
+ nativeType: "json"
2349
+ }
2350
+ },
2351
+ Jsonb: {
2352
+ kind: "typeConstructor",
2353
+ documentation: "A JSON value stored in PostgreSQL binary jsonb format.",
2354
+ output: {
2355
+ codecId: "pg/jsonb@1",
2356
+ nativeType: "jsonb"
2357
+ }
2358
+ },
2359
+ Bytes: {
2360
+ kind: "typeConstructor",
2361
+ documentation: "Binary data stored as PostgreSQL bytea.",
2362
+ output: {
2363
+ codecId: "pg/bytea@1",
2364
+ nativeType: "bytea"
2365
+ }
2366
+ }
2367
+ };
2368
+ const postgresNativeAuthoringTypes = {
2369
+ VarChar: {
2370
+ kind: "typeConstructor",
2371
+ documentation: "Variable-length text with an optional maximum character length.",
2372
+ args: [{
2373
+ kind: "number",
2374
+ name: "length",
2375
+ integer: true,
2376
+ minimum: 1,
2377
+ optional: true
2378
+ }],
2379
+ output: {
2380
+ codecId: "sql/varchar@1",
2381
+ nativeType: "character varying",
2382
+ typeParams: { length: {
2383
+ kind: "arg",
2384
+ index: 0
2385
+ } }
2386
+ }
2387
+ },
2388
+ Char: {
2389
+ kind: "typeConstructor",
2390
+ documentation: "Fixed-length, blank-padded text with an optional character length.",
2391
+ args: [{
2392
+ kind: "number",
2393
+ name: "length",
2394
+ integer: true,
2395
+ minimum: 1,
2396
+ optional: true
2397
+ }],
2398
+ output: {
2399
+ codecId: "sql/char@1",
2400
+ nativeType: "character",
2401
+ typeParams: { length: {
2402
+ kind: "arg",
2403
+ index: 0
2404
+ } }
2405
+ }
2406
+ },
2407
+ Numeric: {
2408
+ kind: "typeConstructor",
2409
+ documentation: "An exact decimal value with optional precision and scale.",
2410
+ args: [{
2411
+ kind: "number",
2412
+ name: "precision",
2413
+ integer: true,
2414
+ minimum: NUMERIC_PRECISION_RANGE.min,
2415
+ maximum: NUMERIC_PRECISION_RANGE.max,
2416
+ optional: true
2417
+ }, {
2418
+ kind: "number",
2419
+ name: "scale",
2420
+ integer: true,
2421
+ minimum: NUMERIC_SCALE_RANGE.min,
2422
+ maximum: NUMERIC_SCALE_RANGE.max,
2423
+ optional: true
2424
+ }],
2425
+ output: {
2426
+ codecId: "pg/numeric@1",
2427
+ nativeType: "numeric",
2428
+ typeParams: {
2429
+ precision: {
2430
+ kind: "arg",
2431
+ index: 0
2432
+ },
2433
+ scale: {
2434
+ kind: "arg",
2435
+ index: 1
2436
+ }
2437
+ }
2438
+ }
2439
+ },
2440
+ Timestamp: {
2441
+ kind: "typeConstructor",
2442
+ documentation: "A date and time without a time zone, represented as Temporal.PlainDateTime.",
2443
+ args: [{
2444
+ kind: "number",
2445
+ name: "precision",
2446
+ integer: true,
2447
+ minimum: 0,
2448
+ optional: true
2449
+ }],
2450
+ output: {
2451
+ codecId: "pg/timestamp-temporal@1",
2452
+ nativeType: "timestamp",
2453
+ typeParams: { precision: {
2454
+ kind: "arg",
2455
+ index: 0
2456
+ } }
2457
+ }
2458
+ },
2459
+ Timestamptz: {
2460
+ kind: "typeConstructor",
2461
+ documentation: "An instant represented as Temporal.Instant, with optional fractional-second precision.",
2462
+ args: [{
2463
+ kind: "number",
2464
+ name: "precision",
2465
+ integer: true,
2466
+ minimum: 0,
2467
+ optional: true
2468
+ }],
2469
+ output: {
2470
+ codecId: "pg/timestamptz-temporal@1",
2471
+ nativeType: "timestamptz",
2472
+ typeParams: { precision: {
2473
+ kind: "arg",
2474
+ index: 0
2475
+ } }
2476
+ }
2477
+ },
2478
+ Time: {
2479
+ kind: "typeConstructor",
2480
+ documentation: "A time of day without a time zone, represented as Temporal.PlainTime.",
2481
+ args: [{
2482
+ kind: "number",
2483
+ name: "precision",
2484
+ integer: true,
2485
+ minimum: 0,
2486
+ optional: true
2487
+ }],
2488
+ output: {
2489
+ codecId: "pg/time-temporal@1",
2490
+ nativeType: "time",
2491
+ typeParams: { precision: {
2492
+ kind: "arg",
2493
+ index: 0
2494
+ } }
2495
+ }
2496
+ },
2497
+ Timetz: {
2498
+ kind: "typeConstructor",
2499
+ documentation: "A time of day with a UTC offset stored as PostgreSQL timetz.",
2500
+ args: [{
2501
+ kind: "number",
2502
+ name: "precision",
2503
+ integer: true,
2504
+ minimum: 0,
2505
+ optional: true
2506
+ }],
2507
+ output: {
2508
+ codecId: "pg/timetz@1",
2509
+ nativeType: "timetz",
2510
+ typeParams: { precision: {
2511
+ kind: "arg",
2512
+ index: 0
2513
+ } }
2514
+ }
2515
+ },
2516
+ Uuid: {
2517
+ kind: "typeConstructor",
2518
+ documentation: "A universally unique identifier stored as PostgreSQL uuid.",
2519
+ output: {
2520
+ codecId: "pg/uuid@1",
2521
+ nativeType: "uuid"
2522
+ }
2523
+ },
2524
+ Inet: {
2525
+ kind: "typeConstructor",
2526
+ documentation: "An IPv4 or IPv6 address with an optional subnet mask.",
2527
+ output: {
2528
+ codecId: "pg/inet@1",
2529
+ nativeType: "inet"
2530
+ }
2531
+ },
2532
+ SmallInt: {
2533
+ kind: "typeConstructor",
2534
+ documentation: "A signed 16-bit integer represented as a JavaScript number.",
2535
+ output: {
2536
+ codecId: "pg/int2@1",
2537
+ nativeType: "int2"
2538
+ }
2539
+ },
2540
+ Real: {
2541
+ kind: "typeConstructor",
2542
+ documentation: "A single-precision floating-point number.",
2543
+ output: {
2544
+ codecId: "pg/float4@1",
2545
+ nativeType: "float4"
2546
+ }
2547
+ },
2548
+ Date: {
2549
+ kind: "typeConstructor",
2550
+ documentation: "A calendar date represented as Temporal.PlainDate.",
2551
+ output: {
2552
+ codecId: "pg/date-temporal@1",
2553
+ nativeType: "date"
2554
+ }
2555
+ },
2556
+ DateString: {
2557
+ kind: "typeConstructor",
2558
+ documentation: "A PostgreSQL date represented as database text rather than Temporal.PlainDate.",
2559
+ output: {
2560
+ codecId: "pg/date-string@1",
2561
+ nativeType: "date"
2562
+ }
2563
+ },
2564
+ TimestampString: {
2565
+ kind: "typeConstructor",
2566
+ documentation: "A timestamp without a time zone represented as PostgreSQL text.",
2567
+ args: [{
2568
+ kind: "number",
2569
+ name: "precision",
2570
+ integer: true,
2571
+ minimum: 0,
2572
+ optional: true
2573
+ }],
2574
+ output: {
2575
+ codecId: "pg/timestamp-string@1",
2576
+ nativeType: "timestamp",
2577
+ typeParams: { precision: {
2578
+ kind: "arg",
2579
+ index: 0
2580
+ } }
2581
+ }
2582
+ },
2583
+ TimestamptzJsDate: {
2584
+ kind: "typeConstructor",
2585
+ documentation: "An instant stored as PostgreSQL timestamptz and represented as a JavaScript Date.",
2586
+ args: [{
2587
+ kind: "number",
2588
+ name: "precision",
2589
+ integer: true,
2590
+ minimum: 0,
2591
+ optional: true
2592
+ }],
2593
+ output: {
2594
+ codecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,
2595
+ nativeType: "timestamptz",
2596
+ typeParams: { precision: {
2597
+ kind: "arg",
2598
+ index: 0
2599
+ } }
2600
+ }
2601
+ },
2602
+ TimestamptzString: {
2603
+ kind: "typeConstructor",
2604
+ documentation: "A timestamp with time zone represented as PostgreSQL text.",
2605
+ args: [{
2606
+ kind: "number",
2607
+ name: "precision",
2608
+ integer: true,
2609
+ minimum: 0,
2610
+ optional: true
2611
+ }],
2612
+ output: {
2613
+ codecId: "pg/timestamptz-string@1",
2614
+ nativeType: "timestamptz",
2615
+ typeParams: { precision: {
2616
+ kind: "arg",
2617
+ index: 0
2618
+ } }
2619
+ }
2620
+ },
2621
+ TimeString: {
2622
+ kind: "typeConstructor",
2623
+ documentation: "A time of day without a time zone represented as PostgreSQL text.",
2624
+ args: [{
2625
+ kind: "number",
2626
+ name: "precision",
2627
+ integer: true,
2628
+ minimum: 0,
2629
+ optional: true
2630
+ }],
2631
+ output: {
2632
+ codecId: "pg/time-string@1",
2633
+ nativeType: "time",
2634
+ typeParams: { precision: {
2635
+ kind: "arg",
2636
+ index: 0
2637
+ } }
2638
+ }
2639
+ }
2640
+ };
2272
2641
  function postgresRenderDefault(def, column) {
2273
2642
  if (def.kind === "function") return def.expression;
2274
2643
  return renderDefaultLiteral(def.value, column);
@@ -2279,9 +2648,9 @@ function createPostgresTargetDescriptor() {
2279
2648
  ...postgresTargetDescriptorMeta,
2280
2649
  contractSerializer: new PostgresContractSerializer(),
2281
2650
  schemaVerifier: new PostgresSchemaVerifier(),
2282
- inferPslContract(schema, describedContracts) {
2651
+ inferPslContract(schema, context, describedContracts) {
2283
2652
  PostgresDatabaseSchemaNode.assert(schema);
2284
- return inferPostgresPslContract(schema, describedContracts);
2653
+ return inferPostgresPslContract(schema, context, describedContracts);
2285
2654
  },
2286
2655
  buildPslContract(contract, context) {
2287
2656
  return buildPostgresPslContract(contract, context);
@@ -2299,10 +2668,10 @@ function createPostgresTargetDescriptor() {
2299
2668
  return blindCast(createPostgresMigrationRunner(family));
2300
2669
  },
2301
2670
  contractToSchema(contract, frameworkComponents) {
2302
- const expander = buildNativeTypeExpander(frameworkComponents);
2671
+ const expander = buildPostgresNativeTypeExpander(frameworkComponents);
2303
2672
  return contractToPostgresDatabaseSchemaNode(blindCast(contract), {
2304
2673
  annotationNamespace: "pg",
2305
- ...ifDefined("expandNativeType", expander),
2674
+ expandNativeType: expander,
2306
2675
  renderDefault: postgresRenderDefault,
2307
2676
  resolveDefault: postgresResolveDefault,
2308
2677
  ...ifDefined("dataTypeOf", buildDataTypeResolver(frameworkComponents))
@@ -2333,6 +2702,6 @@ function createPostgresTargetDescriptor() {
2333
2702
  }
2334
2703
  const postgresTargetDescriptor = createPostgresTargetDescriptor();
2335
2704
  //#endregion
2336
- export { postgresTargetDescriptor as n, postgresRenderDefault as t };
2705
+ export { postgresTargetDescriptor as i, postgresRenderDefault as n, postgresScalarAuthoringTypes as r, postgresNativeAuthoringTypes as t };
2337
2706
 
2338
- //# sourceMappingURL=control-BwOrmTN-.mjs.map
2707
+ //# sourceMappingURL=control-CYQReJto.mjs.map