@prisma/orm-target-postgres 8.0.0-rc.20-dev.10 → 8.0.0-rc.20-dev.12

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 (215) hide show
  1. package/dist/{adapter-BIWKN0d7-zXTBkzEf.mjs → adapter-BIWKN0d7-BI1J51N4.mjs} +5 -5
  2. package/dist/{adapter-BIWKN0d7-zXTBkzEf.mjs.map → adapter-BIWKN0d7-BI1J51N4.mjs.map} +1 -1
  3. package/dist/{adapter-5qylEP__.d.mts → adapter-BNZo-LwN.d.mts} +31 -9
  4. package/dist/{adapter-5qylEP__.d.mts.map → adapter-BNZo-LwN.d.mts.map} +1 -1
  5. package/dist/adapter.d.mts +6 -6
  6. package/dist/adapter.mjs +7 -7
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +2 -2
  9. package/dist/adapter__column-types.d.mts +2 -2
  10. package/dist/adapter__column-types.mjs +2 -2
  11. package/dist/adapter__control.d.mts +2 -2
  12. package/dist/adapter__control.mjs +4 -4
  13. package/dist/adapter__runtime.mjs +4 -4
  14. package/dist/adapter__sql-renderer.mjs +1 -1
  15. package/dist/adapter__types.d.mts +2 -2
  16. package/dist/{aggregates-CEqqEg8k.d.mts → aggregates-D3Gq0n_e.d.mts} +30 -8
  17. package/dist/{aggregates-CEqqEg8k.d.mts.map → aggregates-D3Gq0n_e.d.mts.map} +1 -1
  18. package/dist/{aggregates-Dw-lAutX.mjs → aggregates-xBA2jH0c.mjs} +13 -2
  19. package/dist/aggregates-xBA2jH0c.mjs.map +1 -0
  20. package/dist/{authoring-P5nKuHp1-DPQfTSM8.mjs → authoring-BLkari-V-D1FvcoJg.mjs} +112 -33
  21. package/dist/authoring-BLkari-V-D1FvcoJg.mjs.map +1 -0
  22. package/dist/{autoincrement-widths-DonNJgfS-CCvZ4u1W.mjs → autoincrement-widths-CC5ZgVXV-CiL5ge45.mjs} +3 -3
  23. package/dist/{autoincrement-widths-DonNJgfS-CCvZ4u1W.mjs.map → autoincrement-widths-CC5ZgVXV-CiL5ge45.mjs.map} +1 -1
  24. package/dist/{check-expressions-7uCCP01t-DtX2Vak9.mjs → check-expressions-Bl0eh1Jt-CCfoIDEB.mjs} +3 -3
  25. package/dist/{check-expressions-7uCCP01t-DtX2Vak9.mjs.map → check-expressions-Bl0eh1Jt-CCfoIDEB.mjs.map} +1 -1
  26. package/dist/codec-ids-Bt6JuEam.d.mts +1 -0
  27. package/dist/{codec-ids-C6II64Wy-CPYTqDTT.d.mts → codec-ids-CNEv5CTR-g_wnSmnu.d.mts} +6 -3
  28. package/dist/{codec-ids-C6II64Wy-CPYTqDTT.d.mts.map → codec-ids-CNEv5CTR-g_wnSmnu.d.mts.map} +1 -1
  29. package/dist/{codec-ids-BMhEpFwv-B8Zh0s_Q.mjs → codec-ids-D0wjQdEW-EypD_iZj.mjs} +6 -3
  30. package/dist/codec-ids-D0wjQdEW-EypD_iZj.mjs.map +1 -0
  31. package/dist/{codec-registry-D7XslgPe-DTZnVB8W.mjs → codec-registry-Cu-Nwsyl-BArjkoQ7.mjs} +4 -4
  32. package/dist/{codec-registry-D7XslgPe-DTZnVB8W.mjs.map → codec-registry-Cu-Nwsyl-BArjkoQ7.mjs.map} +1 -1
  33. package/dist/{codec-type-map-Fj5xCgwT-BeCXgfuR.d.mts → codec-type-map-CIZ7LbPA-CeMPxEAm.d.mts} +6 -3
  34. package/dist/codec-type-map-CIZ7LbPA-CeMPxEAm.d.mts.map +1 -0
  35. package/dist/{codec-types-Ct_4iTVc-3tFJcIBo.d.mts → codec-types-C7E42vTO-CGX0m6Mb.d.mts} +5 -18
  36. package/dist/codec-types-C7E42vTO-CGX0m6Mb.d.mts.map +1 -0
  37. package/dist/codec-types-CiEHACsD.d.mts +2 -0
  38. package/dist/{codecs-CADK7dCR-C8WToYQb.d.mts → codecs-BJBFipkV-CVMp939Z.d.mts} +72 -7
  39. package/dist/codecs-BJBFipkV-CVMp939Z.d.mts.map +1 -0
  40. package/dist/{codecs-CRl9-i_r-Co-bgYl3.mjs → codecs-BNpSaccO-CLaErrDe.mjs} +257 -50
  41. package/dist/codecs-BNpSaccO-CLaErrDe.mjs.map +1 -0
  42. package/dist/{codecs-CoEpEqjM.d.mts → codecs-DulR4oG1.d.mts} +2 -2
  43. package/dist/{codecs-CoEpEqjM.d.mts.map → codecs-DulR4oG1.d.mts.map} +1 -1
  44. package/dist/{column-types-B4zsV-u3.mjs → column-types-DW38xCZG.mjs} +13 -5
  45. package/dist/column-types-DW38xCZG.mjs.map +1 -0
  46. package/dist/{column-types-Bs2V0j8T.d.mts → column-types-DtpCrZt4.d.mts} +25 -8
  47. package/dist/column-types-DtpCrZt4.d.mts.map +1 -0
  48. package/dist/{contract-contributions-DTGGTwRZ-ZfPwFqZ1.mjs → contract-contributions-DTGGTwRZ-Bf6l72jg.mjs} +11 -11
  49. package/dist/{contract-contributions-DTGGTwRZ-ZfPwFqZ1.mjs.map → contract-contributions-DTGGTwRZ-Bf6l72jg.mjs.map} +1 -1
  50. package/dist/{contract-free-o7olebm9.mjs → contract-free-q405H_rE.mjs} +4 -4
  51. package/dist/{contract-free-o7olebm9.mjs.map → contract-free-q405H_rE.mjs.map} +1 -1
  52. package/dist/{control-CYMqxaFZ.mjs → control-B_4_C92P.mjs} +4 -5
  53. package/dist/control-B_4_C92P.mjs.map +1 -0
  54. package/dist/{control--HupSPoV.d.mts → control-m9LWRUnY.d.mts} +260 -94
  55. package/dist/control-m9LWRUnY.d.mts.map +1 -0
  56. package/dist/{control-BnLOEOZo.d.mts → control-nSGzcTXc.d.mts} +2 -2
  57. package/dist/{control-BnLOEOZo.d.mts.map → control-nSGzcTXc.d.mts.map} +1 -1
  58. package/dist/{control-policy-BcplTDhK-DMJjsg6l.mjs → control-policy-CVRNJsbY-Cljg0_0d.mjs} +10 -10
  59. package/dist/{control-policy-BcplTDhK-DMJjsg6l.mjs.map → control-policy-CVRNJsbY-Cljg0_0d.mjs.map} +1 -1
  60. package/dist/{data-type-entries-gQW3-KSb-BIl8vgus.mjs → data-type-entries-BNpstbGO-Cd57I2Q2.mjs} +3 -3
  61. package/dist/{data-type-entries-gQW3-KSb-BIl8vgus.mjs.map → data-type-entries-BNpstbGO-Cd57I2Q2.mjs.map} +1 -1
  62. package/dist/{data-types-Chx0mjTP-DczU4S9b.mjs → data-types-tjXyQbIR-C76ctfke.mjs} +6 -6
  63. package/dist/data-types-tjXyQbIR-C76ctfke.mjs.map +1 -0
  64. package/dist/{date-time-now-generators-CMkXVbMG-C-GjhReE.d.mts → date-time-now-generators-C2aktlrc-uf9LqU6E.d.mts} +5 -4
  65. package/dist/date-time-now-generators-C2aktlrc-uf9LqU6E.d.mts.map +1 -0
  66. package/dist/{ddl-B7Rqlz6D-B7dRDgYb.mjs → ddl-B6k3Lu9l-BcIKfN82.mjs} +4 -4
  67. package/dist/{ddl-B7Rqlz6D-B7dRDgYb.mjs.map → ddl-B6k3Lu9l-BcIKfN82.mjs.map} +1 -1
  68. package/dist/{descriptor-meta-15Dhylpt-BlJRsuMJ.mjs → descriptor-meta-BDfFIQHx-C2ewuoHD.mjs} +11 -11
  69. package/dist/{descriptor-meta-15Dhylpt-BlJRsuMJ.mjs.map → descriptor-meta-BDfFIQHx-C2ewuoHD.mjs.map} +1 -1
  70. package/dist/{descriptor-meta-I7Ih-0hE-vhWTPChK.mjs → descriptor-meta-I7Ih-0hE-Dl5m2vYH.mjs} +3 -3
  71. package/dist/{descriptor-meta-I7Ih-0hE-vhWTPChK.mjs.map → descriptor-meta-I7Ih-0hE-Dl5m2vYH.mjs.map} +1 -1
  72. package/dist/{descriptor-meta-runtime-Dft1L7eE-D8vpOz_Z.mjs → descriptor-meta-runtime-Dt2G0LGV-u14ci_1u.mjs} +5 -4
  73. package/dist/descriptor-meta-runtime-Dt2G0LGV-u14ci_1u.mjs.map +1 -0
  74. package/dist/{diff-database-schema-zWe9Lrh7-CD7T95HL.mjs → diff-database-schema-CXherlyh-CZ68d_H5.mjs} +10 -10
  75. package/dist/{diff-database-schema-zWe9Lrh7-CD7T95HL.mjs.map → diff-database-schema-CXherlyh-CZ68d_H5.mjs.map} +1 -1
  76. package/dist/driver.d.mts +2 -2
  77. package/dist/driver.mjs +4 -3
  78. package/dist/driver__control.mjs +1 -1
  79. package/dist/driver__runtime.d.mts +2 -2
  80. package/dist/driver__runtime.mjs +3 -2
  81. package/dist/{errors-BrhQYgdL-IvZHPjwL.mjs → errors-0GfG3o8N-CM3BsoOd.mjs} +21 -10
  82. package/dist/errors-0GfG3o8N-CM3BsoOd.mjs.map +1 -0
  83. package/dist/{errors-LdIppowi.d.mts → errors-CaVvV9Mj.d.mts} +2 -2
  84. package/dist/{errors-LdIppowi.d.mts.map → errors-CaVvV9Mj.d.mts.map} +1 -1
  85. package/dist/{full-text-BYg7EVX2.mjs → full-text-DZkaI8Rj.mjs} +3 -3
  86. package/dist/{full-text-BYg7EVX2.mjs.map → full-text-DZkaI8Rj.mjs.map} +1 -1
  87. package/dist/{full-text-collection-method-BFd2u2cs-Ba3OiWM3.d.mts → full-text-collection-method-DHuJr46z-Bndk11cK.d.mts} +4 -4
  88. package/dist/full-text-collection-method-DHuJr46z-Bndk11cK.d.mts.map +1 -0
  89. package/dist/{full-text-index-definition-BPxQQBuC-VLyQ1kEL.mjs → full-text-index-definition-Cqx1_LYV-P_asS2NF.mjs} +3 -3
  90. package/dist/{full-text-index-definition-BPxQQBuC-VLyQ1kEL.mjs.map → full-text-index-definition-Cqx1_LYV-P_asS2NF.mjs.map} +1 -1
  91. package/dist/{full-text-parsers-CFFxiOrp-CrZ7VI1m.mjs → full-text-parsers-BQ2Szxka-C5Uk-coo.mjs} +5 -5
  92. package/dist/{full-text-parsers-CFFxiOrp-CrZ7VI1m.mjs.map → full-text-parsers-BQ2Szxka-C5Uk-coo.mjs.map} +1 -1
  93. package/dist/{full-text-search-document-Doy5TF7c-aMWM_1KB.mjs → full-text-search-document-BH_aXzI2-jhilBeF9.mjs} +5 -5
  94. package/dist/{full-text-search-document-Doy5TF7c-aMWM_1KB.mjs.map → full-text-search-document-BH_aXzI2-jhilBeF9.mjs.map} +1 -1
  95. package/dist/{full-text-SDbfxrE_.d.mts → full-text-xZIrFi7x.d.mts} +3 -3
  96. package/dist/{full-text-SDbfxrE_.d.mts.map → full-text-xZIrFi7x.d.mts.map} +1 -1
  97. package/dist/{index-types-BihjrAAq-C2VnfAyF.mjs → index-types-CQHbUgu9-Cr-h50-J.mjs} +3 -3
  98. package/dist/{index-types-BihjrAAq-C2VnfAyF.mjs.map → index-types-CQHbUgu9-Cr-h50-J.mjs.map} +1 -1
  99. package/dist/{infer-psl-contract-CdGGwxP3-JfIJ81cu.mjs → infer-psl-contract-DLVFIwIv-BE7SsHDM.mjs} +10 -10
  100. package/dist/{infer-psl-contract-CdGGwxP3-JfIJ81cu.mjs.map → infer-psl-contract-DLVFIwIv-BE7SsHDM.mjs.map} +1 -1
  101. package/dist/migration-Be_iuIpn.mjs.map +1 -1
  102. package/dist/{native-type-normalizer-Cn-RGt_E.mjs → native-type-normalizer-Fkw-n7I3.mjs} +2 -2
  103. package/dist/{native-type-normalizer-Cn-RGt_E.mjs.map → native-type-normalizer-Fkw-n7I3.mjs.map} +1 -1
  104. package/dist/{op-factory-call-CNXvLsqS-BT9PCNDI.mjs → op-factory-call-pgrknkpg-BW61pr91.mjs} +9 -9
  105. package/dist/{op-factory-call-CNXvLsqS-BT9PCNDI.mjs.map → op-factory-call-pgrknkpg-BW61pr91.mjs.map} +1 -1
  106. package/dist/{operation-types--Wa_cv45-RoRnL1Dn.d.mts → operation-types-BlaAPrew-BkZiJwPy.d.mts} +4 -4
  107. package/dist/{operation-types--Wa_cv45-RoRnL1Dn.d.mts.map → operation-types-BlaAPrew-BkZiJwPy.d.mts.map} +1 -1
  108. package/dist/operation-types-Bz8xX2oY.d.mts +1 -0
  109. package/dist/{pack-2CYw2w-b.d.mts → pack-Cbl186uA.d.mts} +174 -88
  110. package/dist/pack-Cbl186uA.d.mts.map +1 -0
  111. package/dist/{planner-ddl-builders-cYnH52gC-BWifb_M6.mjs → planner-ddl-builders-B3i8RIDk-Bl7toHkW.mjs} +3 -3
  112. package/dist/{planner-ddl-builders-cYnH52gC-BWifb_M6.mjs.map → planner-ddl-builders-B3i8RIDk-Bl7toHkW.mjs.map} +1 -1
  113. package/dist/{planner-identity-values-QstrMJ2U-CcpaRVPY.mjs → planner-identity-values-CCscfo-A-ClO_dRiZ.mjs} +3 -3
  114. package/dist/{planner-identity-values-QstrMJ2U-CcpaRVPY.mjs.map → planner-identity-values-CCscfo-A-ClO_dRiZ.mjs.map} +1 -1
  115. package/dist/{planner-produced-postgres-migration-W1MyA8gh-CsJ2mBwk.mjs → planner-produced-postgres-migration-B888gy9y-ChG4SvFH.mjs} +4 -4
  116. package/dist/{planner-produced-postgres-migration-W1MyA8gh-CsJ2mBwk.mjs.map → planner-produced-postgres-migration-B888gy9y-ChG4SvFH.mjs.map} +1 -1
  117. package/dist/{planner-B_mJlpS3-Cp4ZLLMC.mjs → planner-ro2oqvMl-Czh1EHR9.mjs} +11 -11
  118. package/dist/{planner-B_mJlpS3-Cp4ZLLMC.mjs.map → planner-ro2oqvMl-Czh1EHR9.mjs.map} +1 -1
  119. package/dist/{planner-sql-checks-D-K44J19-CzvrqzNB.mjs → planner-sql-checks-DvVjRXZI-CZff7ZwA.mjs} +5 -5
  120. package/dist/{planner-sql-checks-D-K44J19-CzvrqzNB.mjs.map → planner-sql-checks-DvVjRXZI-CZff7ZwA.mjs.map} +1 -1
  121. package/dist/{postgres-codec-traits-CnP5Bjxp-Dxdgv0TI.mjs → postgres-codec-traits-BL_Co0ST-CvoZqScE.mjs} +3 -3
  122. package/dist/{postgres-codec-traits-CnP5Bjxp-Dxdgv0TI.mjs.map → postgres-codec-traits-BL_Co0ST-CvoZqScE.mjs.map} +1 -1
  123. package/dist/{postgres-contract-view-DgBsbRyj-CWrgmyHg.mjs → postgres-contract-view-B83MckYE-C5HdTzw0.mjs} +9 -9
  124. package/dist/{postgres-contract-view-DgBsbRyj-CWrgmyHg.mjs.map → postgres-contract-view-B83MckYE-C5HdTzw0.mjs.map} +1 -1
  125. package/dist/{postgres-migration-iX1KfbM2-CF0mqcmz.mjs → postgres-migration-B72vywyI-Bz1IVjIU.mjs} +12 -12
  126. package/dist/{postgres-migration-iX1KfbM2-CF0mqcmz.mjs.map → postgres-migration-B72vywyI-Bz1IVjIU.mjs.map} +1 -1
  127. package/dist/{postgres-schema-C6w1rzOF-D1fdwqRx.mjs → postgres-schema-uGdd5lv3-CahJcFWL.mjs} +6 -6
  128. package/dist/{postgres-schema-C6w1rzOF-D1fdwqRx.mjs.map → postgres-schema-uGdd5lv3-CahJcFWL.mjs.map} +1 -1
  129. package/dist/{prisma7-binding-VHjZ983n.mjs → prisma7-binding-B-1EN2aJ.mjs} +8 -8
  130. package/dist/{prisma7-binding-VHjZ983n.mjs.map → prisma7-binding-B-1EN2aJ.mjs.map} +1 -1
  131. package/dist/{prisma7-binding-a56klfkc.d.mts → prisma7-binding-BxxcJeE0.d.mts} +174 -88
  132. package/dist/prisma7-binding-BxxcJeE0.d.mts.map +1 -0
  133. package/dist/{render-ops-DszuGMgp--NFBbNry.mjs → render-ops-Bcu9Ut4l-DqXsDZ0G.mjs} +4 -4
  134. package/dist/{render-ops-DszuGMgp--NFBbNry.mjs.map → render-ops-Bcu9Ut4l-DqXsDZ0G.mjs.map} +1 -1
  135. package/dist/{resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs → resolve-ddl-schema-DoD8dGk5-CBXjVWGS.mjs} +3 -3
  136. package/dist/{resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs.map → resolve-ddl-schema-DoD8dGk5-CBXjVWGS.mjs.map} +1 -1
  137. package/dist/{runtime-Ci_toEDZ.d.mts → runtime-BjS3N8LM.d.mts} +3 -3
  138. package/dist/{runtime-Ci_toEDZ.d.mts.map → runtime-BjS3N8LM.d.mts.map} +1 -1
  139. package/dist/{runtime-OMKUJYSn.d.mts → runtime-DfvyJQER.d.mts} +12 -3
  140. package/dist/runtime-DfvyJQER.d.mts.map +1 -0
  141. package/dist/{runtime-B1WvyyiV.mjs → runtime-y_2Hxv0c.mjs} +61 -19
  142. package/dist/runtime-y_2Hxv0c.mjs.map +1 -0
  143. package/dist/{server-text-types-DiGLNzzU-DZ13qVS2.mjs → session-settings-cHekxETj-CKXTmPoK.mjs} +98 -4
  144. package/dist/session-settings-cHekxETj-CKXTmPoK.mjs.map +1 -0
  145. package/dist/{sql-renderer-BdWJPa5F-Ct0CPlXc.mjs → sql-renderer-BdWJPa5F-DH1baMIk.mjs} +3 -3
  146. package/dist/{sql-renderer-BdWJPa5F-Ct0CPlXc.mjs.map → sql-renderer-BdWJPa5F-DH1baMIk.mjs.map} +1 -1
  147. package/dist/{sql-utils-Bnw3JbWf-BN0gcjZB.mjs → sql-utils-DUETeYBc-DbbAr6EV.mjs} +3 -3
  148. package/dist/{sql-utils-Bnw3JbWf-BN0gcjZB.mjs.map → sql-utils-DUETeYBc-DbbAr6EV.mjs.map} +1 -1
  149. package/dist/target.d.mts +18 -18
  150. package/dist/target.mjs +33 -33
  151. package/dist/target__aggregates.d.mts +1 -1
  152. package/dist/target__aggregates.mjs +1 -1
  153. package/dist/target__codec-ids.d.mts +3 -3
  154. package/dist/target__codec-ids.mjs +2 -2
  155. package/dist/target__codec-types.d.mts +4 -4
  156. package/dist/target__codecs.d.mts +3 -3
  157. package/dist/target__codecs.mjs +3 -3
  158. package/dist/target__contract-free.mjs +3 -3
  159. package/dist/target__control.d.mts +2 -2
  160. package/dist/target__control.mjs +17 -17
  161. package/dist/target__control.mjs.map +1 -1
  162. package/dist/target__data-types.mjs +2 -2
  163. package/dist/target__diff-database-schema.mjs +1 -1
  164. package/dist/target__errors.d.mts +1 -1
  165. package/dist/target__errors.mjs +1 -1
  166. package/dist/target__full-text-index-authoring.mjs +2 -2
  167. package/dist/target__full-text.d.mts +3 -3
  168. package/dist/target__full-text.mjs +2 -2
  169. package/dist/target__issue-planner.mjs +1 -1
  170. package/dist/target__migration.mjs +2 -2
  171. package/dist/target__native-type-normalizer.mjs +1 -1
  172. package/dist/target__op-factory-call.mjs +1 -1
  173. package/dist/target__operation-types.d.mts +2 -2
  174. package/dist/target__pack.d.mts +2 -2
  175. package/dist/target__pack.mjs +1 -1
  176. package/dist/target__planner-ddl-builders.mjs +1 -1
  177. package/dist/target__planner-identity-values.mjs +1 -1
  178. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  179. package/dist/target__planner-sql-checks.mjs +1 -1
  180. package/dist/target__planner.mjs +2 -2
  181. package/dist/target__prisma7-binding.d.mts +1 -1
  182. package/dist/target__prisma7-binding.mjs +1 -1
  183. package/dist/target__render-ops.mjs +1 -1
  184. package/dist/target__runtime.d.mts +3 -3
  185. package/dist/target__runtime.mjs +9 -9
  186. package/dist/target__runtime.mjs.map +1 -1
  187. package/dist/target__schema-ir-annotations.mjs +1 -1
  188. package/dist/target__sql-utils.mjs +3 -3
  189. package/dist/target__types.mjs +2 -2
  190. package/dist/{types-AvjnIUna.d.mts → types-BZ2l9Q5i.d.mts} +1 -1
  191. package/package.json +12 -10
  192. package/dist/aggregates-Dw-lAutX.mjs.map +0 -1
  193. package/dist/authoring-P5nKuHp1-DPQfTSM8.mjs.map +0 -1
  194. package/dist/codec-ids-BMhEpFwv-B8Zh0s_Q.mjs.map +0 -1
  195. package/dist/codec-ids-CcB5uBNf.d.mts +0 -1
  196. package/dist/codec-type-map-Fj5xCgwT-BeCXgfuR.d.mts.map +0 -1
  197. package/dist/codec-types-BBACckHa.d.mts +0 -2
  198. package/dist/codec-types-Ct_4iTVc-3tFJcIBo.d.mts.map +0 -1
  199. package/dist/codecs-CADK7dCR-C8WToYQb.d.mts.map +0 -1
  200. package/dist/codecs-CRl9-i_r-Co-bgYl3.mjs.map +0 -1
  201. package/dist/column-types-B4zsV-u3.mjs.map +0 -1
  202. package/dist/column-types-Bs2V0j8T.d.mts.map +0 -1
  203. package/dist/control--HupSPoV.d.mts.map +0 -1
  204. package/dist/control-CYMqxaFZ.mjs.map +0 -1
  205. package/dist/data-types-Chx0mjTP-DczU4S9b.mjs.map +0 -1
  206. package/dist/date-time-now-generators-CMkXVbMG-C-GjhReE.d.mts.map +0 -1
  207. package/dist/descriptor-meta-runtime-Dft1L7eE-D8vpOz_Z.mjs.map +0 -1
  208. package/dist/errors-BrhQYgdL-IvZHPjwL.mjs.map +0 -1
  209. package/dist/full-text-collection-method-BFd2u2cs-Ba3OiWM3.d.mts.map +0 -1
  210. package/dist/operation-types-OXILTAOX.d.mts +0 -1
  211. package/dist/pack-2CYw2w-b.d.mts.map +0 -1
  212. package/dist/prisma7-binding-a56klfkc.d.mts.map +0 -1
  213. package/dist/runtime-B1WvyyiV.mjs.map +0 -1
  214. package/dist/runtime-OMKUJYSn.d.mts.map +0 -1
  215. package/dist/server-text-types-DiGLNzzU-DZ13qVS2.mjs.map +0 -1
@@ -1,16 +1,17 @@
1
- import { A as PG_TIME_TEMPORAL_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, N as PG_UUID_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARBIT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_TSQUERY_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID, y as PG_JSON_CODEC_ID } from "./codec-ids-BMhEpFwv-B8Zh0s_Q.mjs";
1
+ import { A as PG_TIMESTAMP_TEMPORAL_CODEC_ID, C as PG_TEXT_CODEC_ID, D as PG_TIMESTAMP_DATE_CODEC_ID, E as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, F as PG_UNBOUNDED_INT_CODEC_ID, I as PG_UUID_CODEC_ID, L as PG_VARBIT_CODEC_ID, M as PG_TIME_STRING_CODEC_ID, N as PG_TIME_TEMPORAL_CODEC_ID, O as PG_TIMESTAMP_INSTANT_CODEC_ID, P as PG_TSQUERY_CODEC_ID, R as PG_VARCHAR_CODEC_ID, S as PG_TEXT_ARRAY_CODEC_ID, T as PG_TIMESTAMPTZ_STRING_CODEC_ID, _ as PG_INTERVAL_STRING_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_JSON_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_TIMETZ_CODEC_ID, k as PG_TIMESTAMP_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_INT_CODEC_ID, w as PG_TIMESTAMPTZ_DATE_CODEC_ID, x as PG_NUMERIC_CODEC_ID, y as PG_JSONB_CODEC_ID } from "./codec-ids-D0wjQdEW-EypD_iZj.mjs";
2
2
  import { a as postgresCodec, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs";
3
- import { a as errorTemporalUnrepresentable, c as postgresError, i as errorTemporalUnavailableForDefault, n as errorTemporalNonIsoCalendar, o as errorTemporalWrongType, r as errorTemporalUnavailable, s as errorTimestampTextWrongType } from "./errors-BrhQYgdL-IvZHPjwL.mjs";
4
- import { A as pgJsonb, C as pgInet, D as pgInterval, E as pgInt8, F as pgText, G as pgTsquery, H as pgTimestamptzStoredText, I as pgTextArray, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, N as pgNumericParams, P as pgPrecisionParams, Q as postgresYearText, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, X as postgresIntervalFields, _ as pgDate, a as formatIsoDuration, b as pgEnumParams, c as microsFromFraction, d as pgBool, f as pgBytea, g as pgCharacterLengthParams, h as pgChar, j as pgJsonbEnumRefusal, k as pgJson, l as pgBit, n as ISO_DURATION, o as intervalFieldsOf, q as pgVarbit, r as MICROS_PER_SECOND, s as isoYearText, t as BYTEA_TEXT, u as pgBitLengthParams, w as pgInt2, x as pgFloat4, y as pgEnum, z as pgTimestamp } from "./data-types-Chx0mjTP-DczU4S9b.mjs";
3
+ import { a as errorTemporalUnavailableForDefault, c as errorTimestampTextWrongType, i as errorTemporalUnavailable, l as postgresError, o as errorTemporalUnrepresentable, r as errorTemporalNonIsoCalendar, s as errorTemporalWrongType, t as errorDateStyleNotIso } from "./errors-0GfG3o8N-CM3BsoOd.mjs";
4
+ import { A as pgJsonb, B as pgTimestampStoredText, C as pgInet, D as pgInterval, E as pgInt8, F as pgText, G as pgTsquery, H as pgTimestamptzStoredText, I as pgTextArray, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, N as pgNumericParams, O as pgIntervalStoredText, P as pgPrecisionParams, Q as postgresYearText, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, X as postgresIntervalFields, _ as pgDate, a as formatIsoDuration, b as pgEnumParams, c as microsFromFraction, d as pgBool, f as pgBytea, g as pgCharacterLengthParams, h as pgChar, j as pgJsonbEnumRefusal, k as pgJson, l as pgBit, n as ISO_DURATION, o as intervalFieldsOf, q as pgVarbit, r as MICROS_PER_SECOND, s as isoYearText, t as BYTEA_TEXT, u as pgBitLengthParams, w as pgInt2, x as pgFloat4, y as pgEnum, z as pgTimestamp } from "./data-types-tjXyQbIR-C76ctfke.mjs";
5
5
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
6
6
  import { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlTextCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlTextDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
7
- import { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, isNonFiniteText, numeralText, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral, storedNumeralText } from "@prisma/orm-framework/components/codec";
7
+ import { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, dateTimeStoredText, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, isNonFiniteText, numeralText, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral, storedNumeralText } from "@prisma/orm-framework/components/codec";
8
8
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
9
9
  import { blindCast } from "@prisma/orm-framework/utils/casts";
10
10
  import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
11
11
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
12
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
12
13
  import { parse } from "postgres-array";
13
- //#region ../../../3-targets/postgres/1-target/dist/codecs-CRl9-i_r.mjs
14
+ //#region ../../../3-targets/postgres/1-target/dist/codecs-BNpSaccO.mjs
14
15
  /**
15
16
  * A `numeric` value as its canonical decimal text. A number is written out without an exponent,
16
17
  * because `numeric` text has no exponent syntax and `toDataTypeValue` refuses one.
@@ -269,6 +270,38 @@ const pgJsonEncode = (value) => JSON.stringify(value);
269
270
  const pgJsonDecode = (wire) => typeof wire === "string" ? parseJsonWire(wire) : wire;
270
271
  const pgJsonbEncode = (value) => JSON.stringify(value);
271
272
  const pgJsonbDecode = (wire) => typeof wire === "string" ? parseJsonWire(wire) : wire;
273
+ const INFINITIES = /* @__PURE__ */ new Set(["infinity", "-infinity"]);
274
+ const ISO_DATE_PREFIX = /^[+-]?\d{4,}-\d{2}-\d{2}/;
275
+ const LONG_YEAR_DATE = /^(\d{7,})(-\d{2}-\d{2})$/;
276
+ const END_OF_DAY = "24:00:00";
277
+ const MIDNIGHT = "00:00:00";
278
+ /** `wire`, a date or timestamp PostgreSQL printed or its ISO 8601 stored form, unless it printed it under a DateStyle other than ISO, which is refused. `infinity` and `-infinity` print the same in every style. */
279
+ function requireIsoDateStyle(codecId, wire) {
280
+ if (INFINITIES.has(wire) || ISO_DATE_PREFIX.test(wire)) return wire;
281
+ throw errorDateStyleNotIso(codecId, wire);
282
+ }
283
+ /**
284
+ * The stored form (ADR 254, "Date and time types") of the text PostgreSQL prints for a date or time type under DateStyle ISO, with the UTC offset of an instant converted to UTC. A value PostgreSQL holds beyond the stored form's range is read as ISO text of the same shape: a year of seven digits keeps them all, as in `+5874897-12-31`, and the end of the day stays `24:00:00`. Text PostgreSQL prints under another DateStyle is refused.
285
+ */
286
+ function storedTextFromWire(codecId, reading, wire) {
287
+ if (reading.holdsInfinity && INFINITIES.has(wire)) return wire;
288
+ const hasDate = reading.shape !== "time" && reading.shape !== "timeWithOffset";
289
+ if (hasDate) requireIsoDateStyle(codecId, wire);
290
+ const longYear = reading.shape === "date" ? LONG_YEAR_DATE.exec(wire) : null;
291
+ if (longYear !== null) return `+${longYear[1]}${longYear[2]}`;
292
+ if (!hasDate && wire.startsWith(END_OF_DAY)) {
293
+ const read = storedText(codecId, reading, `${MIDNIGHT}${wire.slice(8)}`);
294
+ return `${END_OF_DAY}${read.slice(8)}`;
295
+ }
296
+ return storedText(codecId, reading, wire);
297
+ }
298
+ function storedText(codecId, reading, wire) {
299
+ return dateTimeStoredText(isoYearText(wire), {
300
+ shape: reading.shape,
301
+ ownerId: codecId,
302
+ ...ifDefined("maxOffsetHours", reading.maxOffsetHours)
303
+ }, wire);
304
+ }
272
305
  let fallback;
273
306
  /**
274
307
  * Sets the implementation `requireTemporal` returns when the runtime has no global `Temporal`.
@@ -282,16 +315,20 @@ function setFallbackTemporal(implementation) {
282
315
  * `RUNTIME.TEMPORAL_UNAVAILABLE` when there is neither.
283
316
  */
284
317
  function requireTemporal(meta) {
285
- if (typeof Temporal !== "undefined") return Temporal;
318
+ const runtimeTemporal = blindCast(globalThis).Temporal;
319
+ if (runtimeTemporal !== void 0) return runtimeTemporal;
286
320
  if (fallback !== void 0) return fallback;
287
321
  throw "generatorId" in meta ? errorTemporalUnavailableForDefault(meta.generatorId) : errorTemporalUnavailable(meta.codecId, meta.operation);
288
322
  }
289
323
  const POSTGRES_TEMPORAL_SENTINELS = /* @__PURE__ */ new Set(["infinity", "-infinity"]);
324
+ /** The Temporal types whose text PostgreSQL prints the same in every DateStyle, because it holds no date. Every other Temporal codec reads a date, so its text is refused unless PostgreSQL printed it under DateStyle ISO. */
325
+ const TEMPORAL_TAGS_WITHOUT_A_DATE = /* @__PURE__ */ new Set(["Temporal.PlainTime"]);
290
326
  function decodeTemporalText(identity, wire, parse) {
291
327
  const temporal = requireTemporal({
292
328
  codecId: identity.codecId,
293
329
  operation: "decode"
294
330
  });
331
+ if (!TEMPORAL_TAGS_WITHOUT_A_DATE.has(identity.temporalTag)) requireIsoDateStyle(identity.codecId, wire);
295
332
  if (POSTGRES_TEMPORAL_SENTINELS.has(wire)) throw errorTemporalUnrepresentable({
296
333
  ...identity,
297
334
  operation: "decode",
@@ -310,11 +347,11 @@ function decodeTemporalText(identity, wire, parse) {
310
347
  });
311
348
  }
312
349
  }
313
- function encodeTemporalValue(identity, value) {
350
+ function encodeTemporalValue(identity, value, isoText = (temporalValue) => temporalValue.toString()) {
314
351
  const tag = typeof value === "object" && value !== null ? Reflect.get(value, Symbol.toStringTag) : void 0;
315
352
  if (tag !== identity.temporalTag) throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, describeEncodeInput(value, tag));
316
353
  if (value.calendarId !== void 0 && value.calendarId !== "iso8601") throw errorTemporalNonIsoCalendar(identity.codecId, value.calendarId);
317
- return postgresYearText(value.toString());
354
+ return postgresYearText(isoText(value));
318
355
  }
319
356
  function describeEncodeInput(value, tag) {
320
357
  if (typeof tag === "string") return `a ${tag}`;
@@ -342,6 +379,11 @@ const TIMESTAMPTZ_TEMPORAL = {
342
379
  stringType: "TimestamptzString(p)",
343
380
  temporalTag: "Temporal.Instant"
344
381
  };
382
+ const TIMESTAMP_INSTANT = {
383
+ codecId: PG_TIMESTAMP_INSTANT_CODEC_ID,
384
+ stringType: "TimestampString(p)",
385
+ temporalTag: "Temporal.Instant"
386
+ };
345
387
  const TIME_TEMPORAL = {
346
388
  codecId: PG_TIME_TEMPORAL_CODEC_ID,
347
389
  stringType: "TimeString(p)",
@@ -353,62 +395,88 @@ const pgTimestampTemporalDecode = (wire) => decodeTemporalText(TIMESTAMP_TEMPORA
353
395
  const pgTimestampTemporalEncode = (value) => encodeTemporalValue(TIMESTAMP_TEMPORAL, value);
354
396
  const pgTimestamptzTemporalDecode = (wire) => decodeTemporalText(TIMESTAMPTZ_TEMPORAL, wire, (temporal, text) => temporal.Instant.from(text));
355
397
  const pgTimestamptzTemporalEncode = (value) => encodeTemporalValue(TIMESTAMPTZ_TEMPORAL, value);
398
+ /** Reads a timestamp without a time zone as the instant it names in UTC. */
399
+ const pgTimestampInstantDecode = (wire) => decodeTemporalText(TIMESTAMP_INSTANT, wire, (temporal, text) => temporal.Instant.from(`${pgTimestampStoredText(text)}Z`));
400
+ /** Writes an instant as its UTC date and time, with no offset, as a timestamp without a time zone holds it. */
401
+ const pgTimestampInstantEncode = (value) => encodeTemporalValue(TIMESTAMP_INSTANT, value, (instant) => withoutUtcDesignator(instant.toString()));
356
402
  const pgTimeTemporalDecode = (wire) => decodeTemporalText(TIME_TEMPORAL, wire, (temporal, text) => temporal.PlainTime.from(text));
357
403
  const pgTimeTemporalEncode = (value) => encodeTemporalValue(TIME_TEMPORAL, value);
358
404
  const EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS = (/* @__PURE__ */ new Date("-004713-11-24T00:00:00Z")).getTime();
359
- function utcTimestamptzText(value, codecId) {
405
+ function utcIsoText(value, codecId) {
360
406
  const milliseconds = value.getTime();
361
407
  if (!Number.isFinite(milliseconds) || milliseconds < EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS) throw new RangeError(`${codecId} writes a Date as UTC text and needs a valid Date on or after 4714-11-24 BC, the earliest timestamp PostgreSQL holds; got ${String(value)}`);
362
- return postgresYearText(value.toISOString());
408
+ return value.toISOString();
409
+ }
410
+ function utcTimestamptzText(value, codecId) {
411
+ return postgresYearText(utcIsoText(value, codecId));
363
412
  }
364
- function invalidDate() {
365
- return /* @__PURE__ */ new RangeError(`${PG_TIMESTAMPTZ_DATE_CODEC_ID} requires a valid Date or a representable ISO PostgreSQL timestamp with time zone; use TimestamptzString for unsupported values`);
413
+ /** The UTC wall-clock time of `value` with no offset, as PostgreSQL reads a timestamp without a time zone. */
414
+ function utcTimestampText(value, codecId) {
415
+ return postgresYearText(withoutUtcDesignator(utcIsoText(value, codecId)));
416
+ }
417
+ /** ISO text in UTC without its trailing `Z`. */
418
+ function withoutUtcDesignator(isoText) {
419
+ return isoText.endsWith("Z") ? isoText.slice(0, -1) : isoText;
420
+ }
421
+ const TIMESTAMPTZ_DATE = {
422
+ codecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,
423
+ typeDescription: "timestamp with time zone",
424
+ stringType: "TimestamptzString",
425
+ textCodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,
426
+ instantText: pgTimestamptzStoredText
427
+ };
428
+ const TIMESTAMP_DATE = {
429
+ codecId: PG_TIMESTAMP_DATE_CODEC_ID,
430
+ typeDescription: "timestamp, read as UTC",
431
+ stringType: "TimestampString",
432
+ textCodecId: PG_TIMESTAMP_STRING_CODEC_ID,
433
+ instantText: (text) => pgTimestamptzStoredText(`${pgTimestampStoredText(text)}Z`)
434
+ };
435
+ function invalidDate(identity) {
436
+ return /* @__PURE__ */ new RangeError(`${identity.codecId} requires a valid Date or a representable ISO PostgreSQL ${identity.typeDescription}; use ${identity.stringType} for unsupported values`);
366
437
  }
367
438
  function isRepresentable(value) {
368
439
  return value instanceof Date && Number.isFinite(value.getTime()) && value.getTime() >= EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS;
369
440
  }
370
- function validateDate(value) {
371
- if (!isRepresentable(value)) throw invalidDate();
441
+ function validateDate(identity, value) {
442
+ if (!isRepresentable(value)) throw invalidDate(identity);
372
443
  return value;
373
444
  }
374
- function decodeDate(wire) {
375
- const instant = typeof wire === "string" ? storedInstant(wire) : void 0;
376
- const date = instant === void 0 ? void 0 : new Date(instant);
377
- if (date === void 0 || !isRepresentable(date)) throw invalidDate();
378
- return date;
379
- }
380
- /** The instant, in its stored spelling, a stored timestamp with time zone names, or `undefined` for `infinity` and an instant outside the range a `Date` holds. */
381
- function storedInstant(text) {
445
+ /** The instant a stored or printed value names, or `undefined` for `infinity` and a value outside the range a `Date` holds. */
446
+ function storedInstant(identity, text) {
382
447
  if (text === "infinity" || text === "-infinity") return void 0;
383
448
  try {
384
- return pgTimestamptzStoredText(text);
449
+ return identity.instantText(text);
385
450
  } catch (error) {
386
451
  if (isStructuredError(error) && error.code === "CONTRACT.CAST_REFUSED") return void 0;
387
452
  throw error;
388
453
  }
389
454
  }
390
- /** The `Date` a stored timestamp with time zone names. A `Date` holds neither `infinity` nor an instant before 4714-11-24 BC or after +275760-09-13, so those are refused. */
391
- function dateOfStoredText(codecId, text) {
392
- const instant = storedInstant(text);
455
+ function decodeDate(identity, wire) {
456
+ const instant = typeof wire === "string" ? storedInstant(identity, requireIsoDateStyle(identity.codecId, wire)) : void 0;
393
457
  const date = instant === void 0 ? void 0 : new Date(instant);
394
- if (date === void 0 || !isRepresentable(date)) return refuseJsonValue(codecId, `an instant a Date holds, from 4714-11-24 BC to +275760-09-13 and not infinity or -infinity, which ${PG_TIMESTAMPTZ_STRING_CODEC_ID} holds`, text);
458
+ if (date === void 0 || !isRepresentable(date)) throw invalidDate(identity);
395
459
  return date;
396
460
  }
397
- function encodeDate(value) {
398
- return utcTimestamptzText(validateDate(value), PG_TIMESTAMPTZ_DATE_CODEC_ID);
461
+ /** The `Date` a stored value names. A `Date` holds neither `infinity` nor an instant before 4714-11-24 BC or after +275760-09-13, so those are refused. */
462
+ function dateOfStoredText(identity, text) {
463
+ const instant = storedInstant(identity, text);
464
+ const date = instant === void 0 ? void 0 : new Date(instant);
465
+ if (date === void 0 || !isRepresentable(date)) return refuseJsonValue(identity.codecId, `an instant a Date holds, from 4714-11-24 BC to +275760-09-13 and not infinity or -infinity, which ${identity.textCodecId} holds`, text);
466
+ return date;
399
467
  }
400
468
  var PgTimestamptzDateCodec = class extends CodecImpl {
401
469
  async toWire(value, _ctx) {
402
- return encodeDate(value);
470
+ return utcTimestamptzText(validateDate(TIMESTAMPTZ_DATE, value), this.id);
403
471
  }
404
472
  async fromWire(wire, _ctx) {
405
- return decodeDate(wire);
473
+ return decodeDate(TIMESTAMPTZ_DATE, wire);
406
474
  }
407
475
  fromDataTypeValue(value) {
408
- return dateOfStoredText(this.id, value.value);
476
+ return dateOfStoredText(TIMESTAMPTZ_DATE, value.value);
409
477
  }
410
478
  toDataTypeValue(input) {
411
- return this.dataTypeValueOf(validateDate(input).toISOString());
479
+ return this.dataTypeValueOf(validateDate(TIMESTAMPTZ_DATE, input).toISOString());
412
480
  }
413
481
  };
414
482
  var PgTimestamptzDateDescriptor = class extends PostgresCodecDescriptor {
@@ -425,6 +493,86 @@ var PgTimestamptzDateDescriptor = class extends PostgresCodecDescriptor {
425
493
  };
426
494
  const pgTimestamptzDateDescriptor = new PgTimestamptzDateDescriptor();
427
495
  const pgTimestamptzDateColumn = (params = {}) => column(pgTimestamptzDateDescriptor.factory(params), pgTimestamptzDateDescriptor.codecId, params);
496
+ /**
497
+ * A `timestamp` column read and written as a JavaScript `Date`, treating the stored date and time as UTC. A read appends `Z` to the stored value; a write sends the `Date`'s UTC date and time with no offset, so a written value reads back unchanged whatever the server's, the session's or the process's time zone. PostgreSQL fills a database default `now()` in the session's time zone, so under a `TimeZone` other than UTC that value reads back shifted; `@onCreate(now())` writes UTC from the client.
498
+ */
499
+ var PgTimestampDateCodec = class extends CodecImpl {
500
+ async toWire(value, _ctx) {
501
+ return utcTimestampText(validateDate(TIMESTAMP_DATE, value), this.id);
502
+ }
503
+ async fromWire(wire, _ctx) {
504
+ return decodeDate(TIMESTAMP_DATE, wire);
505
+ }
506
+ fromDataTypeValue(value) {
507
+ return dateOfStoredText(TIMESTAMP_DATE, value.value);
508
+ }
509
+ toDataTypeValue(input) {
510
+ return this.dataTypeValueOf(utcTimestampText(validateDate(TIMESTAMP_DATE, input), this.id));
511
+ }
512
+ };
513
+ var PgTimestampDateDescriptor = class extends PostgresCodecDescriptor {
514
+ jsonProjection(expression) {
515
+ return CastExpr.as(expression, "text");
516
+ }
517
+ dataType = pgTimestamp.id;
518
+ codecId = PG_TIMESTAMP_DATE_CODEC_ID;
519
+ traits = ["equality", "order"];
520
+ paramsSchema = pgPrecisionParams;
521
+ factory(params) {
522
+ return () => new PgTimestampDateCodec(this, pgTimestamp, params ?? {});
523
+ }
524
+ };
525
+ const pgTimestampDateDescriptor = new PgTimestampDateDescriptor();
526
+ const pgTimestampDateColumn = (params = {}) => column(pgTimestampDateDescriptor.factory(params), pgTimestampDateDescriptor.codecId, params);
527
+ const MAX_FRACTION_DIGITS = 6;
528
+ function describeReceived(value) {
529
+ if (typeof value === "string") return JSON.stringify(value);
530
+ return value === null ? "null" : `a ${typeof value}`;
531
+ }
532
+ function refusedDuration(value, reason) {
533
+ throw postgresError("RUNTIME.ENCODE_FAILED", `${PG_INTERVAL_STRING_CODEC_ID} writes ${reason}, got ${describeReceived(value)}`, { meta: {
534
+ codecId: PG_INTERVAL_STRING_CODEC_ID,
535
+ received: typeof value
536
+ } });
537
+ }
538
+ /** The duration `pg/interval` stores for an ISO 8601 duration the application wrote. */
539
+ function storedDuration(value) {
540
+ if (typeof value !== "string" || !ISO_DURATION.test(value)) return refusedDuration(value, "an ISO 8601 duration, as in \"P1Y2M3DT4H5M6.5S\"");
541
+ if ((/\.(\d+)S$/.exec(value)?.[1]?.length ?? 0) > MAX_FRACTION_DIGITS) return refusedDuration(value, `a duration with at most ${MAX_FRACTION_DIGITS} digits after the decimal point, because pg/interval holds microseconds`);
542
+ return pgIntervalStoredText(value);
543
+ }
544
+ /**
545
+ * An interval read and written as the ISO 8601 duration `pg/interval` stores, such as `P1Y2M3DT4H5M6.5S`. A read gives that form whatever `IntervalStyle` the server prints in. Equal intervals can have different forms, `P1D` and `PT24H`, so the codec keeps the form a value was written in.
546
+ */
547
+ var PgIntervalStringCodec = class extends CodecImpl {
548
+ async toWire(value, _ctx) {
549
+ return storedDuration(value);
550
+ }
551
+ async fromWire(wire, _ctx) {
552
+ return formatIsoDuration(pgIntervalDecode(wire));
553
+ }
554
+ fromDataTypeValue(value) {
555
+ return value.value;
556
+ }
557
+ toDataTypeValue(input) {
558
+ return this.dataTypeValueOf(storedDuration(input));
559
+ }
560
+ };
561
+ var PgIntervalStringDescriptor = class extends PostgresCodecDescriptor {
562
+ jsonProjection(expression) {
563
+ return CastExpr.as(expression, "text");
564
+ }
565
+ dataType = pgInterval.id;
566
+ codecId = PG_INTERVAL_STRING_CODEC_ID;
567
+ traits = ["equality", "order"];
568
+ keepsWrittenForm = true;
569
+ paramsSchema = pgPrecisionParams;
570
+ factory(params) {
571
+ return () => new PgIntervalStringCodec(this, pgInterval, params ?? {});
572
+ }
573
+ };
574
+ const pgIntervalStringDescriptor = new PgIntervalStringDescriptor();
575
+ const pgIntervalStringColumn = (params = {}) => column(pgIntervalStringDescriptor.factory(params), pgIntervalStringDescriptor.codecId, params);
428
576
  function parsePostgresListText(wireValue) {
429
577
  if (typeof wireValue !== "string") throw new TypeError(`expected raw text for a Postgres array, got ${typeof wireValue}`);
430
578
  return blindCast(parse(wireValue));
@@ -496,6 +644,37 @@ var PgTimestampTemporalDescriptor = class extends PostgresCodecDescriptor {
496
644
  }
497
645
  };
498
646
  const pgTimestampTemporalDescriptor = new PgTimestampTemporalDescriptor();
647
+ /**
648
+ * A `timestamp` column read and written as a `Temporal.Instant`, treating the stored date and time as UTC. A write sends the instant's UTC date and time with no offset. PostgreSQL fills a database default `now()` in the session's time zone, so under a `TimeZone` other than UTC that value reads back shifted; `@onCreate(now())` writes UTC from the client.
649
+ */
650
+ var PgTimestampInstantCodec = class extends CodecImpl {
651
+ async toWire(value, _ctx) {
652
+ return pgTimestampInstantEncode(value);
653
+ }
654
+ async fromWire(wire, _ctx) {
655
+ return pgTimestampInstantDecode(wire);
656
+ }
657
+ fromDataTypeValue(value) {
658
+ refuseInfinity(this.id, "an instant a Temporal.Instant holds", PG_TIMESTAMP_STRING_CODEC_ID, value.value);
659
+ return pgTimestampInstantDecode(value.value);
660
+ }
661
+ toDataTypeValue(input) {
662
+ return this.dataTypeValueOf(pgTimestampInstantEncode(input));
663
+ }
664
+ };
665
+ var PgTimestampInstantDescriptor = class extends PostgresCodecDescriptor {
666
+ jsonProjection(expression) {
667
+ return CastExpr.as(expression, "text");
668
+ }
669
+ dataType = pgTimestamp.id;
670
+ codecId = PG_TIMESTAMP_INSTANT_CODEC_ID;
671
+ traits = ["equality", "order"];
672
+ paramsSchema = pgPrecisionParams;
673
+ factory(params) {
674
+ return () => new PgTimestampInstantCodec(this, pgTimestamp, params ?? {});
675
+ }
676
+ };
677
+ const pgTimestampInstantDescriptor = new PgTimestampInstantDescriptor();
499
678
  var PgTimestamptzTemporalCodec = class extends CodecImpl {
500
679
  async toWire(value, _ctx) {
501
680
  return pgTimestamptzTemporalEncode(value);
@@ -551,18 +730,34 @@ var PgTimeTemporalDescriptor = class extends PostgresCodecDescriptor {
551
730
  }
552
731
  };
553
732
  const pgTimeTemporalDescriptor = new PgTimeTemporalDescriptor();
733
+ const DATE_READING = {
734
+ shape: "date",
735
+ holdsInfinity: true
736
+ };
737
+ const TIMESTAMP_READING = {
738
+ shape: "dateTime",
739
+ holdsInfinity: true
740
+ };
741
+ const TIMESTAMPTZ_READING = {
742
+ shape: "instant",
743
+ holdsInfinity: true
744
+ };
745
+ const TIME_READING = {
746
+ shape: "time",
747
+ holdsInfinity: false
748
+ };
554
749
  var PgDateStringCodec = class extends CodecImpl {
555
750
  async toWire(value, _ctx) {
556
751
  return postgresYearText(value);
557
752
  }
558
753
  async fromWire(wire, _ctx) {
559
- return wire;
754
+ return storedTextFromWire(this.id, DATE_READING, wire);
560
755
  }
561
756
  fromDataTypeValue(value) {
562
757
  return value.value;
563
758
  }
564
759
  toDataTypeValue(input) {
565
- return this.dataTypeValueOf(input);
760
+ return this.storedDataTypeValueOf(input);
566
761
  }
567
762
  };
568
763
  var PgDateStringDescriptor = class extends PostgresCodecDescriptor {
@@ -595,17 +790,15 @@ var PgTimestampStringCodec = class extends CodecImpl {
595
790
  return postgresYearText(requireText(this.id, value));
596
791
  }
597
792
  async fromWire(wire, _ctx) {
598
- return wire;
793
+ return storedTextFromWire(this.id, TIMESTAMP_READING, wire);
599
794
  }
600
795
  fromDataTypeValue(value) {
601
796
  return value.value;
602
797
  }
603
798
  toDataTypeValue(input) {
604
- return this.dataTypeValueOf(input);
799
+ return this.storedDataTypeValueOf(input);
605
800
  }
606
801
  };
607
- /** Why an enum cannot use a string timestamp codec, given how PostgreSQL prints a value and how the contract stores it. */
608
- const stringTimestampEnumRefusal = (printed, stored, printing, instead) => `A query reads each value as the text PostgreSQL prints${printing}, such as "${printed}", while the contract stores it in ISO 8601, such as "${stored}", so no value read back equals a member. Use ${instead}, whose members are Temporal values.`;
609
802
  var PgTimestampStringDescriptor = class extends PostgresCodecDescriptor {
610
803
  jsonProjection(expression) {
611
804
  return CastExpr.as(expression, "text");
@@ -613,7 +806,9 @@ var PgTimestampStringDescriptor = class extends PostgresCodecDescriptor {
613
806
  dataType = pgTimestamp.id;
614
807
  codecId = PG_TIMESTAMP_STRING_CODEC_ID;
615
808
  traits = ["equality", "order"];
616
- enumRefusal = stringTimestampEnumRefusal("2024-01-02 03:04:05", "2024-01-02T03:04:05", "", "pg/timestamp-temporal@1");
809
+ renderValueLiteral(value) {
810
+ return renderTsLiteral(value);
811
+ }
617
812
  paramsSchema = pgPrecisionParams;
618
813
  factory(params) {
619
814
  return () => new PgTimestampStringCodec(this, pgTimestamp, params ?? {});
@@ -625,13 +820,13 @@ var PgTimestamptzStringCodec = class extends CodecImpl {
625
820
  return postgresYearText(requireText(this.id, value));
626
821
  }
627
822
  async fromWire(wire, _ctx) {
628
- return wire;
823
+ return storedTextFromWire(this.id, TIMESTAMPTZ_READING, wire);
629
824
  }
630
825
  fromDataTypeValue(value) {
631
826
  return value.value;
632
827
  }
633
828
  toDataTypeValue(input) {
634
- return this.dataTypeValueOf(input);
829
+ return this.storedDataTypeValueOf(input);
635
830
  }
636
831
  };
637
832
  var PgTimestamptzStringDescriptor = class extends PostgresCodecDescriptor {
@@ -641,7 +836,9 @@ var PgTimestamptzStringDescriptor = class extends PostgresCodecDescriptor {
641
836
  dataType = pgTimestamptz.id;
642
837
  codecId = PG_TIMESTAMPTZ_STRING_CODEC_ID;
643
838
  traits = ["equality", "order"];
644
- enumRefusal = stringTimestampEnumRefusal("2024-01-02 03:04:05+00", "2024-01-02T03:04:05Z", " in the session's time zone", "pg/timestamptz-temporal@1");
839
+ renderValueLiteral(value) {
840
+ return renderTsLiteral(value);
841
+ }
645
842
  paramsSchema = pgPrecisionParams;
646
843
  factory(params) {
647
844
  return () => new PgTimestamptzStringCodec(this, pgTimestamptz, params ?? {});
@@ -653,13 +850,13 @@ var PgTimeStringCodec = class extends CodecImpl {
653
850
  return value;
654
851
  }
655
852
  async fromWire(wire, _ctx) {
656
- return wire;
853
+ return storedTextFromWire(this.id, TIME_READING, wire);
657
854
  }
658
855
  fromDataTypeValue(value) {
659
856
  return value.value;
660
857
  }
661
858
  toDataTypeValue(input) {
662
- return this.dataTypeValueOf(input);
859
+ return this.storedDataTypeValueOf(input);
663
860
  }
664
861
  };
665
862
  var PgTimeStringDescriptor = class extends PostgresCodecDescriptor {
@@ -1297,18 +1494,23 @@ var PgUnboundedIntDescriptor = class extends PostgresCodecDescriptor {
1297
1494
  };
1298
1495
  const pgUnboundedIntDescriptor = new PgUnboundedIntDescriptor();
1299
1496
  const pgUnboundedIntColumn = () => column(pgUnboundedIntDescriptor.factory(), pgUnboundedIntDescriptor.codecId, void 0);
1497
+ const TIMETZ_READING = {
1498
+ shape: "timeWithOffset",
1499
+ holdsInfinity: false,
1500
+ maxOffsetHours: 15
1501
+ };
1300
1502
  var PgTimetzCodec = class extends CodecImpl {
1301
1503
  async toWire(value, _ctx) {
1302
1504
  return value;
1303
1505
  }
1304
1506
  async fromWire(wire, _ctx) {
1305
- return wire;
1507
+ return storedTextFromWire(this.id, TIMETZ_READING, wire);
1306
1508
  }
1307
1509
  fromDataTypeValue(value) {
1308
1510
  return value.value;
1309
1511
  }
1310
1512
  toDataTypeValue(input) {
1311
- return this.dataTypeValueOf(input);
1513
+ return this.storedDataTypeValueOf(input);
1312
1514
  }
1313
1515
  };
1314
1516
  var PgTimetzDescriptor = class extends PostgresCodecDescriptor {
@@ -1318,7 +1520,9 @@ var PgTimetzDescriptor = class extends PostgresCodecDescriptor {
1318
1520
  dataType = pgTimetz.id;
1319
1521
  codecId = PG_TIMETZ_CODEC_ID;
1320
1522
  traits = ["equality", "order"];
1321
- enumRefusal = "A query reads each value as the text PostgreSQL prints, such as \"12:34:56+02\", while the contract stores it in ISO 8601, such as \"12:34:56+02:00\", so a value read back need not equal the member written. No enum can use a timetz codec; use a text enum instead.";
1523
+ renderValueLiteral(value) {
1524
+ return renderTsLiteral(value);
1525
+ }
1322
1526
  paramsSchema = pgPrecisionParams;
1323
1527
  factory(params) {
1324
1528
  return () => new PgTimetzCodec(this, pgTimetz, params ?? {});
@@ -1723,6 +1927,8 @@ const codecDescriptors = definePostgresCodecs([
1723
1927
  pgTimestampStringDescriptor,
1724
1928
  pgTimestamptzStringDescriptor,
1725
1929
  pgTimestamptzDateDescriptor,
1930
+ pgTimestampDateDescriptor,
1931
+ pgTimestampInstantDescriptor,
1726
1932
  pgTimeStringDescriptor,
1727
1933
  pgTimetzDescriptor,
1728
1934
  pgBoolDescriptor,
@@ -1732,12 +1938,13 @@ const codecDescriptors = definePostgresCodecs([
1732
1938
  pgUuidDescriptor,
1733
1939
  pgInetDescriptor,
1734
1940
  pgIntervalDescriptor,
1941
+ pgIntervalStringDescriptor,
1735
1942
  pgJsonDescriptor,
1736
1943
  pgJsonbDescriptor,
1737
1944
  pgTextArrayDescriptor,
1738
1945
  pgTsqueryDescriptor
1739
1946
  ]);
1740
1947
  //#endregion
1741
- export { pgVarbitColumn as A, pgNumericColumn as C, pgTimetzColumn as D, pgTimestamptzDateDescriptor as E, postgresQualifyColumnType as M, requireTemporal as N, pgUnboundedIntColumn as O, setFallbackTemporal as P, pgJsonbColumn as S, pgTimestamptzDateColumn as T, pgInt8Column as _, isPgEnumParams as a, pgIntervalColumn as b, pgBoolColumn as c, pgFloat4Column as d, pgFloat8Column as f, pgInt4Column as g, pgInt2Column as h, decodePostgresListText as i, pgVarcharColumn as j, pgUuidColumn as k, pgCharColumn as l, pgInetColumn as m, PgTimestamptzDateDescriptor as n, parsePostgresListText as o, pgFloatColumn as p, codecDescriptors as r, pgBitColumn as s, PgTimestamptzDateCodec as t, pgEnumDescriptor as u, pgInt8NumberColumn as v, pgTextColumn as w, pgJsonColumn as x, pgIntColumn as y };
1948
+ export { pgTextColumn as A, postgresQualifyColumnType as B, pgIntColumn as C, pgJsonColumn as D, pgIntervalStringDescriptor as E, pgTimetzColumn as F, setFallbackTemporal as H, pgUnboundedIntColumn as I, pgUuidColumn as L, pgTimestampDateDescriptor as M, pgTimestamptzDateColumn as N, pgJsonbColumn as O, pgTimestamptzDateDescriptor as P, pgVarbitColumn as R, pgInt8NumberColumn as S, pgIntervalStringColumn as T, requireTemporal as V, pgFloatColumn as _, PgTimestamptzDateCodec as a, pgInt4Column as b, decodePostgresListText as c, pgBitColumn as d, pgBoolColumn as f, pgFloat8Column as g, pgFloat4Column as h, PgTimestampDateDescriptor as i, pgTimestampDateColumn as j, pgNumericColumn as k, isPgEnumParams as l, pgEnumDescriptor as m, PgIntervalStringDescriptor as n, PgTimestamptzDateDescriptor as o, pgCharColumn as p, PgTimestampDateCodec as r, codecDescriptors as s, PgIntervalStringCodec as t, parsePostgresListText as u, pgInetColumn as v, pgIntervalColumn as w, pgInt8Column as x, pgInt2Column as y, pgVarcharColumn as z };
1742
1949
 
1743
- //# sourceMappingURL=codecs-CRl9-i_r-Co-bgYl3.mjs.map
1950
+ //# sourceMappingURL=codecs-BNpSaccO-CLaErrDe.mjs.map