@prisma/orm-target-postgres 8.0.0-rc.18-dev.7 → 8.0.0-rc.18-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 (171) hide show
  1. package/dist/adapter-CqqF1-aT.d.mts +403 -0
  2. package/dist/adapter-CqqF1-aT.d.mts.map +1 -0
  3. package/dist/{adapter-DXUJlrmB-7Lk8j0kE.mjs → adapter-ofQbK8p5-DdhE9Pbv.mjs} +6 -6
  4. package/dist/adapter-ofQbK8p5-DdhE9Pbv.mjs.map +1 -0
  5. package/dist/adapter.d.mts +7 -7
  6. package/dist/adapter.mjs +6 -6
  7. package/dist/adapter__adapter.d.mts +2 -2
  8. package/dist/adapter__adapter.mjs +3 -3
  9. package/dist/adapter__column-types.d.mts +1 -1
  10. package/dist/adapter__control.d.mts +3 -3
  11. package/dist/adapter__control.mjs +6 -6
  12. package/dist/adapter__control.mjs.map +1 -1
  13. package/dist/adapter__runtime.mjs +4 -4
  14. package/dist/adapter__runtime.mjs.map +1 -1
  15. package/dist/adapter__sql-renderer.mjs +1 -1
  16. package/dist/adapter__types.d.mts +2 -2
  17. package/dist/aggregates-B-jwhT8T.d.mts +318 -0
  18. package/dist/aggregates-B-jwhT8T.d.mts.map +1 -0
  19. package/dist/{aggregates-B6ZQFHFE.mjs → aggregates-Brwk0sYS.mjs} +89 -31
  20. package/dist/aggregates-Brwk0sYS.mjs.map +1 -0
  21. package/dist/{authoring-CTn87jlt-VHX7hiNU.mjs → authoring-DOWd8Fpc-BE703X_J.mjs} +4 -4
  22. package/dist/{authoring-CTn87jlt-VHX7hiNU.mjs.map → authoring-DOWd8Fpc-BE703X_J.mjs.map} +1 -1
  23. package/dist/{autoincrement-widths-DbyXRo5B-BUVCYb_V.mjs → autoincrement-widths-DuylBJSq-T8e6pnMZ.mjs} +3 -3
  24. package/dist/{autoincrement-widths-DbyXRo5B-BUVCYb_V.mjs.map → autoincrement-widths-DuylBJSq-T8e6pnMZ.mjs.map} +1 -1
  25. package/dist/{codec-helpers-D0ah5Wb8-wdJJZ_8s.mjs → codec-helpers-IfGdyCFt-ihgFCc7D.mjs} +3 -40
  26. package/dist/codec-helpers-IfGdyCFt-ihgFCc7D.mjs.map +1 -0
  27. package/dist/{codec-registry-BWUY_QLt-CzrMkP9N.mjs → codec-registry-DSRFjaLX-Dwg0yBK7.mjs} +4 -4
  28. package/dist/{codec-registry-BWUY_QLt-CzrMkP9N.mjs.map → codec-registry-DSRFjaLX-Dwg0yBK7.mjs.map} +1 -1
  29. package/dist/{codec-type-map-DueQFJ3a-DKLtMn3R.d.mts → codec-type-map-BznmYkRz-QD11Yx27.d.mts} +3 -3
  30. package/dist/{codec-type-map-DueQFJ3a-DKLtMn3R.d.mts.map → codec-type-map-BznmYkRz-QD11Yx27.d.mts.map} +1 -1
  31. package/dist/codec-types-BZXuhZ1c-B9YQf_UN.d.mts +84 -0
  32. package/dist/codec-types-BZXuhZ1c-B9YQf_UN.d.mts.map +1 -0
  33. package/dist/codec-types-ZfL8TSVm.d.mts +2 -0
  34. package/dist/{codecs-ChjCJY5k.d.mts → codecs-BChKdFcD.d.mts} +2 -2
  35. package/dist/{codecs-ChjCJY5k.d.mts.map → codecs-BChKdFcD.d.mts.map} +1 -1
  36. package/dist/{codecs-y1gOMMt--DKWhYGN5.d.mts → codecs-CCzJelD2-bt89qO8s.d.mts} +2 -13
  37. package/dist/codecs-CCzJelD2-bt89qO8s.d.mts.map +1 -0
  38. package/dist/{codecs-Cb5S70Lx-WRSQkpza.mjs → codecs-CQaKsvhH-X9bscCr9.mjs} +4 -37
  39. package/dist/codecs-CQaKsvhH-X9bscCr9.mjs.map +1 -0
  40. package/dist/{column-types-Dq7mC_dL.d.mts → column-types-COdejX_b.d.mts} +44 -9
  41. package/dist/column-types-COdejX_b.d.mts.map +1 -0
  42. package/dist/{control-adapter-EatqP8Vh-CYWBxnLn.mjs → contract-contributions-RR2DymD_-B0xeL8RT.mjs} +61 -9
  43. package/dist/contract-contributions-RR2DymD_-B0xeL8RT.mjs.map +1 -0
  44. package/dist/{control-0nEwuD8F.d.mts → control-B0dyj3WB.d.mts} +121 -1
  45. package/dist/control-B0dyj3WB.d.mts.map +1 -0
  46. package/dist/{control-CBG2OxfU.d.mts → control-B2jgQGkQ.d.mts} +2 -2
  47. package/dist/{control-CBG2OxfU.d.mts.map → control-B2jgQGkQ.d.mts.map} +1 -1
  48. package/dist/{control-DxX_0Qw4.mjs → control-BeGPfK6d.mjs} +93 -55
  49. package/dist/control-BeGPfK6d.mjs.map +1 -0
  50. package/dist/{control-policy-BlVJAbUZ-BjQYqA_a.mjs → control-policy-DVEQWEOE-dVbGW9Xq.mjs} +6 -6
  51. package/dist/{control-policy-BlVJAbUZ-BjQYqA_a.mjs.map → control-policy-DVEQWEOE-dVbGW9Xq.mjs.map} +1 -1
  52. package/dist/{data-type-entries-15a-vBdm-vIj5l1u5.mjs → data-type-entries-MxmSzT8p-D8CgbLxS.mjs} +3 -3
  53. package/dist/{data-type-entries-15a-vBdm-vIj5l1u5.mjs.map → data-type-entries-MxmSzT8p-D8CgbLxS.mjs.map} +1 -1
  54. package/dist/{data-types-K6tDhu1D-BN--9o1o.mjs → data-types-DnIWGq_1-DTMjYG8M.mjs} +3 -3
  55. package/dist/{data-types-K6tDhu1D-BN--9o1o.mjs.map → data-types-DnIWGq_1-DTMjYG8M.mjs.map} +1 -1
  56. package/dist/{default-normalizer-Bf_Fhv4v-CugGfLAe.mjs → default-normalizer-BnxtqsRm-CDjZe4vK.mjs} +3 -3
  57. package/dist/{default-normalizer-Bf_Fhv4v-CugGfLAe.mjs.map → default-normalizer-BnxtqsRm-CDjZe4vK.mjs.map} +1 -1
  58. package/dist/{descriptor-meta-D5OipARb-6znWwvjE.mjs → descriptor-meta-642teZF4-CAMY6SnM.mjs} +6 -6
  59. package/dist/{descriptor-meta-D5OipARb-6znWwvjE.mjs.map → descriptor-meta-642teZF4-CAMY6SnM.mjs.map} +1 -1
  60. package/dist/{descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs → descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs} +3 -3
  61. package/dist/{descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs.map → descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs.map} +1 -1
  62. package/dist/descriptor-meta-uNeqfA6R-Rrzkj6Ci.mjs +36 -0
  63. package/dist/descriptor-meta-uNeqfA6R-Rrzkj6Ci.mjs.map +1 -0
  64. package/dist/{diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs → diff-database-schema-K7Wr3Cso-BkIytT4i.mjs} +4 -4
  65. package/dist/{diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs.map → diff-database-schema-K7Wr3Cso-BkIytT4i.mjs.map} +1 -1
  66. package/dist/{full-text-Li_RyodV.d.mts → full-text-DzMPXaCj.d.mts} +3 -3
  67. package/dist/{full-text-Li_RyodV.d.mts.map → full-text-DzMPXaCj.d.mts.map} +1 -1
  68. package/dist/{full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts → full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts} +5 -5
  69. package/dist/full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts.map +1 -0
  70. package/dist/full-text-index-authoring-Ca6bWXyG.d.mts.map +1 -1
  71. package/dist/{full-text-index-definition-CwWV12H4-DNafWNux.d.mts → full-text-index-definition-D5iBWLss-FifKlctQ.d.mts} +22 -4
  72. package/dist/full-text-index-definition-D5iBWLss-FifKlctQ.d.mts.map +1 -0
  73. package/dist/{infer-psl-contract-B_Bl_RJC-BfJbvDUs.mjs → infer-psl-contract-l55XjKWM-O6kcTBJE.mjs} +91 -194
  74. package/dist/infer-psl-contract-l55XjKWM-O6kcTBJE.mjs.map +1 -0
  75. package/dist/migration-CbOh59ZJ.mjs.map +1 -1
  76. package/dist/{op-factory-call-Bf00O3tt-aQ8OJ00n.mjs → op-factory-call-TVvGnrxe-BYM7yGIk.mjs} +3 -3
  77. package/dist/{op-factory-call-Bf00O3tt-aQ8OJ00n.mjs.map → op-factory-call-TVvGnrxe-BYM7yGIk.mjs.map} +1 -1
  78. package/dist/{operation-types-C4VAniFe-D2eX0-ZZ.d.mts → operation-types-BAiYtHkM-BN_YTibJ.d.mts} +22 -17
  79. package/dist/operation-types-BAiYtHkM-BN_YTibJ.d.mts.map +1 -0
  80. package/dist/operation-types-CScw-diG.d.mts +1 -0
  81. package/dist/{pack-BOVET-UW.d.mts → pack-4sJCj0w-.d.mts} +7 -4
  82. package/dist/pack-4sJCj0w-.d.mts.map +1 -0
  83. package/dist/{planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs → planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs} +4 -4
  84. package/dist/{planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs.map → planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs.map} +1 -1
  85. package/dist/{planner-identity-values-BZdomjRU-G521DabU.mjs → planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs} +3 -3
  86. package/dist/{planner-identity-values-BZdomjRU-G521DabU.mjs.map → planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs.map} +1 -1
  87. package/dist/{planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs → planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs} +4 -4
  88. package/dist/{planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs.map → planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs.map} +1 -1
  89. package/dist/{planner-BnZ7Ma0m-CuFTpofj.mjs → planner-q9c5nQlC-BvjDJEmC.mjs} +7 -7
  90. package/dist/{planner-BnZ7Ma0m-CuFTpofj.mjs.map → planner-q9c5nQlC-BvjDJEmC.mjs.map} +1 -1
  91. package/dist/{postgres-codec-traits-BV62PF0L-NuMNArAx.mjs → postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs} +3 -3
  92. package/dist/{postgres-codec-traits-BV62PF0L-NuMNArAx.mjs.map → postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs.map} +1 -1
  93. package/dist/{postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs → postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs} +6 -6
  94. package/dist/{postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs.map → postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs.map} +1 -1
  95. package/dist/{postgres-migration-DxPGyge8-ChvbfTP4.mjs → postgres-migration-DplG05vQ-Cyy1zJjv.mjs} +8 -8
  96. package/dist/{postgres-migration-DxPGyge8-ChvbfTP4.mjs.map → postgres-migration-DplG05vQ-Cyy1zJjv.mjs.map} +1 -1
  97. package/dist/{prisma7-binding-nxvUgQTH.mjs → prisma7-binding-BvuMHLdX.mjs} +18 -7
  98. package/dist/prisma7-binding-BvuMHLdX.mjs.map +1 -0
  99. package/dist/{prisma7-binding-BQ5VOUjh.d.mts → prisma7-binding-LcYpTBjP.d.mts} +7 -4
  100. package/dist/prisma7-binding-LcYpTBjP.d.mts.map +1 -0
  101. package/dist/{render-ops-Cj_4STo9-hZVcK77c.mjs → render-ops-D7WBk4VN-Ba7n9A9L.mjs} +3 -3
  102. package/dist/{render-ops-Cj_4STo9-hZVcK77c.mjs.map → render-ops-D7WBk4VN-Ba7n9A9L.mjs.map} +1 -1
  103. package/dist/{runtime-qn4hL1wO.d.mts → runtime-C1HMiDVY.d.mts} +2 -2
  104. package/dist/{runtime-qn4hL1wO.d.mts.map → runtime-C1HMiDVY.d.mts.map} +1 -1
  105. package/dist/{sql-renderer-Q8LMpTcq-twOHNp2T.mjs → sql-renderer-Q8LMpTcq-CliGmy0r.mjs} +2 -2
  106. package/dist/{sql-renderer-Q8LMpTcq-twOHNp2T.mjs.map → sql-renderer-Q8LMpTcq-CliGmy0r.mjs.map} +1 -1
  107. package/dist/{sql-utils-CGSJ8fH0.d.mts → sql-utils-B7LfCQCB.d.mts} +2 -2
  108. package/dist/sql-utils-B7LfCQCB.d.mts.map +1 -0
  109. package/dist/target.d.mts +16 -17
  110. package/dist/target.mjs +20 -20
  111. package/dist/target__aggregates.d.mts +1 -1
  112. package/dist/target__aggregates.mjs +1 -1
  113. package/dist/target__codec-types.d.mts +4 -4
  114. package/dist/target__codecs.d.mts +2 -2
  115. package/dist/target__codecs.mjs +2 -2
  116. package/dist/target__control.d.mts +1 -1
  117. package/dist/target__control.mjs +3 -3
  118. package/dist/target__data-types.mjs +2 -2
  119. package/dist/target__default-normalizer.mjs +1 -1
  120. package/dist/target__diff-database-schema.mjs +1 -1
  121. package/dist/target__full-text-index-authoring.d.mts +1 -2
  122. package/dist/target__full-text-index-authoring.mjs +1 -1
  123. package/dist/target__full-text.d.mts +4 -4
  124. package/dist/target__issue-planner.mjs +1 -1
  125. package/dist/target__migration.mjs +2 -2
  126. package/dist/target__op-factory-call.mjs +1 -1
  127. package/dist/target__operation-types.d.mts +4 -4
  128. package/dist/target__pack.d.mts +3 -2
  129. package/dist/target__pack.mjs +1 -1
  130. package/dist/target__planner-ddl-builders.mjs +1 -1
  131. package/dist/target__planner-identity-values.mjs +1 -1
  132. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  133. package/dist/target__planner.mjs +2 -2
  134. package/dist/target__prisma7-binding.d.mts +1 -1
  135. package/dist/target__prisma7-binding.mjs +1 -1
  136. package/dist/target__render-ops.mjs +1 -1
  137. package/dist/target__runtime.d.mts +2 -2
  138. package/dist/target__runtime.mjs +3 -3
  139. package/dist/target__runtime.mjs.map +1 -1
  140. package/dist/target__sql-utils.d.mts +2 -2
  141. package/dist/{types-Dnrjripb.d.mts → types-DIUPMK41.d.mts} +1 -1
  142. package/package.json +9 -9
  143. package/dist/adapter-DXUJlrmB-7Lk8j0kE.mjs.map +0 -1
  144. package/dist/adapter-giV1nqJs.d.mts +0 -58
  145. package/dist/adapter-giV1nqJs.d.mts.map +0 -1
  146. package/dist/aggregates-B6ZQFHFE.mjs.map +0 -1
  147. package/dist/aggregates-CgqNfj2O.d.mts +0 -10
  148. package/dist/aggregates-CgqNfj2O.d.mts.map +0 -1
  149. package/dist/codec-helpers-D0ah5Wb8-wdJJZ_8s.mjs.map +0 -1
  150. package/dist/codec-types-CY3pawL3.d.mts +0 -2
  151. package/dist/codec-types-CYsrudBM-DcYPKpS1.d.mts +0 -51
  152. package/dist/codec-types-CYsrudBM-DcYPKpS1.d.mts.map +0 -1
  153. package/dist/codecs-Cb5S70Lx-WRSQkpza.mjs.map +0 -1
  154. package/dist/codecs-y1gOMMt--DKWhYGN5.d.mts.map +0 -1
  155. package/dist/column-types-Dq7mC_dL.d.mts.map +0 -1
  156. package/dist/control-0nEwuD8F.d.mts.map +0 -1
  157. package/dist/control-DxX_0Qw4.mjs.map +0 -1
  158. package/dist/control-adapter-EatqP8Vh-CYWBxnLn.mjs.map +0 -1
  159. package/dist/descriptor-meta-DThyh4X8-rA2bozYa.mjs +0 -53
  160. package/dist/descriptor-meta-DThyh4X8-rA2bozYa.mjs.map +0 -1
  161. package/dist/full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts.map +0 -1
  162. package/dist/full-text-index-definition-CwWV12H4-DNafWNux.d.mts.map +0 -1
  163. package/dist/infer-psl-contract-B_Bl_RJC-BfJbvDUs.mjs.map +0 -1
  164. package/dist/operation-types-C4VAniFe-D2eX0-ZZ.d.mts.map +0 -1
  165. package/dist/operation-types-ChXH8kV_.d.mts +0 -1
  166. package/dist/pack-BOVET-UW.d.mts.map +0 -1
  167. package/dist/prisma7-binding-BQ5VOUjh.d.mts.map +0 -1
  168. package/dist/prisma7-binding-nxvUgQTH.mjs.map +0 -1
  169. package/dist/sql-utils-CGSJ8fH0.d.mts.map +0 -1
  170. package/dist/text-search-languages-CO6775ih-DMYr9qsC.d.mts +0 -22
  171. package/dist/text-search-languages-CO6775ih-DMYr9qsC.d.mts.map +0 -1
package/dist/target.mjs CHANGED
@@ -1,47 +1,47 @@
1
1
  import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_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, I as SQL_CHAR_CODEC_ID, L as SQL_FLOAT_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, R as SQL_INT_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, z as SQL_TEXT_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
- import { t as postgresAggregateDescriptors } from "./aggregates-B6ZQFHFE.mjs";
2
+ import { t as postgresAggregateDescriptors } from "./aggregates-Brwk0sYS.mjs";
3
3
  import { a as postgresCodec, i as isPostgresCodecDescriptor, n as buildPostgresCodecDescriptorRegistry, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-C5Ec_6Mw-CpacG1CL.mjs";
4
4
  import { s as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-DYyzTYzE-39CV_aMo.mjs";
5
5
  import { i as quoteIdentifier, n as escapeLiteral, o as quoteQualifiedName, r as qualifyName, s as validateEnumValueLength } from "./sql-utils-Df-nf6eM-Ov1KgjWm.mjs";
6
- import { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, R as postgresDataTypes, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from "./data-types-K6tDhu1D-BN--9o1o.mjs";
6
+ import { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, R as postgresDataTypes, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from "./data-types-DnIWGq_1-DTMjYG8M.mjs";
7
7
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
8
- import { C as pgTimestamptzDateColumn, D as pgUuidColumn, E as pgUnboundedIntColumn, O as pgVarbitColumn, S as pgTextColumn, T as pgTimetzColumn, _ as pgIntColumn, a as pgBitColumn, b as pgJsonbColumn, c as pgEnumDescriptor, d as pgFloatColumn, f as pgInetColumn, g as pgInt8NumberColumn, h as pgInt8Column, i as isPgEnumParams, k as pgVarcharColumn, l as pgFloat4Column, m as pgInt4Column, n as PgTimestamptzDateDescriptor, o as pgBoolColumn, p as pgInt2Column, s as pgCharColumn, t as PgTimestamptzDateCodec, u as pgFloat8Column, v as pgIntervalColumn, w as pgTimestamptzDateDescriptor, x as pgNumericColumn, y as pgJsonColumn } from "./codecs-Cb5S70Lx-WRSQkpza.mjs";
9
- import { a as postgresCodecDescriptorRegistry, i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, o as postgresCodecRegistry, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-BWUY_QLt-CzrMkP9N.mjs";
8
+ import { C as pgTimestamptzDateColumn, D as pgUuidColumn, E as pgUnboundedIntColumn, O as pgVarbitColumn, S as pgTextColumn, T as pgTimetzColumn, _ as pgIntColumn, a as pgBitColumn, b as pgJsonbColumn, c as pgEnumDescriptor, d as pgFloatColumn, f as pgInetColumn, g as pgInt8NumberColumn, h as pgInt8Column, i as isPgEnumParams, k as pgVarcharColumn, l as pgFloat4Column, m as pgInt4Column, n as PgTimestamptzDateDescriptor, o as pgBoolColumn, p as pgInt2Column, s as pgCharColumn, t as PgTimestamptzDateCodec, u as pgFloat8Column, v as pgIntervalColumn, w as pgTimestamptzDateDescriptor, x as pgNumericColumn, y as pgJsonColumn } from "./codecs-CQaKsvhH-X9bscCr9.mjs";
9
+ import { a as postgresCodecDescriptorRegistry, i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, o as postgresCodecRegistry, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-DSRFjaLX-Dwg0yBK7.mjs";
10
10
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
11
11
  import { f as weightGroupsOf, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
12
12
  import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, l as PostgresTableSource, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-Ysxbqkzr-hFRwS-zT.mjs";
13
13
  import { _ as PostgresDropType, a as PostgresAlterIndexRename, c as PostgresCreateIndex, d as PostgresCreateTable, f as PostgresCreateType, g as PostgresDropPolicy, h as PostgresDropIndex, i as DropDefaultAction, l as PostgresCreatePolicy, m as PostgresDisableRowLevelSecurity, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresDdlNode, r as AlterColumnTypeAction, s as PostgresAlterTable, t as AddColumnAction, u as PostgresCreateSchema } from "./nodes-BYKl6zt_-BoUacQ_3.mjs";
14
14
  import { A as sequenceNameAvailableAst, C as extensionExistsAst, D as noNullValuesAst, M as tableIsEmptyAst, N as tablePrimaryKeyAst, O as rlsEnabledAst, P as toRegclass, c as columnDefaultSequenceAst, d as columnTypeAst, f as constraintExistsAst, g as createTable, h as createSchema, j as tableExistsAst, k as rlsPolicyExistsAst, l as columnExistsAst, n as addConstraintAction, o as alterTable, r as alterColumnTypeAction, s as columnDefaultAst, t as addColumnAction, u as columnNullabilityAst, w as indexExistsAst, y as dropDefaultAction } from "./ddl-B6lRIezE-BMI5qzD2.mjs";
15
15
  import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free-DX6DmaSU.mjs";
16
- import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-BV62PF0L-NuMNArAx.mjs";
16
+ import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs";
17
17
  import { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
18
- import { a as instantNowControlDescriptor, i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
18
+ import { a as instantNowControlDescriptor, i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DOWd8Fpc-BE703X_J.mjs";
19
19
  import { t as postgresRenderCheckExpressions } from "./check-expressions-CVLs1Cgf-DaMRk-Q4.mjs";
20
- import { t as postgresDataTypeEntries } from "./data-type-entries-15a-vBdm-vIj5l1u5.mjs";
20
+ import { t as postgresDataTypeEntries } from "./data-type-entries-MxmSzT8p-D8CgbLxS.mjs";
21
21
  import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
22
22
  import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
23
- import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-Bf_Fhv4v-CugGfLAe.mjs";
23
+ import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-BnxtqsRm-CDjZe4vK.mjs";
24
24
  import { n as renderFullTextIndexDocument } from "./full-text-search-document-DYNz29YC-CfVTPwIL.mjs";
25
25
  import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-BvsUhPsJ-CY5uEwIr.mjs";
26
26
  import { i as stackDataTypes, n as buildExpectedFormatType, r as qualifyTableName, t as alterTypeCheckText } from "./planner-sql-checks-CX37qDix-Gkq38UQQ.mjs";
27
- import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, R as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Bf00O3tt-aQ8OJ00n.mjs";
28
- import { i as renderDefaultLiteral, n as isPostgresDateTimeDataType, r as postgresDateTimeDdlText, t as buildColumnTypeSql } from "./planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs";
29
- import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-BZdomjRU-G521DabU.mjs";
30
- import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-BlVJAbUZ-BjQYqA_a.mjs";
31
- import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs";
32
- import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs";
27
+ import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, R as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-TVvGnrxe-BYM7yGIk.mjs";
28
+ import { i as renderDefaultLiteral, n as isPostgresDateTimeDataType, r as postgresDateTimeDdlText, t as buildColumnTypeSql } from "./planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs";
29
+ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs";
30
+ import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-DVEQWEOE-dVbGW9Xq.mjs";
31
+ import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-K7Wr3Cso-BkIytT4i.mjs";
32
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs";
33
33
  import { t as dataTransform } from "./data-transform-CtHnNYhF-r19375h3.mjs";
34
- import { s as postgresRenderDefault, t as PostgresMigration } from "./postgres-migration-DxPGyge8-ChvbfTP4.mjs";
35
- import { t as renderOps } from "./render-ops-Cj_4STo9-hZVcK77c.mjs";
34
+ import { s as postgresRenderDefault, t as PostgresMigration } from "./postgres-migration-DplG05vQ-Cyy1zJjv.mjs";
35
+ import { t as renderOps } from "./render-ops-D7WBk4VN-Ba7n9A9L.mjs";
36
36
  import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
37
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs";
38
- import { t as createPostgresMigrationPlanner } from "./planner-BnZ7Ma0m-CuFTpofj.mjs";
37
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs";
38
+ import { t as createPostgresMigrationPlanner } from "./planner-q9c5nQlC-BvjDJEmC.mjs";
39
39
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
40
- import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-DxX_0Qw4.mjs";
40
+ import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-BeGPfK6d.mjs";
41
41
  import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DHtcrdrH-DpbFRMEu.mjs";
42
42
  import { t as tsquery } from "./full-text-DyeP0p9V.mjs";
43
43
  import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as sql } from "./migration-CbOh59ZJ.mjs";
44
44
  import { n as normalizeSchemaNativeType, t as introspectedNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
45
45
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-CdgWer9s.mjs";
46
- import { t as prisma7PostgresBinding } from "./prisma7-binding-nxvUgQTH.mjs";
46
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BvuMHLdX.mjs";
47
47
  export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FullTextDocument, INSTANT_NOW_GENERATOR_ID, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheckText, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, introspectedNativeType, isPgEnumParams, isPostgresCodecDescriptor, isPostgresDateTimeDataType, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateCanonical, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgNumeric, pgNumericColumn, pgNumericParams, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeCanonical, pgTimestamp, pgTimestampCanonical, pgTimestamptz, pgTimestamptzCanonical, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetz, pgTimetzCanonical, pgTimetzColumn, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, plaintoTsquery, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresDateTimeDdlText, postgresError, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, postgresScalarAuthoringTypes, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
@@ -1,2 +1,2 @@
1
- import { t as postgresAggregateDescriptors } from "./aggregates-CgqNfj2O.mjs";
1
+ import { t as postgresAggregateDescriptors } from "./aggregates-B-jwhT8T.mjs";
2
2
  export { postgresAggregateDescriptors };
@@ -1,2 +1,2 @@
1
- import { t as postgresAggregateDescriptors } from "./aggregates-B6ZQFHFE.mjs";
1
+ import { t as postgresAggregateDescriptors } from "./aggregates-Brwk0sYS.mjs";
2
2
  export { postgresAggregateDescriptors };
@@ -1,4 +1,4 @@
1
- import { y as PgInterval } from "./codecs-y1gOMMt--DKWhYGN5.mjs";
2
- import { a as JsonValue$1, c as TimeString, d as Timestamptz, f as TimestamptzString, h as Varchar, i as Interval, l as Timestamp, m as VarBit, n as Char, o as Numeric, p as Timetz, r as CodecTypes, s as Time, t as Bit, u as TimestampString } from "./codec-types-CYsrudBM-DcYPKpS1.mjs";
3
- import "./codec-types-CY3pawL3.mjs";
4
- export { Bit, Char, CodecTypes, Interval, type JsonValue$1 as JsonValue, Numeric, type PgInterval, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, VarBit, Varchar };
1
+ import { y as PgInterval } from "./codecs-CCzJelD2-bt89qO8s.mjs";
2
+ import { a as JsonValue$1, c as Time, d as TimestampString, f as Timestamptz, g as Varchar, h as VarBit, i as Interval, l as TimeString, m as Timetz, n as Char, o as Numeric, p as TimestamptzString, r as CodecTypes, s as ParameterizedOutputTypesForTypeParams, t as Bit, u as Timestamp } from "./codec-types-BZXuhZ1c-B9YQf_UN.mjs";
3
+ import "./codec-types-ZfL8TSVm.mjs";
4
+ export { Bit, Char, CodecTypes, Interval, type JsonValue$1 as JsonValue, Numeric, ParameterizedOutputTypesForTypeParams, type PgInterval, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, VarBit, Varchar };
@@ -1,4 +1,4 @@
1
- import { $ as pgIntervalColumn, A as PgTimestamptzDateDescriptor, B as pgBitColumn, C as PgNumericDescriptor, F as PgUnboundedIntDescriptor, G as pgFloat8Column, H as pgCharColumn, I as PgUuidDescriptor, J as pgInt2Column, K as pgFloatColumn, L as PgVarbitDescriptor, N as PgTimetzDescriptor, Q as pgIntColumn, R as PgVarcharDescriptor, S as PgJsonbDescriptor, U as pgEnumDescriptor, V as pgBoolColumn, W as pgFloat4Column, X as pgInt8Column, Y as pgInt4Column, Z as pgInt8NumberColumn, _ as PgInt8NumberDescriptor, at as pgTimestamptzDateDescriptor, b as PgIntervalDescriptor, c as PgEnumDescriptor, ct as pgUuidColumn, d as PgFloat8Descriptor, et as pgJsonColumn, f as PgFloatDescriptor, g as PgInt8Descriptor, h as PgInt4Descriptor, i as PgCharDescriptor, it as pgTimestamptzDateColumn, k as PgTimestamptzDateCodec, l as PgEnumParams, lt as pgVarbitColumn, m as PgInt2Descriptor, n as PgBoolDescriptor, nt as pgNumericColumn, ot as pgTimetzColumn, p as PgInetDescriptor, q as pgInetColumn, rt as pgTextColumn, s as PgEnumCodec, st as pgUnboundedIntColumn, t as PgBitDescriptor, tt as pgJsonbColumn, u as PgFloat4Descriptor, ut as pgVarcharColumn, v as PgIntDescriptor, w as PgTextDescriptor, x as PgJsonDescriptor, y as PgInterval, z as isPgEnumParams } from "./codecs-y1gOMMt--DKWhYGN5.mjs";
1
+ import { $ as pgIntervalColumn, A as PgTimestamptzDateDescriptor, B as pgBitColumn, C as PgNumericDescriptor, F as PgUnboundedIntDescriptor, G as pgFloat8Column, H as pgCharColumn, I as PgUuidDescriptor, J as pgInt2Column, K as pgFloatColumn, L as PgVarbitDescriptor, N as PgTimetzDescriptor, Q as pgIntColumn, R as PgVarcharDescriptor, S as PgJsonbDescriptor, U as pgEnumDescriptor, V as pgBoolColumn, W as pgFloat4Column, X as pgInt8Column, Y as pgInt4Column, Z as pgInt8NumberColumn, _ as PgInt8NumberDescriptor, at as pgTimestamptzDateDescriptor, b as PgIntervalDescriptor, c as PgEnumDescriptor, ct as pgUuidColumn, d as PgFloat8Descriptor, et as pgJsonColumn, f as PgFloatDescriptor, g as PgInt8Descriptor, h as PgInt4Descriptor, i as PgCharDescriptor, it as pgTimestamptzDateColumn, k as PgTimestamptzDateCodec, l as PgEnumParams, lt as pgVarbitColumn, m as PgInt2Descriptor, n as PgBoolDescriptor, nt as pgNumericColumn, ot as pgTimetzColumn, p as PgInetDescriptor, q as pgInetColumn, rt as pgTextColumn, s as PgEnumCodec, st as pgUnboundedIntColumn, t as PgBitDescriptor, tt as pgJsonbColumn, u as PgFloat4Descriptor, ut as pgVarcharColumn, v as PgIntDescriptor, w as PgTextDescriptor, x as PgJsonDescriptor, y as PgInterval, z as isPgEnumParams } from "./codecs-CCzJelD2-bt89qO8s.mjs";
2
2
  import { n as parsePostgresListText } from "./list-decoder-BcrLExnx-hTa7qY7a.mjs";
3
- import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, n as assemblePostgresCodecRegistry, o as postgresCodecDescriptorRegistry, r as assemblePostgresCodecRegistryWithBuiltins, s as postgresCodecRegistry, t as PostgresCodecRegistry } from "./codecs-ChjCJY5k.mjs";
3
+ import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, n as assemblePostgresCodecRegistry, o as postgresCodecDescriptorRegistry, r as assemblePostgresCodecRegistryWithBuiltins, s as postgresCodecRegistry, t as PostgresCodecRegistry } from "./codecs-BChKdFcD.mjs";
4
4
  export { type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgInt8NumberDescriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, type PgTimetzDescriptor, type PgUnboundedIntDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, type PostgresCodecRegistry, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, isPgEnumParams, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
@@ -1,4 +1,4 @@
1
- import { C as pgTimestamptzDateColumn, D as pgUuidColumn, E as pgUnboundedIntColumn, O as pgVarbitColumn, S as pgTextColumn, T as pgTimetzColumn, _ as pgIntColumn, a as pgBitColumn, b as pgJsonbColumn, c as pgEnumDescriptor, d as pgFloatColumn, f as pgInetColumn, g as pgInt8NumberColumn, h as pgInt8Column, i as isPgEnumParams, k as pgVarcharColumn, l as pgFloat4Column, m as pgInt4Column, n as PgTimestamptzDateDescriptor, o as pgBoolColumn, p as pgInt2Column, s as pgCharColumn, t as PgTimestamptzDateCodec, u as pgFloat8Column, v as pgIntervalColumn, w as pgTimestamptzDateDescriptor, x as pgNumericColumn, y as pgJsonColumn } from "./codecs-Cb5S70Lx-WRSQkpza.mjs";
2
- import { a as postgresCodecDescriptorRegistry, i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, o as postgresCodecRegistry, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-BWUY_QLt-CzrMkP9N.mjs";
1
+ import { C as pgTimestamptzDateColumn, D as pgUuidColumn, E as pgUnboundedIntColumn, O as pgVarbitColumn, S as pgTextColumn, T as pgTimetzColumn, _ as pgIntColumn, a as pgBitColumn, b as pgJsonbColumn, c as pgEnumDescriptor, d as pgFloatColumn, f as pgInetColumn, g as pgInt8NumberColumn, h as pgInt8Column, i as isPgEnumParams, k as pgVarcharColumn, l as pgFloat4Column, m as pgInt4Column, n as PgTimestamptzDateDescriptor, o as pgBoolColumn, p as pgInt2Column, s as pgCharColumn, t as PgTimestamptzDateCodec, u as pgFloat8Column, v as pgIntervalColumn, w as pgTimestamptzDateDescriptor, x as pgNumericColumn, y as pgJsonColumn } from "./codecs-CQaKsvhH-X9bscCr9.mjs";
2
+ import { a as postgresCodecDescriptorRegistry, i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, o as postgresCodecRegistry, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-DSRFjaLX-Dwg0yBK7.mjs";
3
3
  import { n as parsePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
4
4
  export { PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, isPgEnumParams, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
@@ -1,4 +1,4 @@
1
1
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-BcrLExnx-hTa7qY7a.mjs";
2
2
  import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./plain-date-time-now-generator-BmOTu5Au-BPhXjp4T.mjs";
3
- import { a as postgresTargetDescriptor, i as postgresScalarAuthoringTypes, n as postgresPslTypeConstructors, r as postgresRenderDefault, t as postgresNativeAuthoringTypes } from "./control-0nEwuD8F.mjs";
3
+ import { a as postgresTargetDescriptor, i as postgresScalarAuthoringTypes, n as postgresPslTypeConstructors, r as postgresRenderDefault, t as postgresNativeAuthoringTypes } from "./control-B0dyj3WB.mjs";
4
4
  export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderDefault, postgresScalarAuthoringTypes };
@@ -1,5 +1,5 @@
1
1
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
2
- import { a as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
3
- import { s as postgresRenderDefault } from "./postgres-migration-DxPGyge8-ChvbfTP4.mjs";
4
- import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-DxX_0Qw4.mjs";
2
+ import { a as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DOWd8Fpc-BE703X_J.mjs";
3
+ import { s as postgresRenderDefault } from "./postgres-migration-DplG05vQ-Cyy1zJjv.mjs";
4
+ import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-BeGPfK6d.mjs";
5
5
  export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderDefault, postgresScalarAuthoringTypes };
@@ -1,3 +1,3 @@
1
- import { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, R as postgresDataTypes, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from "./data-types-K6tDhu1D-BN--9o1o.mjs";
2
- import { t as postgresDataTypeEntries } from "./data-type-entries-15a-vBdm-vIj5l1u5.mjs";
1
+ import { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, R as postgresDataTypes, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from "./data-types-DnIWGq_1-DTMjYG8M.mjs";
2
+ import { t as postgresDataTypeEntries } from "./data-type-entries-MxmSzT8p-D8CgbLxS.mjs";
3
3
  export { createPostgresBuiltinDataTypeLookup, pgBit, pgBitLengthParams, pgBool, pgBytea, pgChar, pgCharacterLengthParams, pgDate, pgDateCanonical, pgEnum, pgEnumParams, pgFloat4, pgFloat8, pgInet, pgInt2, pgInt4, pgInt8, pgInterval, pgJson, pgJsonb, pgNumeric, pgNumericParams, pgPrecisionParams, pgText, pgTextArray, pgTime, pgTimeCanonical, pgTimestamp, pgTimestampCanonical, pgTimestamptz, pgTimestamptzCanonical, pgTimetz, pgTimetzCanonical, pgTsquery, pgUuid, pgVarbit, pgVarchar, postgresDataTypeEntries, postgresDataTypes };
@@ -1,2 +1,2 @@
1
- import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-Bf_Fhv4v-CugGfLAe.mjs";
1
+ import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-BnxtqsRm-CDjZe4vK.mjs";
2
2
  export { parsePostgresDefault, postgresResolveDefault };
@@ -1,2 +1,2 @@
1
- import { t as buildPostgresPlanDiff } from "./diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs";
1
+ import { t as buildPostgresPlanDiff } from "./diff-database-schema-K7Wr3Cso-BkIytT4i.mjs";
2
2
  export { buildPostgresPlanDiff };
@@ -1,4 +1,3 @@
1
- import { a as weightGroupsOf, n as FullTextFieldsInput } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
2
- import { a as FullTextIndexProblem, i as FullTextIndexDefinition, n as FullTextColumnCodecs, o as describeFullTextIndexProblem, r as FullTextIndexCandidate, s as fullTextIndexProblems, t as FULL_TEXT_INDEX_TYPE } from "./full-text-index-definition-CwWV12H4-DNafWNux.mjs";
1
+ import { a as FullTextIndexCandidate, d as fullTextIndexProblems, f as weightGroupsOf, i as FullTextFieldsInput, n as FULL_TEXT_INDEX_TYPE, o as FullTextIndexDefinition, r as FullTextColumnCodecs, s as FullTextIndexProblem, u as describeFullTextIndexProblem } from "./full-text-index-definition-D5iBWLss-FifKlctQ.mjs";
3
2
  import { t as postgresCodecTraitsOf } from "./full-text-index-authoring-Ca6bWXyG.mjs";
4
3
  export { FULL_TEXT_INDEX_TYPE, type FullTextColumnCodecs, type FullTextFieldsInput, type FullTextIndexCandidate, type FullTextIndexDefinition, type FullTextIndexProblem, describeFullTextIndexProblem, fullTextIndexProblems, postgresCodecTraitsOf, weightGroupsOf };
@@ -1,3 +1,3 @@
1
1
  import { f as weightGroupsOf, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
2
- import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-BV62PF0L-NuMNArAx.mjs";
2
+ import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs";
3
3
  export { FULL_TEXT_INDEX_TYPE, describeFullTextIndexProblem, fullTextIndexProblems, postgresCodecTraitsOf, weightGroupsOf };
@@ -1,4 +1,4 @@
1
- import { c as TextArgument, d as TsqueryParserOptions, f as fullTextDocument, g as websearchToTsquery, h as toTsquery, m as plaintoTsquery, n as FullTextDocumentColumn, p as phrasetoTsquery, r as FullTextDocumentGroups, t as FullTextDocument, u as TsqueryExpression } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
2
- import { n as PostgresTsqueryArgument, t as PostgresFullTextMethods } from "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
3
- import { n as tsquery, t as TsqueryTag } from "./full-text-Li_RyodV.mjs";
4
- export { FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type PostgresFullTextMethods, type PostgresTsqueryArgument, type TextArgument, type TsqueryExpression, type TsqueryParserOptions, type TsqueryTag, fullTextDocument, phrasetoTsquery, plaintoTsquery, toTsquery, tsquery, websearchToTsquery };
1
+ import { _ as plaintoTsquery, f as TsqueryExpression, g as phrasetoTsquery, h as fullTextDocument, m as TsqueryParserOptions, n as FullTextDocumentColumn, p as TsqueryParser, r as FullTextDocumentGroups, t as FullTextDocument, u as TextArgument, v as toTsquery, y as websearchToTsquery } from "./operation-types-BAiYtHkM-BN_YTibJ.mjs";
2
+ import { n as PostgresTsqueryArgument, t as PostgresFullTextMethods } from "./full-text-collection-method-B9e_oZFf-dyzLx5i6.mjs";
3
+ import { n as tsquery, t as TsqueryTag } from "./full-text-DzMPXaCj.mjs";
4
+ export { FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type PostgresFullTextMethods, type PostgresTsqueryArgument, type TextArgument, type TsqueryExpression, type TsqueryParser, type TsqueryParserOptions, type TsqueryTag, fullTextDocument, phrasetoTsquery, plaintoTsquery, toTsquery, tsquery, websearchToTsquery };
@@ -1,2 +1,2 @@
1
- import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-BlVJAbUZ-BjQYqA_a.mjs";
1
+ import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-DVEQWEOE-dVbGW9Xq.mjs";
2
2
  export { coalesceSubtreeIssues, planIssues };
@@ -1,5 +1,5 @@
1
- import { R as createExtension } from "./op-factory-call-Bf00O3tt-aQ8OJ00n.mjs";
1
+ import { R as createExtension } from "./op-factory-call-TVvGnrxe-BYM7yGIk.mjs";
2
2
  import { t as dataTransform } from "./data-transform-CtHnNYhF-r19375h3.mjs";
3
- import { t as PostgresMigration } from "./postgres-migration-DxPGyge8-ChvbfTP4.mjs";
3
+ import { t as PostgresMigration } from "./postgres-migration-DplG05vQ-Cyy1zJjv.mjs";
4
4
  import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as sql } from "./migration-CbOh59ZJ.mjs";
5
5
  export { PostgresMigration as Migration, MigrationCLI, checkExpression, col, createExtension, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, sql, unique };
@@ -1,2 +1,2 @@
1
- import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Bf00O3tt-aQ8OJ00n.mjs";
1
+ import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-TVvGnrxe-BYM7yGIk.mjs";
2
2
  export { AddCheckConstraintCall, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, SetDefaultCall, SetNotNullCall };
@@ -1,4 +1,4 @@
1
- import { r as FullTextSearchLanguage } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
2
- import { a as FullTextMatchesOptions, i as FullTextHeadlineOptions, l as TsqueryArgument, o as FullTextRankOptions, s as QueryOperationTypes } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
3
- import "./operation-types-ChXH8kV_.mjs";
4
- export type { FullTextHeadlineOptions, FullTextMatchesOptions, FullTextRankOptions, FullTextSearchLanguage, QueryOperationTypes, TsqueryArgument };
1
+ import { c as FullTextSearchLanguage } from "./full-text-index-definition-D5iBWLss-FifKlctQ.mjs";
2
+ import { a as FullTextIndexReference, c as QueryOperationTypes, d as TsqueryArgument, i as FullTextHeadlineOptions, l as QueryOperationTypesForCodecs, o as FullTextMatchesOptions, s as FullTextRankOptions } from "./operation-types-BAiYtHkM-BN_YTibJ.mjs";
3
+ import "./operation-types-CScw-diG.mjs";
4
+ export type { FullTextHeadlineOptions, FullTextIndexReference, FullTextMatchesOptions, FullTextRankOptions, FullTextSearchLanguage, QueryOperationTypes, QueryOperationTypesForCodecs, TsqueryArgument };
@@ -1,2 +1,3 @@
1
- import { t as postgresTargetDescriptorMeta } from "./pack-BOVET-UW.mjs";
2
- export { postgresTargetDescriptorMeta as default };
1
+ import { p as TsqueryParser, t as FullTextDocument } from "./operation-types-BAiYtHkM-BN_YTibJ.mjs";
2
+ import { t as postgresTargetDescriptorMeta } from "./pack-4sJCj0w-.mjs";
3
+ export { type FullTextDocument, type TsqueryParser, postgresTargetDescriptorMeta as default };
@@ -1,2 +1,2 @@
1
- import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-D5OipARb-6znWwvjE.mjs";
1
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-642teZF4-CAMY6SnM.mjs";
2
2
  export { postgresTargetDescriptorMeta as default };
@@ -1,2 +1,2 @@
1
- import { i as renderDefaultLiteral, n as isPostgresDateTimeDataType, r as postgresDateTimeDdlText, t as buildColumnTypeSql } from "./planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs";
1
+ import { i as renderDefaultLiteral, n as isPostgresDateTimeDataType, r as postgresDateTimeDdlText, t as buildColumnTypeSql } from "./planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs";
2
2
  export { buildColumnTypeSql, isPostgresDateTimeDataType, postgresDateTimeDdlText, renderDefaultLiteral };
@@ -1,2 +1,2 @@
1
- import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-BZdomjRU-G521DabU.mjs";
1
+ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs";
2
2
  export { buildBuiltinIdentityValue, resolveIdentityValue };
@@ -1,2 +1,2 @@
1
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs";
1
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs";
2
2
  export { TypeScriptRenderablePostgresMigration };
@@ -1,3 +1,3 @@
1
- import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs";
2
- import { t as createPostgresMigrationPlanner } from "./planner-BnZ7Ma0m-CuFTpofj.mjs";
1
+ import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-K7Wr3Cso-BkIytT4i.mjs";
2
+ import { t as createPostgresMigrationPlanner } from "./planner-q9c5nQlC-BvjDJEmC.mjs";
3
3
  export { contractToPostgresDatabaseSchemaNode, createPostgresMigrationPlanner };
@@ -1,2 +1,2 @@
1
- import { t as prisma7PostgresBinding } from "./prisma7-binding-BQ5VOUjh.mjs";
1
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-LcYpTBjP.mjs";
2
2
  export { prisma7PostgresBinding };
@@ -1,2 +1,2 @@
1
- import { t as prisma7PostgresBinding } from "./prisma7-binding-nxvUgQTH.mjs";
1
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BvuMHLdX.mjs";
2
2
  export { prisma7PostgresBinding };
@@ -1,2 +1,2 @@
1
- import { t as renderOps } from "./render-ops-Cj_4STo9-hZVcK77c.mjs";
1
+ import { t as renderOps } from "./render-ops-D7WBk4VN-Ba7n9A9L.mjs";
2
2
  export { renderOps };
@@ -1,6 +1,6 @@
1
1
  import { t as decodePostgresListText } from "./list-decoder-BcrLExnx-hTa7qY7a.mjs";
2
2
  import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./plain-date-time-now-generator-BmOTu5Au-BPhXjp4T.mjs";
3
- import { t as PostgresFullTextMethods } from "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
3
+ import { t as PostgresFullTextMethods } from "./full-text-collection-method-B9e_oZFf-dyzLx5i6.mjs";
4
4
  import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
5
- import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-qn4hL1wO.mjs";
5
+ import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-C1HMiDVY.mjs";
6
6
  export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, type PostgresFullTextMethods, PostgresListDecoder, PostgresRuntimeTargetInstance, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };
@@ -2,10 +2,10 @@ import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_I
2
2
  import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
3
3
  import { t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
4
4
  import { c as fullTextIndexOptions, n as FULL_TEXT_INDEX_TYPE } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
5
- import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
6
- import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs";
5
+ import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DOWd8Fpc-BE703X_J.mjs";
6
+ import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs";
7
7
  import { t as renderFullTextDocument } from "./full-text-search-document-DYNz29YC-CfVTPwIL.mjs";
8
- import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs";
8
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs";
9
9
  import { a as normalizationLiteral, c as toTsquery, i as languageLiteral, l as websearchToTsquery, o as phrasetoTsquery, r as headlineOptionsLiteral, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DHtcrdrH-DpbFRMEu.mjs";
10
10
  import { blindCast } from "@prisma/orm-framework/utils/casts";
11
11
  import { type } from "arktype";
@@ -1 +1 @@
1
- {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { a as fullTextIndexOptions, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { f as INSTANT_NOW_GENERATOR_ID, l as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantNow, u as plainDateTimeNow } from \"./authoring-CTn87jlt.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D4a-hsd_.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DYNz29YC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-3yxlqPfK.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-DHtcrdrH.mjs\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { uniqueIndexNamesOfType } from \"@internal/sql-relational-core/index-reference\";\n//#region src/core/full-text-collection-method.ts\nfunction indexFunction(tools, name) {\n\treturn blindCast(tools.fns[name]);\n}\nfunction fullTextMethod(indexName) {\n\treturn (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, \"fullTextMatches\")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, \"fullTextRank\")(tools.indexes[indexName], ...args).desc());\n}\n/** The run-time half of `PostgresFullTextMethods`. */\nconst postgresFullTextMethods = {\n\tid: \"postgres/fullText\",\n\tmethodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))\n};\n//#endregion\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcollectionMethods: () => [postgresFullTextMethods],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;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AO,OAAO,WAAW;MACzB,GAAG;MACH,GAAG,SAAS;KACb;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,GAAG,GAAG,SAAS,SAAS,YAAY,kBAAkB,KAAK,IAAI,KAAK,aAAa;KAC/F;IACD,CAAC;GACF;EACD;EACA,kBAAkB;GACjB,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM;IACpC,MAAM,kBAAkB,uBAAuB,oBAAoB,OAAO;IAC1E,MAAM,OAAO;IACb,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,WAAW;MACzB,gBAAgB,oBAAoB,WAAW,OAAO,CAAC;MACvD,GAAG,oBAAoB,KAAK,IAAI,CAAC,IAAI,CAAC,eAAe;KACtD;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,OAAO,oBAAoB,KAAK,IAAI,KAAK,aAAa;KACpE;IACD,CAAC;GACF;EACD;EACA,oBAAoB,EAAE,MAAM,mBAAmB;EAC/C,WAAW,EAAE,MAAM,UAAU;EAC7B,gBAAgB,EAAE,MAAM,eAAe;EACvC,iBAAiB,EAAE,MAAM,gBAAgB;CAC1C;AACD;;;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,yBAAyB,CAAC,uBAAuB;CACjD,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
1
+ {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { a as fullTextIndexOptions, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { f as INSTANT_NOW_GENERATOR_ID, l as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantNow, u as plainDateTimeNow } from \"./authoring-DOWd8Fpc.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-CpGl9XzU.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DYNz29YC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-D_z_HJ5K.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-DHtcrdrH.mjs\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { uniqueIndexNamesOfType } from \"@internal/sql-relational-core/index-reference\";\n//#region src/core/full-text-collection-method.ts\nfunction indexFunction(tools, name) {\n\treturn blindCast(tools.fns[name]);\n}\nfunction fullTextMethod(indexName) {\n\treturn (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, \"fullTextMatches\")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, \"fullTextRank\")(tools.indexes[indexName], ...args).desc());\n}\n/** The run-time half of `PostgresFullTextMethods`. */\nconst postgresFullTextMethods = {\n\tid: \"postgres/fullText\",\n\tmethodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))\n};\n//#endregion\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcollectionMethods: () => [postgresFullTextMethods],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,cAAc,OAAO,MAAM;CACnC,OAAO,UAAU,MAAM,IAAI,KAAK;AACjC;AACA,SAAS,eAAe,WAAW;CAClC,QAAQ,YAAY,GAAG,SAAS,WAAW,OAAO,QAAQ,UAAU,cAAc,OAAO,iBAAiB,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,QAAQ,UAAU,cAAc,OAAO,cAAc,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC;AAC1P;;AAEA,MAAM,0BAA0B;CAC/B,IAAI;CACJ,aAAa,UAAU,OAAO,YAAY,uBAAuB,MAAM,MAAM,SAAS,oBAAoB,CAAC,CAAC,KAAK,SAAS,CAAC,MAAM,eAAe,IAAI,CAAC,CAAC,CAAC;AACxJ;AAGA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,aAAa,KAAK,KAAK,UAAU,SAAS,aAAa,SAAS,aAAa;AAC9J;AACA,SAAS,gBAAgB,QAAQ,UAAU,UAAU,S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;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,yBAAyB,CAAC,uBAAuB;CACjD,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
@@ -1,3 +1,3 @@
1
- import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
2
- import { a as renderFullTextIndexDocument, i as quoteQualifiedName, n as qualifyName, o as validateEnumValueLength, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-CGSJ8fH0.mjs";
1
+ import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./full-text-index-definition-D5iBWLss-FifKlctQ.mjs";
2
+ import { a as renderFullTextIndexDocument, i as quoteQualifiedName, n as qualifyName, o as validateEnumValueLength, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
3
3
  export { DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, escapeLiteral, qualifyName, quoteIdentifier, quoteQualifiedName, renderFullTextIndexDocument, validateEnumValueLength };
@@ -1,2 +1,2 @@
1
1
  import "./types-D6lgKhE5-DYkeCAjr.mjs";
2
- import "./codecs-ChjCJY5k.mjs";
2
+ import "./codecs-BChKdFcD.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-postgres",
3
- "version": "8.0.0-rc.18-dev.7",
3
+ "version": "8.0.0-rc.18-dev.8",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,9 +9,9 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-sql": "8.0.0-rc.18-dev.7",
13
- "@prisma/orm-framework": "8.0.0-rc.18-dev.7",
14
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.7",
12
+ "@prisma/orm-family-sql": "8.0.0-rc.18-dev.8",
13
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.8",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.8",
15
15
  "@standard-schema/spec": "^1.1.0",
16
16
  "@types/node": "26.1.2",
17
17
  "@types/pg": "8.20.4",
@@ -22,11 +22,11 @@
22
22
  "postgres-array": "2.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@internal/adapter-postgres": "8.0.0-rc.18-dev.7",
26
- "@internal/driver-postgres": "8.0.0-rc.18-dev.7",
27
- "@internal/target-postgres": "8.0.0-rc.18-dev.7",
28
- "@repo/tsconfig": "8.0.0-rc.18-dev.7",
29
- "@repo/tsdown": "8.0.0-rc.18-dev.7",
25
+ "@internal/adapter-postgres": "8.0.0-rc.18-dev.8",
26
+ "@internal/driver-postgres": "8.0.0-rc.18-dev.8",
27
+ "@internal/target-postgres": "8.0.0-rc.18-dev.8",
28
+ "@repo/tsconfig": "8.0.0-rc.18-dev.8",
29
+ "@repo/tsdown": "8.0.0-rc.18-dev.8",
30
30
  "tsdown": "0.22.14",
31
31
  "typescript": "5.9.3",
32
32
  "vitest": "5.0.0-rc.2"
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-DXUJlrmB-7Lk8j0kE.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-DXUJlrmB.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-Q8LMpTcq.mjs\";\nimport { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from \"./control-adapter-EatqP8Vh.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst dataTypeLookup = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]).lookup;\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypeLookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-DXUJlrmB.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,WAAW;EACrD,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,cAAc;EA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,CAAC;CACnC,CAAC,CAAC,CAAC,CAAC;CACJ,MAAM,gBAAgB,wCAAwC,SAAS,kBAAkB,cAAc;CACvG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,gBAAgB,SAAS,SAAS,CAAC;AAChG;AACA,SAAS,uCAAuC,eAAe,gBAAgB;CAC9E,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,cAAc,CAAC;AAC5E"}
@@ -1,58 +0,0 @@
1
- import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
2
- import { c as PostgresLoweredStatement, s as PostgresAdapterOptions } from "./types-D6lgKhE5-DYkeCAjr.mjs";
3
- import { t as PostgresCodecRegistry } from "./codecs-ChjCJY5k.mjs";
4
- import { v as PostgresDdlNode } from "./nodes-h4zPlhED-nduA-ijW.mjs";
5
- import "./ddl-Da35uGK1.mjs";
6
- import { Adapter, AdapterProfile, AnyQueryAst, LowererContext } from "@prisma/orm-family-sql/relational-core/ast";
7
- import { DataTypeLookup } from "@prisma/orm-framework/components/codec";
8
- import { RawCodecInferer } from "@prisma/orm-family-sql/relational-core/expression";
9
- //#region ../../../3-targets/6-adapters/postgres/dist/adapter.d.mts
10
- //#region src/core/adapter.d.ts
11
- declare class PostgresAdapterImpl implements Adapter<AnyQueryAst, PostgresContract, PostgresLoweredStatement> {
12
- readonly familyId: "sql";
13
- readonly targetId: "postgres";
14
- readonly profile: AdapterProfile<'postgres'>;
15
- private readonly codecRegistry;
16
- private readonly dataTypeLookup;
17
- constructor(codecRegistry: PostgresCodecRegistry, dataTypeLookup: DataTypeLookup, profileId?: string);
18
- lower(ast: AnyQueryAst | PostgresDdlNode, context: LowererContext<PostgresContract>): PostgresLoweredStatement;
19
- }
20
- /**
21
- * Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.
22
- *
23
- * The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.
24
- */
25
- declare const postgresRawCodecInferer: RawCodecInferer;
26
- declare function createPostgresAdapter(options?: PostgresAdapterOptions): Readonly<PostgresAdapterImpl>;
27
- //#endregion
28
- //#region src/core/capabilities.d.ts
29
- declare const postgresAdapterCapabilities: Readonly<{
30
- readonly postgres: {
31
- readonly orderBy: true;
32
- readonly limit: true;
33
- readonly lateral: true;
34
- readonly jsonAgg: true;
35
- readonly returning: true;
36
- readonly distinctOn: true;
37
- readonly forNoKeyUpdate: true;
38
- readonly forKeyShare: true;
39
- };
40
- readonly sql: {
41
- readonly enums: true;
42
- readonly returning: true;
43
- readonly defaultInInsert: true;
44
- readonly lateral: true;
45
- readonly scalarList: true;
46
- readonly checkConstraint: true;
47
- readonly insertOnConflictSkip: true;
48
- readonly insertOnConflictWithoutTarget: true;
49
- readonly forUpdate: true;
50
- readonly forShare: true;
51
- readonly lockOf: true;
52
- readonly lockNowait: true;
53
- readonly lockSkipLocked: true;
54
- };
55
- }>;
56
- //#endregion
57
- export { postgresAdapterCapabilities as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
58
- //# sourceMappingURL=adapter-giV1nqJs.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-giV1nqJs.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB;EAClF,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggregates-B6ZQFHFE.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/aggregates.mjs"],"sourcesContent":["import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_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, L as SQL_FLOAT_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, O as PG_TIMETZ_CODEC_ID, R as SQL_INT_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, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, s as PG_ENUM_CODEC_ID, u as PG_FLOAT_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { AggregateExpr, CastExpr } from \"@internal/sql-relational-core/ast\";\n//#region src/core/aggregates.ts\nconst overCodec = (codecId) => ({\n\tkind: \"codec\",\n\tcodecId\n});\nconst overTrait = (trait) => ({\n\tkind: \"trait\",\n\ttrait\n});\n/**\n* An aggregate whose result is one of the input values, so it carries the input's codec — type parameters included, since a `numeric(10,3)` minimum is still a `numeric(10,3)`.\n*/\nconst preservesInput = (operation, input) => ({\n\toperation,\n\tinput,\n\toutput: { kind: \"self\" },\n\tnullable: true\n});\n/**\n* An aggregate whose result is a new value. It names its result codec without type parameters: a sum leaves the input's width behind (a `numeric(10,3)` column sums to an unconstrained `numeric`), so carrying the input's parameters into the result would understate the range.\n*/\nconst produces = (operation, input, codecId) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true\n});\n/** The same, for an operation that builds its own expression. */\nconst producesVia = (operation, input, codecId, lower) => ({\n\t...produces(operation, input, codecId),\n\tlower\n});\n/** The SQL aggregate a lossless variant computes with. `sumBigInt` is a `sum` read exactly, `countBigInt` a `count`, `avgDecimal` an `avg`: the variants differ in how the result is read, never in what the database computes. */\nconst computedWith = (fn) => ({ expr }) => new AggregateExpr(fn, expr);\n/** `avg` over an integer column, rounded once. PostgreSQL computes the exact `numeric` mean and the cast turns that one value into the `double precision` the result codec reads; casting the input instead would round every value before it was accumulated. */\nconst avgCastToFloat8 = ({ expr }) => CastExpr.as(new AggregateExpr(\"avg\", expr), \"float8\");\n/** Integer codecs whose `sum` widens to `bigint` — every built-in integer bar the 64-bit ones, whose sum goes to `numeric` instead. */\nconst SUM_WIDENS_TO_INT8 = [\n\tPG_INT2_CODEC_ID,\n\tPG_INT4_CODEC_ID,\n\tPG_INT_CODEC_ID,\n\tSQL_INT_CODEC_ID\n];\n/** The 64-bit integer codecs: PostgreSQL computes their `sum` as a `numeric`, a total free to leave the range an `int8` holds. */\nconst SUM_WIDENS_TO_NUMERIC = [PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID];\n/** The integer codecs a `sum` reads back as a `number`: every fixed-width one, whatever its own application type. */\nconst FIXED_WIDTH_INTEGER_CODECS = [...SUM_WIDENS_TO_INT8, ...SUM_WIDENS_TO_NUMERIC];\n/** Every built-in integer codec, the unbounded one included: `avg` over any of them is a `numeric` mean. */\nconst INTEGER_CODECS = [...FIXED_WIDTH_INTEGER_CODECS, PG_UNBOUNDED_INT_CODEC_ID];\n/** Codecs over `double precision`, whose `sum` and `avg` stay there. */\nconst DOUBLE_PRECISION_CODECS = [\n\tPG_FLOAT8_CODEC_ID,\n\tPG_FLOAT_CODEC_ID,\n\tSQL_FLOAT_CODEC_ID\n];\n/**\n* Codecs whose `min`/`max` returns the input type and whose traits do not already say so: the temporal types, `inet`, `text[]`, and native enums advertise `order` or `equality`, which `uuid`, `bit`, `bit varying`, `bool`, `bytea`, `json`, and `jsonb` also advertise while having no `min`/`max` at all. An exact overload per supported codec is therefore the only honest shape — a trait fallback over `order` would claim the unsupported ones too.\n*/\nconst MIN_MAX_PRESERVING_CODECS = [\n\tPG_ENUM_CODEC_ID,\n\tPG_TIMETZ_CODEC_ID,\n\tPG_INTERVAL_CODEC_ID,\n\tPG_INET_CODEC_ID,\n\tPG_TEXT_ARRAY_CODEC_ID,\n\tPG_DATE_STRING_CODEC_ID,\n\tPG_TIMESTAMP_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_DATE_CODEC_ID,\n\tPG_TIME_STRING_CODEC_ID,\n\tPG_DATE_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\tPG_TIME_TEMPORAL_CODEC_ID\n];\n/**\n* `min`/`max` over the character types, where the trait rung does hold: every `textual` codec returns its input type — except the two `varchar` codecs, whose result PostgreSQL widens to `text`, and which therefore claim themselves exactly and shadow the fallback.\n*/\nconst MIN_MAX_WIDENS_TO_TEXT = [PG_VARCHAR_CODEC_ID, SQL_VARCHAR_CODEC_ID];\nconst orderingDescriptors = (operation) => [\n\tpreservesInput(operation, overTrait(\"numeric\")),\n\tpreservesInput(operation, overTrait(\"textual\")),\n\t...MIN_MAX_WIDENS_TO_TEXT.map((codecId) => produces(operation, overCodec(codecId), PG_TEXT_CODEC_ID)),\n\t...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, overCodec(codecId)))\n];\n/**\n* Every aggregate overload the PostgreSQL target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.\n*/\nconst postgresAggregateDescriptors = [\n\t{\n\t\toperation: \"count\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_NUMBER_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultJson: \"0\"\n\t},\n\t{\n\t\toperation: \"countBigInt\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultJson: \"0\",\n\t\tlower: computedWith(\"count\")\n\t},\n\t...FIXED_WIDTH_INTEGER_CODECS.map((codecId) => produces(\"sum\", overCodec(codecId), PG_INT8_NUMBER_CODEC_ID)),\n\t...SUM_WIDENS_TO_INT8.map((codecId) => producesVia(\"sumBigInt\", overCodec(codecId), PG_INT8_CODEC_ID, computedWith(\"sum\"))),\n\t...SUM_WIDENS_TO_NUMERIC.map((codecId) => producesVia(\"sumBigInt\", overCodec(codecId), PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\"))),\n\tproducesVia(\"sumBigInt\", overCodec(PG_UNBOUNDED_INT_CODEC_ID), PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\")),\n\tproduces(\"sum\", overCodec(PG_FLOAT4_CODEC_ID), PG_FLOAT4_CODEC_ID),\n\t...DOUBLE_PRECISION_CODECS.map((codecId) => produces(\"sum\", overCodec(codecId), PG_FLOAT8_CODEC_ID)),\n\tproduces(\"sum\", overCodec(PG_NUMERIC_CODEC_ID), PG_NUMERIC_CODEC_ID),\n\tproduces(\"sum\", overCodec(PG_UNBOUNDED_INT_CODEC_ID), PG_UNBOUNDED_INT_CODEC_ID),\n\tproduces(\"sum\", overCodec(PG_INTERVAL_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", overCodec(PG_TIME_STRING_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", overCodec(PG_TIME_TEMPORAL_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\t...INTEGER_CODECS.map((codecId) => producesVia(\"avg\", overCodec(codecId), PG_FLOAT8_CODEC_ID, avgCastToFloat8)),\n\t...[...INTEGER_CODECS, PG_NUMERIC_CODEC_ID].map((codecId) => producesVia(\"avgDecimal\", overCodec(codecId), PG_NUMERIC_CODEC_ID, computedWith(\"avg\"))),\n\t...[PG_FLOAT4_CODEC_ID, ...DOUBLE_PRECISION_CODECS].map((codecId) => produces(\"avg\", overCodec(codecId), PG_FLOAT8_CODEC_ID)),\n\tproduces(\"avg\", overCodec(PG_NUMERIC_CODEC_ID), PG_NUMERIC_CODEC_ID),\n\tproduces(\"avg\", overCodec(PG_INTERVAL_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", overCodec(PG_TIME_STRING_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", overCodec(PG_TIME_TEMPORAL_CODEC_ID), PG_INTERVAL_CODEC_ID),\n\t...orderingDescriptors(\"min\"),\n\t...orderingDescriptors(\"max\")\n];\n//#endregion\nexport { postgresAggregateDescriptors };\n\n//# sourceMappingURL=aggregates.mjs.map"],"mappings":";;;AAGA,MAAM,aAAa,aAAa;CAC/B,MAAM;CACN;AACD;AACA,MAAM,aAAa,WAAW;CAC7B,MAAM;CACN;AACD;;;;AAIA,MAAM,kBAAkB,WAAW,WAAW;CAC7C;CACA;CACA,QAAQ,EAAE,MAAM,OAAO;CACvB,UAAU;AACX;;;;AAIA,MAAM,YAAY,WAAW,OAAO,aAAa;CAChD;CACA;CACA,QAAQ;EACP,MAAM;EACN;CACD;CACA,UAAU;AACX;;AAEA,MAAM,eAAe,WAAW,OAAO,SAAS,WAAW;CAC1D,GAAG,SAAS,WAAW,OAAO,OAAO;CACrC;AACD;;AAEA,MAAM,gBAAgB,QAAQ,EAAE,WAAW,IAAI,cAAc,IAAI,IAAI;;AAErE,MAAM,mBAAmB,E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