@prisma/orm-target-postgres 8.0.0-rc.18-dev.25 → 8.0.0-rc.18-dev.27

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 (187) hide show
  1. package/dist/{adapter-UEtFYllx-DXa1Ekth.mjs → adapter-BkfuSVLm-DmjWB5c9.mjs} +14 -14
  2. package/dist/adapter-BkfuSVLm-DmjWB5c9.mjs.map +1 -0
  3. package/dist/{adapter-CA0jY1EK.d.mts → adapter-vfsQ80l6.d.mts} +3 -3
  4. package/dist/adapter-vfsQ80l6.d.mts.map +1 -0
  5. package/dist/adapter.d.mts +3 -4
  6. package/dist/adapter.mjs +6 -7
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +2 -2
  9. package/dist/adapter__control.d.mts +2 -3
  10. package/dist/adapter__control.mjs +8 -9
  11. package/dist/adapter__control.mjs.map +1 -1
  12. package/dist/adapter__runtime.mjs +6 -6
  13. package/dist/adapter__runtime.mjs.map +1 -1
  14. package/dist/adapter__sql-renderer.mjs +1 -1
  15. package/dist/{authoring-mmK5aduF-BltVG_HJ.mjs → authoring-DhyLHFHA-pB4NuFxh.mjs} +5 -5
  16. package/dist/{authoring-mmK5aduF-BltVG_HJ.mjs.map → authoring-DhyLHFHA-pB4NuFxh.mjs.map} +1 -1
  17. package/dist/{autoincrement-widths-djl9Gw7k-C4Vk6s7I.mjs → autoincrement-widths-1v9UfTSw-NFaqRGCV.mjs} +3 -3
  18. package/dist/{autoincrement-widths-djl9Gw7k-C4Vk6s7I.mjs.map → autoincrement-widths-1v9UfTSw-NFaqRGCV.mjs.map} +1 -1
  19. package/dist/{check-expressions-DoxKokL1-RVvYRdA6.mjs → check-expressions-7uCCP01t-WtUqfqkP.mjs} +3 -3
  20. package/dist/{check-expressions-DoxKokL1-RVvYRdA6.mjs.map → check-expressions-7uCCP01t-WtUqfqkP.mjs.map} +1 -1
  21. package/dist/{codec-registry-CvKdYTYj-4xXqgKKs.mjs → codec-registry-T79ktJL4-B9_zlIhI.mjs} +4 -4
  22. package/dist/{codec-registry-CvKdYTYj-4xXqgKKs.mjs.map → codec-registry-T79ktJL4-B9_zlIhI.mjs.map} +1 -1
  23. package/dist/{codecs-D183NDmb-DKryvPH2.mjs → codecs-UZ1NEbvk-CMnI6Ti0.mjs} +3 -3
  24. package/dist/{codecs-D183NDmb-DKryvPH2.mjs.map → codecs-UZ1NEbvk-CMnI6Ti0.mjs.map} +1 -1
  25. package/dist/{contract-contributions-DrHk5h_E-BbmViVsC.mjs → contract-contributions-CQqafzSC-DrMFSSO4.mjs} +49 -40
  26. package/dist/contract-contributions-CQqafzSC-DrMFSSO4.mjs.map +1 -0
  27. package/dist/{contract-free-CiUW36L2.mjs → contract-free-Kwm74Hg9.mjs} +3 -3
  28. package/dist/{contract-free-CiUW36L2.mjs.map → contract-free-Kwm74Hg9.mjs.map} +1 -1
  29. package/dist/{control-policy-BdfDPcjX-BueP9PBT.mjs → control-policy-BHjZnca1-DUWuKmdJ.mjs} +65 -89
  30. package/dist/control-policy-BHjZnca1-DUWuKmdJ.mjs.map +1 -0
  31. package/dist/{control-l0spLFiu.d.mts → control-vBNwKZ7Q.d.mts} +6 -4
  32. package/dist/control-vBNwKZ7Q.d.mts.map +1 -0
  33. package/dist/{data-type-entries-KJ4Mn8C5-DY3rLz33.mjs → data-type-entries-CqnLlCkK-uN0WjREd.mjs} +3 -3
  34. package/dist/{data-type-entries-KJ4Mn8C5-DY3rLz33.mjs.map → data-type-entries-CqnLlCkK-uN0WjREd.mjs.map} +1 -1
  35. package/dist/{data-types-BkFfMhgz.d.mts → data-types-BTUMiCZS.d.mts} +5 -2
  36. package/dist/data-types-BTUMiCZS.d.mts.map +1 -0
  37. package/dist/{data-types-CQs1yW4F-CSexn8mK.mjs → data-types-Cs-LkJBw-CJN57Y5M.mjs} +4 -4
  38. package/dist/{data-types-CQs1yW4F-CSexn8mK.mjs.map → data-types-Cs-LkJBw-CJN57Y5M.mjs.map} +1 -1
  39. package/dist/{ddl-V9Yxnoa6-BcStSw33.mjs → ddl-2L13tYjC-enYPQJnG.mjs} +5 -5
  40. package/dist/{ddl-V9Yxnoa6-BcStSw33.mjs.map → ddl-2L13tYjC-enYPQJnG.mjs.map} +1 -1
  41. package/dist/{default-normalizer-BqFHmlox-CP8ywN-r.mjs → default-normalizer-BqK6XxdC-BAgxt9FF.mjs} +10 -12
  42. package/dist/default-normalizer-BqK6XxdC-BAgxt9FF.mjs.map +1 -0
  43. package/dist/{default-normalizer-CTAiFe9Y.d.mts → default-normalizer-P-u2VRBf.d.mts} +5 -5
  44. package/dist/default-normalizer-P-u2VRBf.d.mts.map +1 -0
  45. package/dist/{descriptor-meta-axWY-kHl-Bt2_NjH4.mjs → descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs} +8 -8
  46. package/dist/{descriptor-meta-axWY-kHl-Bt2_NjH4.mjs.map → descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs.map} +1 -1
  47. package/dist/{descriptor-meta-CvJvXGfx-CGIgsveo.mjs → descriptor-meta-DDh7-s6c-D6qC3SDx.mjs} +4 -4
  48. package/dist/{descriptor-meta-CvJvXGfx-CGIgsveo.mjs.map → descriptor-meta-DDh7-s6c-D6qC3SDx.mjs.map} +1 -1
  49. package/dist/{descriptor-meta-runtime-CMaPJG46-CPYTMJ7t.mjs → descriptor-meta-runtime-C1AjrKaP-CYer0qt7.mjs} +3 -3
  50. package/dist/{descriptor-meta-runtime-CMaPJG46-CPYTMJ7t.mjs.map → descriptor-meta-runtime-C1AjrKaP-CYer0qt7.mjs.map} +1 -1
  51. package/dist/{diff-database-schema-DLIpM5BX-DlEJquxk.mjs → diff-database-schema-DyCIRT80-C1zMCmRx.mjs} +7 -7
  52. package/dist/{diff-database-schema-DLIpM5BX-DlEJquxk.mjs.map → diff-database-schema-DyCIRT80-C1zMCmRx.mjs.map} +1 -1
  53. package/dist/{full-text-search-document-DbegbX0J-jrbc8kfp.mjs → full-text-search-document-Doy5TF7c-DezgYsP-.mjs} +3 -3
  54. package/dist/{full-text-search-document-DbegbX0J-jrbc8kfp.mjs.map → full-text-search-document-Doy5TF7c-DezgYsP-.mjs.map} +1 -1
  55. package/dist/{indexes-ca4Dxsym-By_PZuYD.d.mts → indexes-DtIXFHAb-DBubdl32.d.mts} +3 -2
  56. package/dist/indexes-DtIXFHAb-DBubdl32.d.mts.map +1 -0
  57. package/dist/{issue-planner-B3E9yChD.d.mts → issue-planner-DrWlNiAf.d.mts} +5 -6
  58. package/dist/issue-planner-DrWlNiAf.d.mts.map +1 -0
  59. package/dist/migration-CbOh59ZJ.mjs.map +1 -1
  60. package/dist/{migration-cGzKlTv0.d.mts → migration-DO23kNde.d.mts} +3 -3
  61. package/dist/{migration-cGzKlTv0.d.mts.map → migration-DO23kNde.d.mts.map} +1 -1
  62. package/dist/native-type-normalizer-DFE5L3YY.d.mts +30 -0
  63. package/dist/native-type-normalizer-DFE5L3YY.d.mts.map +1 -0
  64. package/dist/native-type-normalizer-a1XJSlk6.mjs +24 -0
  65. package/dist/native-type-normalizer-a1XJSlk6.mjs.map +1 -0
  66. package/dist/op-factory-call-CijzNDaJ.d.mts +1 -0
  67. package/dist/{op-factory-call-B-EoYQIO-BIfzqVX6.mjs → op-factory-call-No9Z2tdw-Lap8xvVy.mjs} +35 -27
  68. package/dist/op-factory-call-No9Z2tdw-Lap8xvVy.mjs.map +1 -0
  69. package/dist/{op-factory-call-z5TKsamx-DDfPa57U.d.mts → op-factory-call-kdPO0kgG-DV8hS6qA.d.mts} +10 -9
  70. package/dist/op-factory-call-kdPO0kgG-DV8hS6qA.d.mts.map +1 -0
  71. package/dist/{planner-BBGH1cAB.d.mts → planner-B_MRApHM.d.mts} +3 -3
  72. package/dist/{planner-BBGH1cAB.d.mts.map → planner-B_MRApHM.d.mts.map} +1 -1
  73. package/dist/{planner-BNoWx3rb-rkajA65G.mjs → planner-C1czBCmI-C-x1Ip-_.mjs} +10 -10
  74. package/dist/{planner-BNoWx3rb-rkajA65G.mjs.map → planner-C1czBCmI-C-x1Ip-_.mjs.map} +1 -1
  75. package/dist/{planner-ddl-builders-Bo_8ozOV-AMIs8Og7.mjs → planner-ddl-builders-B8PhQZ2T-D1KBJxcS.mjs} +3 -3
  76. package/dist/{planner-ddl-builders-Bo_8ozOV-AMIs8Og7.mjs.map → planner-ddl-builders-B8PhQZ2T-D1KBJxcS.mjs.map} +1 -1
  77. package/dist/{planner-ddl-builders-Byw5BICu.d.mts → planner-ddl-builders-DbG9_uAk.d.mts} +3 -3
  78. package/dist/{planner-ddl-builders-Byw5BICu.d.mts.map → planner-ddl-builders-DbG9_uAk.d.mts.map} +1 -1
  79. package/dist/{planner-identity-values-Dr5FgyF1.d.mts → planner-identity-values-B-NAiN7I.d.mts} +3 -3
  80. package/dist/planner-identity-values-B-NAiN7I.d.mts.map +1 -0
  81. package/dist/{planner-identity-values--pbIuAZR-lgKcM-Zu.mjs → planner-identity-values-BnxSwhlS-CzyBeK0a.mjs} +3 -3
  82. package/dist/{planner-identity-values--pbIuAZR-lgKcM-Zu.mjs.map → planner-identity-values-BnxSwhlS-CzyBeK0a.mjs.map} +1 -1
  83. package/dist/{planner-produced-postgres-migration-sxhIP3Te-Cn3sD9zE.d.mts → planner-produced-postgres-migration-B6NsNaam-BmvloI2L.d.mts} +3 -3
  84. package/dist/planner-produced-postgres-migration-B6NsNaam-BmvloI2L.d.mts.map +1 -0
  85. package/dist/planner-produced-postgres-migration-BW8GJFjS.d.mts +1 -0
  86. package/dist/{planner-produced-postgres-migration-BIKLMKpf-B5h4hpvf.mjs → planner-produced-postgres-migration-F9joIngl-C04yYu-i.mjs} +4 -4
  87. package/dist/{planner-produced-postgres-migration-BIKLMKpf-B5h4hpvf.mjs.map → planner-produced-postgres-migration-F9joIngl-C04yYu-i.mjs.map} +1 -1
  88. package/dist/planner-sql-checks-CB4oLSuZ.d.mts +1 -0
  89. package/dist/planner-sql-checks-CxlrM4J2-VqQpmMwn.d.mts +37 -0
  90. package/dist/planner-sql-checks-CxlrM4J2-VqQpmMwn.d.mts.map +1 -0
  91. package/dist/planner-sql-checks-pkURMYMz-2QAIKyW-.mjs +139 -0
  92. package/dist/planner-sql-checks-pkURMYMz-2QAIKyW-.mjs.map +1 -0
  93. package/dist/{postgres-codec-traits-Da2UyO_9-BsGjYJHf.mjs → postgres-codec-traits-D3muwxMS-OwnBG0Mz.mjs} +3 -3
  94. package/dist/{postgres-codec-traits-Da2UyO_9-BsGjYJHf.mjs.map → postgres-codec-traits-D3muwxMS-OwnBG0Mz.mjs.map} +1 -1
  95. package/dist/{postgres-contract-view-csjnSNLt-M2QaYBn0.mjs → postgres-contract-view-B-bLZB7o-zpuamDXT.mjs} +7 -7
  96. package/dist/{postgres-contract-view-csjnSNLt-M2QaYBn0.mjs.map → postgres-contract-view-B-bLZB7o-zpuamDXT.mjs.map} +1 -1
  97. package/dist/{postgres-migration-BGkcs09r-BmUXCs80.mjs → postgres-migration-BbXm1l5I-DDy8IgYB.mjs} +15 -32
  98. package/dist/postgres-migration-BbXm1l5I-DDy8IgYB.mjs.map +1 -0
  99. package/dist/{postgres-migration-D6_R3__I-rFg_i2gz.d.mts → postgres-migration-CRLV93uK-ThJW3tFf.d.mts} +3 -3
  100. package/dist/{postgres-migration-D6_R3__I-rFg_i2gz.d.mts.map → postgres-migration-CRLV93uK-ThJW3tFf.d.mts.map} +1 -1
  101. package/dist/{postgres-schema-BtW3Sw0F-CH3NqoOo.mjs → postgres-schema-DyUXtYIT-vb-RxpRN.mjs} +3 -3
  102. package/dist/{postgres-schema-BtW3Sw0F-CH3NqoOo.mjs.map → postgres-schema-DyUXtYIT-vb-RxpRN.mjs.map} +1 -1
  103. package/dist/{prisma7-binding-XSuxkjqy.d.mts → prisma7-binding-C5RLV6kJ.d.mts} +12 -121
  104. package/dist/prisma7-binding-C5RLV6kJ.d.mts.map +1 -0
  105. package/dist/{prisma7-binding-ZUOUC530.mjs → prisma7-binding-CzO7rkpS.mjs} +80 -141
  106. package/dist/prisma7-binding-CzO7rkpS.mjs.map +1 -0
  107. package/dist/{render-ops-WhXRiDGu-LZMJf0aV.mjs → render-ops-MeXLgeOa-nL4PdJzz.mjs} +3 -3
  108. package/dist/{render-ops-WhXRiDGu-LZMJf0aV.mjs.map → render-ops-MeXLgeOa-nL4PdJzz.mjs.map} +1 -1
  109. package/dist/{resolve-ddl-schema-B8cX92k0-DzN6Alxy.mjs → resolve-ddl-schema-IdPEiyLX-BZGpy8Wz.mjs} +3 -3
  110. package/dist/{resolve-ddl-schema-B8cX92k0-DzN6Alxy.mjs.map → resolve-ddl-schema-IdPEiyLX-BZGpy8Wz.mjs.map} +1 -1
  111. package/dist/{sql-renderer-CD5aYQos-DZotmt9U.mjs → sql-renderer-CD5aYQos-1hGCWT0S.mjs} +3 -3
  112. package/dist/{sql-renderer-CD5aYQos-DZotmt9U.mjs.map → sql-renderer-CD5aYQos-1hGCWT0S.mjs.map} +1 -1
  113. package/dist/{sql-utils-DxE_vJt4-Dkjw9U45.mjs → sql-utils-Bnw3JbWf-zvWDkyrr.mjs} +3 -178
  114. package/dist/sql-utils-Bnw3JbWf-zvWDkyrr.mjs.map +1 -0
  115. package/dist/target.d.mts +17 -16
  116. package/dist/target.mjs +29 -29
  117. package/dist/target__codecs.mjs +2 -2
  118. package/dist/target__contract-free.mjs +3 -3
  119. package/dist/target__control.mjs +2558 -3
  120. package/dist/target__control.mjs.map +1 -0
  121. package/dist/target__data-types.d.mts +2 -2
  122. package/dist/target__data-types.mjs +3 -3
  123. package/dist/target__default-normalizer.d.mts +1 -1
  124. package/dist/target__default-normalizer.mjs +1 -1
  125. package/dist/target__diff-database-schema.mjs +1 -1
  126. package/dist/target__full-text-index-authoring.mjs +1 -1
  127. package/dist/target__issue-planner.d.mts +1 -1
  128. package/dist/target__issue-planner.mjs +1 -1
  129. package/dist/target__migration.d.mts +2 -2
  130. package/dist/target__migration.mjs +2 -2
  131. package/dist/target__native-type-normalizer.d.mts +2 -2
  132. package/dist/target__native-type-normalizer.mjs +2 -2
  133. package/dist/target__op-factory-call.d.mts +2 -2
  134. package/dist/target__op-factory-call.mjs +1 -1
  135. package/dist/target__pack.mjs +1 -1
  136. package/dist/target__planner-ddl-builders.d.mts +1 -1
  137. package/dist/target__planner-ddl-builders.mjs +1 -1
  138. package/dist/target__planner-identity-values.d.mts +1 -1
  139. package/dist/target__planner-identity-values.mjs +1 -1
  140. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  141. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  142. package/dist/target__planner-sql-checks.d.mts +3 -2
  143. package/dist/target__planner-sql-checks.mjs +2 -2
  144. package/dist/target__planner.d.mts +1 -1
  145. package/dist/target__planner.mjs +2 -2
  146. package/dist/target__prisma7-binding.d.mts +1 -1
  147. package/dist/target__prisma7-binding.mjs +1 -1
  148. package/dist/target__render-ops.mjs +1 -1
  149. package/dist/target__runtime.mjs +5 -5
  150. package/dist/target__runtime.mjs.map +1 -1
  151. package/dist/target__schema-ir-annotations.mjs +1 -1
  152. package/dist/target__sql-utils.mjs +2 -2
  153. package/dist/target__types.mjs +2 -2
  154. package/dist/{infer-psl-contract-CKP3nwjB-x1_ji7Z9.mjs → type-constructors-CrNUrtwZ-dmWF-mtV.mjs} +385 -15
  155. package/dist/type-constructors-CrNUrtwZ-dmWF-mtV.mjs.map +1 -0
  156. package/package.json +9 -9
  157. package/dist/adapter-CA0jY1EK.d.mts.map +0 -1
  158. package/dist/adapter-UEtFYllx-DXa1Ekth.mjs.map +0 -1
  159. package/dist/contract-contributions-DrHk5h_E-BbmViVsC.mjs.map +0 -1
  160. package/dist/control-CwTFk4YS.mjs +0 -2929
  161. package/dist/control-CwTFk4YS.mjs.map +0 -1
  162. package/dist/control-l0spLFiu.d.mts.map +0 -1
  163. package/dist/control-policy-BdfDPcjX-BueP9PBT.mjs.map +0 -1
  164. package/dist/data-types-BkFfMhgz.d.mts.map +0 -1
  165. package/dist/default-normalizer-BqFHmlox-CP8ywN-r.mjs.map +0 -1
  166. package/dist/default-normalizer-CTAiFe9Y.d.mts.map +0 -1
  167. package/dist/indexes-ca4Dxsym-By_PZuYD.d.mts.map +0 -1
  168. package/dist/infer-psl-contract-CKP3nwjB-x1_ji7Z9.mjs.map +0 -1
  169. package/dist/issue-planner-B3E9yChD.d.mts.map +0 -1
  170. package/dist/native-type-normalizer-BFo5tSyh.d.mts +0 -37
  171. package/dist/native-type-normalizer-BFo5tSyh.d.mts.map +0 -1
  172. package/dist/native-type-normalizer-CwyVR7xB.mjs +0 -96
  173. package/dist/native-type-normalizer-CwyVR7xB.mjs.map +0 -1
  174. package/dist/op-factory-call-B-EoYQIO-BIfzqVX6.mjs.map +0 -1
  175. package/dist/op-factory-call-uVDKZqw1.d.mts +0 -1
  176. package/dist/op-factory-call-z5TKsamx-DDfPa57U.d.mts.map +0 -1
  177. package/dist/planner-identity-values-Dr5FgyF1.d.mts.map +0 -1
  178. package/dist/planner-produced-postgres-migration-D-ZcNy7h.d.mts +0 -1
  179. package/dist/planner-produced-postgres-migration-sxhIP3Te-Cn3sD9zE.d.mts.map +0 -1
  180. package/dist/planner-sql-checks-C54jJ5qt.d.mts +0 -39
  181. package/dist/planner-sql-checks-C54jJ5qt.d.mts.map +0 -1
  182. package/dist/planner-sql-checks-pAQfWJz_-CosbjrRp.mjs +0 -132
  183. package/dist/planner-sql-checks-pAQfWJz_-CosbjrRp.mjs.map +0 -1
  184. package/dist/postgres-migration-BGkcs09r-BmUXCs80.mjs.map +0 -1
  185. package/dist/prisma7-binding-XSuxkjqy.d.mts.map +0 -1
  186. package/dist/prisma7-binding-ZUOUC530.mjs.map +0 -1
  187. package/dist/sql-utils-DxE_vJt4-Dkjw9U45.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ddl-V9Yxnoa6-BcStSw33.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/ddl-V9Yxnoa6.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-BtW3Sw0F.mjs\";\nimport { _ 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, r as AlterColumnTypeAction, s as PostgresAlterTable, t as AddColumnAction, u as PostgresCreateSchema } from \"./nodes-BYKl6zt_.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed check that a column takes its default from the sequence it owns: the column's default (`pg_attrdef`) depends on the sequence `pg_get_serial_sequence` finds for it. A `nextval(...)` default records that dependency on the sequence it reads, so a default that reads another sequence, an earlier default, or no default does not pass. It compares catalog identities, never the default's text.\n*/\nfunction columnDefaultSequenceAst(options) {\n\tconst regclassOf = (catalog) => cfExpr.raw(`'${catalog}'::regclass`, {\n\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\tnullable: false\n\t});\n\tconst defaultOnOwnedSequence = exprSelect().from(cfTable(\"pg_attrdef\", \"d\")).join(cfTable(\"pg_attribute\", \"a\"), cfExpr.columnRef(\"a\", \"attrelid\").eqExpr(cfExpr.columnRef(\"d\", \"adrelid\")).and(cfExpr.columnRef(\"a\", \"attnum\").eqExpr(cfExpr.columnRef(\"d\", \"adnum\")))).join(cfTable(\"pg_depend\", \"dep\"), cfExpr.columnRef(\"dep\", \"objid\").eqExpr(cfExpr.columnRef(\"d\", \"oid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"d\", \"adrelid\").eqExpr(toRegclass(checkNamespace(options.schema).qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"dep\", \"classid\").eqExpr(regclassOf(\"pg_attrdef\")),\n\t\tcfExpr.columnRef(\"dep\", \"refclassid\").eqExpr(regclassOf(\"pg_class\")),\n\t\tcfExpr.columnRef(\"dep\", \"refobjid\").eqExpr(ownedSequenceOf(options))\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(defaultOnOwnedSequence)).build();\n}\n/**\n* The sequence the column owns, as a `regclass`, found in the catalog with `pg_get_serial_sequence`; `NULL` when it owns none. A SERIAL column and an identity column both own one, and it keeps its name when the table or column is renamed.\n*/\nfunction ownedSequenceOf(location) {\n\treturn cfExpr.fn({\n\t\tmethod: \"pg_get_serial_sequence\",\n\t\ttemplate: \"pg_get_serial_sequence({{self}}, {{arg0}})::regclass\",\n\t\tself: cfExpr.param(checkNamespace(location.schema).qualifyTable(location.table), PG_TEXT_CODEC_ID),\n\t\targs: [cfExpr.param(location.column, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed check that a column's autoincrement default has a sequence to use: the column already owns one, whatever its name, or no relation has the name `sequence`, which the operation creates.\n*/\nfunction sequenceNameAvailableAst(options) {\n\tconst qualifiedSequence = checkNamespace(options.schema).qualifyTable(options.sequence);\n\treturn exprSelect().project(\"result\", ownedSequenceOf(options).isNotNull().or(toRegclass(qualifiedSequence).isNull())).build();\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Whether the attribute numbers in `keys` (an `int2[]` or `int2vector` such as `pg_constraint.conkey` or `pg_index.indkey`) name, in order, exactly the columns `names` of the relation `relation`. Key `0`, an expression slot of an index, names no column.\n*/\nfunction keyColumnsAre(keys, relation, names) {\n\treturn cfExpr.fn({\n\t\tmethod: \"key_columns_are\",\n\t\ttemplate: \"(SELECT coalesce(jsonb_agg(key_attribute.attname ORDER BY key_column.position), '[]'::jsonb) FROM unnest({{self}}::int2[]) WITH ORDINALITY AS key_column(attnum, position) JOIN pg_attribute key_attribute ON key_attribute.attrelid = {{arg0}} AND key_attribute.attnum = key_column.attnum) = ({{arg1}})::jsonb\",\n\t\tself: keys,\n\t\targs: [relation, cfExpr.param(JSON.stringify(names), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n}\n/**\n* Typed check that the relation `name` exists and its `pg_class.relkind` is one of `kinds`, so a view, sequence or index of the same name does not pass as a table.\n*/\nfunction relationKindAst(options) {\n\tconst relation = toRegclass(checkNamespace(options.schema).qualifyTable(options.name));\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"c\", \"oid\").eqExpr(relation), options.kinds.map((kind) => cfExpr.columnRef(\"c\", \"relkind\").eqParam(kind, PG_TEXT_CODEC_ID)).reduce((either, kind) => either.or(kind))]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the constraint `constraintName` on `table` is of kind `contype` (`p`, `u`, `f` or `c`), on the columns `columns` in order when given, and for a foreign key, references `foreignKey`'s table and columns in order with its delete and update actions. It reads only catalog values, never the text Postgres prints for a constraint.\n*/\nfunction constraintDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"c\", \"contype\").eqParam(options.contype, PG_TEXT_CODEC_ID)\n\t];\n\tif (options.columns !== void 0) conditions.push(keyColumnsAre(cfExpr.columnRef(\"c\", \"conkey\"), cfExpr.columnRef(\"c\", \"conrelid\"), options.columns));\n\tconst foreignKey = options.foreignKey;\n\tif (foreignKey !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"confrelid\").eqExpr(toRegclass(checkNamespace(foreignKey.referencedSchema).qualifyTable(foreignKey.referencedTable))), keyColumnsAre(cfExpr.columnRef(\"c\", \"confkey\"), cfExpr.columnRef(\"c\", \"confrelid\"), foreignKey.referencedColumns), cfExpr.columnRef(\"c\", \"confdeltype\").eqParam(foreignKey.onDelete, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"c\", \"confupdtype\").eqParam(foreignKey.onUpdate, PG_TEXT_CODEC_ID));\n\tconst inner = exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that `index` is an index on `table` with the given uniqueness and access method, on the columns `columns` in order, and with or without a predicate. For an index written as an element list (`expression`) it checks no elements: the list can be a real expression, which Postgres stores in `indexprs`, or plain columns with a sort order, operator class or collation, which it stores as columns, and comparing its text would need the form Postgres prints.\n*/\nfunction indexDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst indexColumn = (name) => cfExpr.columnRef(\"i\", name);\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_index\", \"i\"), cfExpr.columnRef(\"i\", \"indexrelid\").eqExpr(cfExpr.columnRef(\"c\", \"oid\"))).join(cfTable(\"pg_am\", \"m\"), cfExpr.columnRef(\"m\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relam\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"c\", \"oid\").eqExpr(toRegclass(namespace.qualifyTable(options.index))),\n\t\tcfExpr.columnRef(\"c\", \"relkind\").eqParam(\"i\", PG_TEXT_CODEC_ID).or(cfExpr.columnRef(\"c\", \"relkind\").eqParam(\"I\", PG_TEXT_CODEC_ID)),\n\t\tindexColumn(\"indrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\toptions.unique ? indexColumn(\"indisunique\") : indexColumn(\"indisunique\").not(),\n\t\tcfExpr.columnRef(\"m\", \"amname\").eqParam(options.method, PG_TEXT_CODEC_ID),\n\t\t...\"columns\" in options.elements ? [indexColumn(\"indexprs\").isNull().and(keyColumnsAre(indexColumn(\"indkey\"), indexColumn(\"indrelid\"), options.elements.columns))] : [],\n\t\toptions.hasPredicate ? indexColumn(\"indpred\").isNotNull() : indexColumn(\"indpred\").isNull()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the RLS policy `policyName` on `table` exists with the command `command` (as `pg_policies.cmd` prints it, such as `ALL` or `SELECT`), the permissive flag, and exactly the roles `roles`, in any order. A role written as `current_user`, `current_role` or `session_user` stands for the role it names in the session that runs the check, as `CREATE POLICY` resolves it. It never compares the policy's expressions.\n*/\nfunction rlsPolicyDefinitionAst(options) {\n\tconst rolesAre = cfExpr.fn({\n\t\tmethod: \"roles_are\",\n\t\ttemplate: `(SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT policy_role::text COLLATE \"C\" AS role_name FROM unnest({{self}}) AS policy_role) AS actual_roles) = (SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT (CASE expected_role WHEN 'current_user' THEN current_user::text WHEN 'current_role' THEN current_role::text WHEN 'session_user' THEN session_user::text ELSE expected_role END) COLLATE \"C\" AS role_name FROM jsonb_array_elements_text(({{arg0}})::jsonb) AS expected_role) AS expected_roles)`,\n\t\tself: cfExpr.identifierRef(\"roles\"),\n\t\targs: [cfExpr.param(JSON.stringify(options.roles), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"cmd\").eqParam(options.command, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"permissive\").eqParam(options.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\", PG_TEXT_CODEC_ID),\n\t\trolesAre\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the column owns a sequence, whatever its name, of the type `sequenceType` (`smallint`, `integer` or `bigint`). With `orNone`, a column that owns no sequence passes too.\n*/\nfunction columnOwnsSequenceAst(options) {\n\tconst ownedSequence = ownedSequenceOf(options);\n\tconst sequenceType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.sequenceType, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst sequenceOfType = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequence), cfExpr.columnRef(\"s\", \"seqtypid\").eqExpr(sequenceType)]));\n\treturn exprSelect().project(\"result\", options.orNone ? ownedSequence.isNull().or(cfExpr.exists(sequenceOfType)) : ownedSequence.isNotNull().and(cfExpr.exists(sequenceOfType))).build();\n}\n/**\n* Typed column-type check for a type the stack's data types do not read: compares the column's `pg_attribute.atttypid` with `to_regtype(type)`. `to_regtype` drops a type modifier, so `varchar(20)` matches any `varchar`.\n*/\nfunction columnTypeOidAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst expectedType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.type, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"a\", \"attrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"atttypid\").eqExpr(expectedType),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the sequence the column owns has handed out no value above `maxValue`, so narrowing it to a smaller integer type keeps every value it already gave. The sequence's position is read only when its current maximum is above `maxValue`, that is when the change narrows it, so widening needs no rights on the sequence. A sequence that has never been read, and a column that owns none, pass.\n*/\nfunction sequenceValuesFitAst(options) {\n\tconst pastMax = cfExpr.fn({\n\t\tmethod: \"sequence_past_max\",\n\t\ttemplate: \"CASE WHEN {{self}} <= ({{arg0}})::bigint THEN false ELSE coalesce(pg_sequence_last_value(\\\"s\\\".\\\"seqrelid\\\"), 0) > ({{arg0}})::bigint END\",\n\t\tself: cfExpr.columnRef(\"s\", \"seqmax\"),\n\t\targs: [cfExpr.param(options.maxValue, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst narrowedPastMax = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequenceOf(options)).and(pastMax));\n\treturn exprSelect().project(\"result\", cfExpr.notExists(narrowedPastMax)).build();\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.\n*/\nfunction addConstraintAction(constraint) {\n\treturn new AddConstraintAction(constraint);\n}\n/**\n* Build an `ALTER COLUMN \"<columnName>\" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `\"<columnName>\"::<type>`.\n*/\nfunction alterColumnTypeAction(options) {\n\treturn new AlterColumnTypeAction({\n\t\tcolumnName: options.columnName,\n\t\ttype: options.type,\n\t\tusing: options.using ? opaqueSql(options.using) : void 0\n\t});\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n//#endregion\nexport { nativeEnumValueExistsAst as A, tablePrimaryKeyAst as B, columnTypeOidAst as C, indexDefinitionAst as D, extensionExistsAst as E, rlsPolicyExistsAst as F, sequenceNameAvailableAst as I, sequenceValuesFitAst as L, relationKindAst as M, rlsEnabledAst as N, indexExistsAst as O, rlsPolicyDefinitionAst as P, tableExistsAst as R, columnTypeAst as S, constraintExistsAst as T, toRegclass as V, columnDefaultAst as _, alterPolicyRename as a, columnNullabilityAst as b, createPolicy as c, createType as d, disableRowLevelSecurity as f, dropType as g, dropPolicy as h, alterIndexRename as i, noNullValuesAst as j, nativeEnumTypeExistsAst as k, createSchema as l, dropIndex as m, addConstraintAction as n, alterTable as o, dropDefaultAction as p, alterColumnTypeAction as r, createIndex as s, addColumnAction as t, createTable as u, columnDefaultSequenceAst as v, constraintDefinitionAst as w, columnOwnsSequenceAst as x, columnExistsAst as y, tableIsEmptyAst as z };\n\n//# sourceMappingURL=ddl-V9Yxnoa6.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;;;;;;;;;;AAUA,SAAS,eAAe,QAAQ,OAAO;CACtC,MAAM,WAAW,WAAW,wBAAwB;EACnD,IAAI;EACJ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC;CACtB,OAAO;EACN,mBAAmB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,OAAO,CAAC,CAAC,CAAC,MAAM;EAC3E,oBAAoB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,UAAU,CAAC,CAAC,CAAC,MAAM;CAChF;AACD;;;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,SAAS;CACrC,MAAM,YAAY,wBAAwB;EACzC,IAAI,QAAQ;EACZ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC;CACD,MAAM,aAAa,CAA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3B,OAAO,IAAI,kBAAkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD"}
1
+ {"version":3,"file":"ddl-2L13tYjC-enYPQJnG.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/ddl-2L13tYjC.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-DyUXtYIT.mjs\";\nimport { _ 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, r as AlterColumnTypeAction, s as PostgresAlterTable, t as AddColumnAction, u as PostgresCreateSchema } from \"./nodes-BYKl6zt_.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed check that a column takes its default from the sequence it owns: the column's default (`pg_attrdef`) depends on the sequence `pg_get_serial_sequence` finds for it. A `nextval(...)` default records that dependency on the sequence it reads, so a default that reads another sequence, an earlier default, or no default does not pass. It compares catalog identities, never the default's text.\n*/\nfunction columnDefaultSequenceAst(options) {\n\tconst regclassOf = (catalog) => cfExpr.raw(`'${catalog}'::regclass`, {\n\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\tnullable: false\n\t});\n\tconst defaultOnOwnedSequence = exprSelect().from(cfTable(\"pg_attrdef\", \"d\")).join(cfTable(\"pg_attribute\", \"a\"), cfExpr.columnRef(\"a\", \"attrelid\").eqExpr(cfExpr.columnRef(\"d\", \"adrelid\")).and(cfExpr.columnRef(\"a\", \"attnum\").eqExpr(cfExpr.columnRef(\"d\", \"adnum\")))).join(cfTable(\"pg_depend\", \"dep\"), cfExpr.columnRef(\"dep\", \"objid\").eqExpr(cfExpr.columnRef(\"d\", \"oid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"d\", \"adrelid\").eqExpr(toRegclass(checkNamespace(options.schema).qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"dep\", \"classid\").eqExpr(regclassOf(\"pg_attrdef\")),\n\t\tcfExpr.columnRef(\"dep\", \"refclassid\").eqExpr(regclassOf(\"pg_class\")),\n\t\tcfExpr.columnRef(\"dep\", \"refobjid\").eqExpr(ownedSequenceOf(options))\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(defaultOnOwnedSequence)).build();\n}\n/**\n* The sequence the column owns, as a `regclass`, found in the catalog with `pg_get_serial_sequence`; `NULL` when it owns none. A SERIAL column and an identity column both own one, and it keeps its name when the table or column is renamed.\n*/\nfunction ownedSequenceOf(location) {\n\treturn cfExpr.fn({\n\t\tmethod: \"pg_get_serial_sequence\",\n\t\ttemplate: \"pg_get_serial_sequence({{self}}, {{arg0}})::regclass\",\n\t\tself: cfExpr.param(checkNamespace(location.schema).qualifyTable(location.table), PG_TEXT_CODEC_ID),\n\t\targs: [cfExpr.param(location.column, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed check that a column's autoincrement default has a sequence to use: the column already owns one, whatever its name, or no relation has the name `sequence`, which the operation creates.\n*/\nfunction sequenceNameAvailableAst(options) {\n\tconst qualifiedSequence = checkNamespace(options.schema).qualifyTable(options.sequence);\n\treturn exprSelect().project(\"result\", ownedSequenceOf(options).isNotNull().or(toRegclass(qualifiedSequence).isNull())).build();\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Whether the attribute numbers in `keys` (an `int2[]` or `int2vector` such as `pg_constraint.conkey` or `pg_index.indkey`) name, in order, exactly the columns `names` of the relation `relation`. Key `0`, an expression slot of an index, names no column.\n*/\nfunction keyColumnsAre(keys, relation, names) {\n\treturn cfExpr.fn({\n\t\tmethod: \"key_columns_are\",\n\t\ttemplate: \"(SELECT coalesce(jsonb_agg(key_attribute.attname ORDER BY key_column.position), '[]'::jsonb) FROM unnest({{self}}::int2[]) WITH ORDINALITY AS key_column(attnum, position) JOIN pg_attribute key_attribute ON key_attribute.attrelid = {{arg0}} AND key_attribute.attnum = key_column.attnum) = ({{arg1}})::jsonb\",\n\t\tself: keys,\n\t\targs: [relation, cfExpr.param(JSON.stringify(names), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n}\n/**\n* Typed check that the relation `name` exists and its `pg_class.relkind` is one of `kinds`, so a view, sequence or index of the same name does not pass as a table.\n*/\nfunction relationKindAst(options) {\n\tconst relation = toRegclass(checkNamespace(options.schema).qualifyTable(options.name));\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"c\", \"oid\").eqExpr(relation), options.kinds.map((kind) => cfExpr.columnRef(\"c\", \"relkind\").eqParam(kind, PG_TEXT_CODEC_ID)).reduce((either, kind) => either.or(kind))]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the constraint `constraintName` on `table` is of kind `contype` (`p`, `u`, `f` or `c`), on the columns `columns` in order when given, and for a foreign key, references `foreignKey`'s table and columns in order with its delete and update actions. It reads only catalog values, never the text Postgres prints for a constraint.\n*/\nfunction constraintDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"c\", \"contype\").eqParam(options.contype, PG_TEXT_CODEC_ID)\n\t];\n\tif (options.columns !== void 0) conditions.push(keyColumnsAre(cfExpr.columnRef(\"c\", \"conkey\"), cfExpr.columnRef(\"c\", \"conrelid\"), options.columns));\n\tconst foreignKey = options.foreignKey;\n\tif (foreignKey !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"confrelid\").eqExpr(toRegclass(checkNamespace(foreignKey.referencedSchema).qualifyTable(foreignKey.referencedTable))), keyColumnsAre(cfExpr.columnRef(\"c\", \"confkey\"), cfExpr.columnRef(\"c\", \"confrelid\"), foreignKey.referencedColumns), cfExpr.columnRef(\"c\", \"confdeltype\").eqParam(foreignKey.onDelete, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"c\", \"confupdtype\").eqParam(foreignKey.onUpdate, PG_TEXT_CODEC_ID));\n\tconst inner = exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that `index` is an index on `table` with the given uniqueness and access method, on the columns `columns` in order, and with or without a predicate. For an index written as an element list (`expression`) it checks no elements: the list can be a real expression, which Postgres stores in `indexprs`, or plain columns with a sort order, operator class or collation, which it stores as columns, and comparing its text would need the form Postgres prints.\n*/\nfunction indexDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst indexColumn = (name) => cfExpr.columnRef(\"i\", name);\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_index\", \"i\"), cfExpr.columnRef(\"i\", \"indexrelid\").eqExpr(cfExpr.columnRef(\"c\", \"oid\"))).join(cfTable(\"pg_am\", \"m\"), cfExpr.columnRef(\"m\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relam\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"c\", \"oid\").eqExpr(toRegclass(namespace.qualifyTable(options.index))),\n\t\tcfExpr.columnRef(\"c\", \"relkind\").eqParam(\"i\", PG_TEXT_CODEC_ID).or(cfExpr.columnRef(\"c\", \"relkind\").eqParam(\"I\", PG_TEXT_CODEC_ID)),\n\t\tindexColumn(\"indrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\toptions.unique ? indexColumn(\"indisunique\") : indexColumn(\"indisunique\").not(),\n\t\tcfExpr.columnRef(\"m\", \"amname\").eqParam(options.method, PG_TEXT_CODEC_ID),\n\t\t...\"columns\" in options.elements ? [indexColumn(\"indexprs\").isNull().and(keyColumnsAre(indexColumn(\"indkey\"), indexColumn(\"indrelid\"), options.elements.columns))] : [],\n\t\toptions.hasPredicate ? indexColumn(\"indpred\").isNotNull() : indexColumn(\"indpred\").isNull()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the RLS policy `policyName` on `table` exists with the command `command` (as `pg_policies.cmd` prints it, such as `ALL` or `SELECT`), the permissive flag, and exactly the roles `roles`, in any order. A role written as `current_user`, `current_role` or `session_user` stands for the role it names in the session that runs the check, as `CREATE POLICY` resolves it. It never compares the policy's expressions.\n*/\nfunction rlsPolicyDefinitionAst(options) {\n\tconst rolesAre = cfExpr.fn({\n\t\tmethod: \"roles_are\",\n\t\ttemplate: `(SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT policy_role::text COLLATE \"C\" AS role_name FROM unnest({{self}}) AS policy_role) AS actual_roles) = (SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT (CASE expected_role WHEN 'current_user' THEN current_user::text WHEN 'current_role' THEN current_role::text WHEN 'session_user' THEN session_user::text ELSE expected_role END) COLLATE \"C\" AS role_name FROM jsonb_array_elements_text(({{arg0}})::jsonb) AS expected_role) AS expected_roles)`,\n\t\tself: cfExpr.identifierRef(\"roles\"),\n\t\targs: [cfExpr.param(JSON.stringify(options.roles), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"cmd\").eqParam(options.command, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"permissive\").eqParam(options.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\", PG_TEXT_CODEC_ID),\n\t\trolesAre\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the column owns a sequence, whatever its name, of the type `sequenceType` (`smallint`, `integer` or `bigint`). With `orNone`, a column that owns no sequence passes too.\n*/\nfunction columnOwnsSequenceAst(options) {\n\tconst ownedSequence = ownedSequenceOf(options);\n\tconst sequenceType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.sequenceType, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst sequenceOfType = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequence), cfExpr.columnRef(\"s\", \"seqtypid\").eqExpr(sequenceType)]));\n\treturn exprSelect().project(\"result\", options.orNone ? ownedSequence.isNull().or(cfExpr.exists(sequenceOfType)) : ownedSequence.isNotNull().and(cfExpr.exists(sequenceOfType))).build();\n}\n/**\n* Typed column-type check by the type's identity: compares the column's `pg_attribute.atttypid` with `to_regtype(type)`, or with that type's array type for a list. It checks a type that claims a kind, such as an enum, whatever schema it is in, and a type the stack's data types do not read. `to_regtype` drops a type modifier, so `varchar(20)` matches any `varchar`.\n*/\nfunction columnTypeOidAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst expectedType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: options.many ? \"(SELECT \\\"t\\\".\\\"typarray\\\" FROM \\\"pg_catalog\\\".\\\"pg_type\\\" AS \\\"t\\\" WHERE \\\"t\\\".\\\"oid\\\" = to_regtype({{self}}))\" : \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.type, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"a\", \"attrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"atttypid\").eqExpr(expectedType),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the sequence the column owns has handed out no value above `maxValue`, so narrowing it to a smaller integer type keeps every value it already gave. The sequence's position is read only when its current maximum is above `maxValue`, that is when the change narrows it, so widening needs no rights on the sequence. A sequence that has never been read, and a column that owns none, pass.\n*/\nfunction sequenceValuesFitAst(options) {\n\tconst pastMax = cfExpr.fn({\n\t\tmethod: \"sequence_past_max\",\n\t\ttemplate: \"CASE WHEN {{self}} <= ({{arg0}})::bigint THEN false ELSE coalesce(pg_sequence_last_value(\\\"s\\\".\\\"seqrelid\\\"), 0) > ({{arg0}})::bigint END\",\n\t\tself: cfExpr.columnRef(\"s\", \"seqmax\"),\n\t\targs: [cfExpr.param(options.maxValue, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst narrowedPastMax = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequenceOf(options)).and(pastMax));\n\treturn exprSelect().project(\"result\", cfExpr.notExists(narrowedPastMax)).build();\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.\n*/\nfunction addConstraintAction(constraint) {\n\treturn new AddConstraintAction(constraint);\n}\n/**\n* Build an `ALTER COLUMN \"<columnName>\" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `\"<columnName>\"::<type>`.\n*/\nfunction alterColumnTypeAction(options) {\n\treturn new AlterColumnTypeAction({\n\t\tcolumnName: options.columnName,\n\t\ttype: options.type,\n\t\tusing: options.using ? opaqueSql(options.using) : void 0\n\t});\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n//#endregion\nexport { nativeEnumValueExistsAst as A, tablePrimaryKeyAst as B, columnTypeOidAst as C, indexDefinitionAst as D, extensionExistsAst as E, rlsPolicyExistsAst as F, sequenceNameAvailableAst as I, sequenceValuesFitAst as L, relationKindAst as M, rlsEnabledAst as N, indexExistsAst as O, rlsPolicyDefinitionAst as P, tableExistsAst as R, columnTypeAst as S, constraintExistsAst as T, toRegclass as V, columnDefaultAst as _, alterPolicyRename as a, columnNullabilityAst as b, createPolicy as c, createType as d, disableRowLevelSecurity as f, dropType as g, dropPolicy as h, alterIndexRename as i, noNullValuesAst as j, nativeEnumTypeExistsAst as k, createSchema as l, dropIndex as m, addConstraintAction as n, alterTable as o, dropDefaultAction as p, alterColumnTypeAction as r, createIndex as s, addColumnAction as t, createTable as u, columnDefaultSequenceAst as v, constraintDefinitionAst as w, columnOwnsSequenceAst as x, columnExistsAst as y, tableIsEmptyAst as z };\n\n//# sourceMappingURL=ddl-2L13tYjC.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;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AAG,UAAU,aAAa,cAAc,KAAK,IAAI,KAAK,IAAI,UAAU,SAAS,CAAC;CAC/E,CAAC;AACF;;;;;AAKA,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,OAAO;AACtC;;;;;AAKA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,0BAA0B,OAAO;AAC7C;;;;;;;;AAQA,SAAS,YAAY,SAAS;CAC7B,MAAM,EAAE,UAAU,OAAO,GAAG,SAAS;CACrC,OAAO,IAAI,oBAAoB;EAC9B,GAAG;EACH,UAAU,aAAa,WAAW,EAAE,SAAS,SAAS,QAAQ,IAAI,EAAE,YAAY,UAAU,SAAS,UAAU,EAAE;EAC/G,OAAO,UAAU,KAAK,IAAI,KAAK,IAAI,UAAU,KAAK;CACnD,CAAC;AACF;;;;;AAKA,SAAS,UAAU,SAAS;CAC3B,OAAO,IAAI,kBAAkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD"}
@@ -1,4 +1,4 @@
1
- //#region ../../../3-targets/3-targets/postgres/dist/default-normalizer-BqFHmlox.mjs
1
+ //#region ../../../3-targets/3-targets/postgres/dist/default-normalizer-BqK6XxdC.mjs
2
2
  const NEXTVAL_PATTERN = /^nextval\s*\(/i;
3
3
  const NOW_FUNCTION_PATTERN = /^(now\s*\(\s*\)|CURRENT_TIMESTAMP)$/i;
4
4
  const CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\s*\(\s*\)$/i;
@@ -42,8 +42,6 @@ const NUMBER_TYPE_PATTERN = new RegExp(`^(?:smallint|integer|bigint|int2|int4|in
42
42
  * Examples: `'{}'::text[]`, `'{1,2}'::integer[]`, `'{}'`
43
43
  */
44
44
  const ARRAY_LITERAL_PATTERN = /^'(\{.*\})'(?:::.+\[\])?$/;
45
- /** `box` is the one core type whose array elements are delimited by `;`, not `,`. */
46
- const SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN = /^box$/i;
47
45
  /**
48
46
  * Matches the constructor spelling Postgres reports for a default written as
49
47
  * `ARRAY[...]`: `ARRAY['a'::text, 'b'::text]`, `ARRAY[1, 2]`, `ARRAY[]::text[]`.
@@ -226,14 +224,14 @@ function functionDefault(expression) {
226
224
  };
227
225
  }
228
226
  /**
229
- * Reads a column's reported default. `nativeType` ends in `[]` for a list column, whose literal is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.
227
+ * Reads a column's reported default. A list column (`many`) has a literal that is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.
230
228
  */
231
- function readPostgresDefault(rawDefault, nativeType) {
229
+ function readPostgresDefault(rawDefault, many) {
232
230
  const trimmed = rawDefault.trim();
233
231
  if (NEXTVAL_PATTERN.test(trimmed)) return functionDefault("autoincrement()");
234
232
  if (NULL_PATTERN.test(trimmed)) return { kind: "null" };
235
- if (nativeType?.endsWith("[]")) {
236
- const elements = listElementBodies(trimmed, nativeType.slice(0, -2));
233
+ if (many) {
234
+ const elements = listElementBodies(trimmed);
237
235
  return elements === void 0 ? functionDefault(trimmed) : {
238
236
  kind: "literal",
239
237
  literal: {
@@ -263,9 +261,9 @@ function literalBody(expression) {
263
261
  return token.kind === "number" ? token.numeral : token.text;
264
262
  }
265
263
  /** The element bodies of a list literal, with `null` for SQL NULL, or `undefined` when the default is not a list of literals. */
266
- function listElementBodies(expression, elementType) {
264
+ function listElementBodies(expression) {
267
265
  const arrayLiteral = ARRAY_LITERAL_PATTERN.exec(expression)?.[1];
268
- if (arrayLiteral !== void 0 && !SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN.test(elementType)) return arrayLiteralElements(arrayLiteral.replace(/''/g, "'"));
266
+ if (arrayLiteral !== void 0) return arrayLiteralElements(arrayLiteral.replace(/''/g, "'"));
269
267
  const constructed = ARRAY_CONSTRUCTOR_PATTERN.exec(unwrapOuterArrayCasts(expression))?.[1];
270
268
  if (constructed === void 0) return void 0;
271
269
  if (constructed.trim() === "") return [];
@@ -302,12 +300,12 @@ function arrayLiteralElements(literal) {
302
300
  /**
303
301
  * Names a contract's expression default the way {@link readPostgresDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `CURRENT_TIMESTAMP` compare equal, and a `nextval(...)` default is `autoincrement()`. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.
304
302
  */
305
- function postgresResolveDefault(def, resolvedNativeType) {
303
+ function postgresResolveDefault(def, column) {
306
304
  if (def.kind !== "function") return def;
307
- const read = readPostgresDefault(def.expression, resolvedNativeType);
305
+ const read = readPostgresDefault(def.expression, column.many);
308
306
  return read.kind === "function" ? read : def;
309
307
  }
310
308
  //#endregion
311
309
  export { readPostgresDefault as n, postgresResolveDefault as t };
312
310
 
313
- //# sourceMappingURL=default-normalizer-BqFHmlox-CP8ywN-r.mjs.map
311
+ //# sourceMappingURL=default-normalizer-BqK6XxdC-BAgxt9FF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-normalizer-BqK6XxdC-BAgxt9FF.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer-BqK6XxdC.mjs"],"sourcesContent":["//#region src/core/default-normalizer.ts\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\n/**\n* A decimal numeral with an optional sign and an optional exponent. Postgres prints a `real` or\n* `double precision` default in exponent notation once its magnitude is large or small enough:\n* `'1e+20'::real`, `'1e-320'::double precision`.\n*/\nconst NUMERAL = String.raw`[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?`;\nconst NUMERIC_PATTERN = new RegExp(`^${NUMERAL}$`);\n/**\n* A type modifier: `(3)`, `(65,30)`, or a numeric type's negative scale, `(5,-2)`, which PostgreSQL\n* 15 and later accept.\n*/\nconst TYPE_MODIFIER = String.raw`\\(\\d+(?:,\\s*-?\\d+)?\\)`;\n/**\n* A cast target type: a builtin of one or more words, where any word may carry a modifier\n* (`timestamp(3) without time zone`, `numeric(65,30)`), or a quoted identifier (`\"AuditAction\"`);\n* either may be qualified by a possibly quoted schema (`audit.\"AuditAction\"`, `\"my schema\".t`).\n*/\nconst TYPE_NAME = String.raw`(?:(?:\"(?:[^\"]|\"\")+\"|\\w+)\\.)?(?:\"(?:[^\"]|\"\")+\"|\\w+(?:${TYPE_MODIFIER})?(?:\\s+\\w+(?:${TYPE_MODIFIER})?)*)`;\nconst QUOTED_LITERAL_PATTERN = new RegExp(`^'((?:[^']|'')*)'(?:::(${TYPE_NAME}))?$`);\n/** A string constant with backslash escapes, `E'...'`, which PostgreSQL prints when `standard_conforming_strings` is off. */\nconst ESCAPE_STRING_LITERAL_PATTERN = new RegExp(String.raw`^[Ee]'((?:[^'\\\\]|\\\\.|'')*)'(?:::(${TYPE_NAME}))?$`, \"s\");\nconst NUMBER_LITERAL_PATTERN = new RegExp(`^(${NUMERAL})(?:::(${TYPE_NAME}))?$`);\nconst PARENTHESISED_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::(${TYPE_NAME})$`, \"s\");\nconst INTEGER_PATTERN = /^-?\\d+$/;\nconst INTEGER_TYPE_PATTERN = /^(?:smallint|integer|bigint|int2|int4|int8)$/i;\nconst NUMBER_TYPE_PATTERN = new RegExp(`^(?:smallint|integer|bigint|int2|int4|int8|real|double precision|float4|float8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\n/**\n* Matches a Postgres array literal default of the form `'{...}'::elemtype[]`.\n* The literal body is captured in group 1; the cast (including `[]`) is optional.\n* Examples: `'{}'::text[]`, `'{1,2}'::integer[]`, `'{}'`\n*/\nconst ARRAY_LITERAL_PATTERN = /^'(\\{.*\\})'(?:::.+\\[\\])?$/;\n/**\n* Matches the constructor spelling Postgres reports for a default written as\n* `ARRAY[...]`: `ARRAY['a'::text, 'b'::text]`, `ARRAY[1, 2]`, `ARRAY[]::text[]`.\n* The element list is captured in group 1; the outer cast is optional.\n*/\nconst ARRAY_CONSTRUCTOR_PATTERN = new RegExp(String.raw`^ARRAY\\[(.*?)\\](?:::${TYPE_NAME}\\[\\])?$`, \"is\");\nconst OUTER_ARRAY_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::${TYPE_NAME}\\[\\]$`, \"s\");\n/**\n* Returns the canonical expression for a timestamp default function, or undefined\n* if the expression is not a recognized timestamp default.\n*\n* Keeps now()/CURRENT_TIMESTAMP and clock_timestamp() distinct:\n* - now(), CURRENT_TIMESTAMP, ('now'::text)::timestamp... → 'now()'\n* - clock_timestamp(), clock_timestamp()::timestamptz → 'clock_timestamp()'\n*\n* These are semantically different in Postgres: now() returns the transaction\n* start time (constant within a transaction), while clock_timestamp() returns\n* the actual wall-clock time (can differ across rows in a single INSERT).\n*/\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\n/**\n* A numeral cast to a number type. A cast to an integer type rounds a fraction, so that numeral is\n* not the value.\n*/\nfunction castNumber(numeral, castType) {\n\tif (castType === void 0) return {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n\tif (!NUMBER_TYPE_PATTERN.test(castType)) return void 0;\n\tif (INTEGER_TYPE_PATTERN.test(castType) && !INTEGER_PATTERN.test(numeral)) return void 0;\n\treturn {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n}\n/**\n* Reads a literal by its cast type: `'-1'::integer` and `(1)::bigint` are numbers, `'a'::text` is a\n* string. A parenthesised cast is read only from number to number: `('now'::text)::date` is\n* evaluated on insert. Anything else, such as an operator or a function call, is not a literal.\n*/\nfunction readLiteralToken(expression) {\n\tconst escaped = ESCAPE_STRING_LITERAL_PATTERN.exec(expression);\n\tconst quoted = escaped ?? QUOTED_LITERAL_PATTERN.exec(expression);\n\tif (quoted?.[1] !== void 0) {\n\t\tconst text = escaped === null ? quoted[1].replace(/''/g, \"'\") : unescapeEscapeString(quoted[1]);\n\t\tconst castType = quoted[2];\n\t\treturn castType !== void 0 && NUMBER_TYPE_PATTERN.test(castType) && NUMERIC_PATTERN.test(text) ? castNumber(text, castType) : {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NUMBER_LITERAL_PATTERN.exec(expression);\n\tif (number?.[1] !== void 0) return castNumber(number[1], number[2]);\n\tconst parenthesised = PARENTHESISED_CAST_PATTERN.exec(expression);\n\tif (parenthesised?.[1] === void 0 || parenthesised[2] === void 0) return void 0;\n\tconst inner = readLiteralToken(parenthesised[1].trim());\n\treturn inner?.kind === \"number\" ? castNumber(inner.numeral, parenthesised[2]) : void 0;\n}\n/**\n* Splits a Postgres array literal body (without the enclosing braces) into its\n* element tokens, honouring quoting. A comma only separates elements when it is\n* outside double quotes; inside a quoted element a doubled quote (`\"\"`) or a\n* backslash-escaped quote (`\\\"`) is a literal quote, and a backslash escapes the\n* next character. Returns undefined if the body is malformed (e.g. an unbalanced\n* quote), nests an array, which puts a brace outside quotes, or escapes a character outside\n* quotes with a backslash, which Postgres never prints.\n*/\nfunction splitArrayElements(inner) {\n\tconst tokens = [];\n\tlet current = \"\";\n\tlet inQuotes = false;\n\tlet quoted = false;\n\tfor (let i = 0; i < inner.length; i++) {\n\t\tconst char = inner[i];\n\t\tif (inQuotes) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\tconst next = inner[i + 1];\n\t\t\t\tif (next === void 0) return void 0;\n\t\t\t\tcurrent += next;\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\"\") {\n\t\t\t\tif (inner[i + 1] === \"\\\"\") {\n\t\t\t\t\tcurrent += \"\\\"\";\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tinQuotes = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcurrent += char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tinQuotes = true;\n\t\t\tquoted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"{\" || char === \"}\" || char === \"\\\\\") return void 0;\n\t\tif (char === \",\") {\n\t\t\ttokens.push({\n\t\t\t\tvalue: current,\n\t\t\t\tquoted\n\t\t\t});\n\t\t\tcurrent = \"\";\n\t\t\tquoted = false;\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\tif (inQuotes) return void 0;\n\ttokens.push({\n\t\tvalue: current,\n\t\tquoted\n\t});\n\treturn tokens;\n}\n/**\n* Splits an `ARRAY[...]` element list on the commas outside quotes and parentheses, so\n* `numeric(65,30)` and `'a,b'` stay inside one element. A doubled quote inside an element is a\n* literal quote, so it never closes one.\n*/\nfunction splitConstructorElements(body) {\n\tconst elements = [];\n\tlet current = \"\";\n\tlet quote;\n\tlet depth = 0;\n\tfor (const char of body) {\n\t\tif (quote !== void 0) {\n\t\t\tif (char === quote) quote = void 0;\n\t\t} else if (char === \"'\" || char === \"\\\"\") quote = char;\n\t\telse if (char === \"(\") depth++;\n\t\telse if (char === \")\") depth--;\n\t\telse if (char === \",\" && depth === 0) {\n\t\t\telements.push(current);\n\t\t\tcurrent = \"\";\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\telements.push(current);\n\treturn elements.map((element) => element.trim());\n}\nfunction unwrapOuterArrayCasts(expression) {\n\tconst match = OUTER_ARRAY_CAST_PATTERN.exec(expression);\n\treturn match?.[1] === void 0 ? expression : unwrapOuterArrayCasts(match[1].trim());\n}\nconst BACKSLASH_ESCAPES = {\n\tb: \"\\b\",\n\tf: \"\\f\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\"\n};\n/** The text of an `E'...'` string constant: a doubled quote is a quote, and a backslash escapes the next character, an octal byte or a hexadecimal byte. */\nfunction unescapeEscapeString(body) {\n\treturn body.replace(/''|\\\\([0-7]{1,3}|x[0-9A-Fa-f]{1,2}|.)/gs, (_match, escaped) => {\n\t\tif (escaped === void 0) return \"'\";\n\t\tif (/^[0-7]/.test(escaped)) return String.fromCharCode(Number.parseInt(escaped, 8));\n\t\tif (escaped.startsWith(\"x\") && escaped.length > 1) return String.fromCharCode(Number.parseInt(escaped.slice(1), 16));\n\t\treturn BACKSLASH_ESCAPES[escaped] ?? escaped;\n\t});\n}\nfunction functionDefault(expression) {\n\treturn {\n\t\tkind: \"function\",\n\t\texpression\n\t};\n}\n/**\n* Reads a column's reported default. A list column (`many`) has a literal that is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.\n*/\nfunction readPostgresDefault(rawDefault, many) {\n\tconst trimmed = rawDefault.trim();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return functionDefault(\"autoincrement()\");\n\tif (NULL_PATTERN.test(trimmed)) return { kind: \"null\" };\n\tif (many) {\n\t\tconst elements = listElementBodies(trimmed);\n\t\treturn elements === void 0 ? functionDefault(trimmed) : {\n\t\t\tkind: \"literal\",\n\t\t\tliteral: {\n\t\t\t\tkind: \"list\",\n\t\t\t\telements\n\t\t\t}\n\t\t};\n\t}\n\tconst timestampFunction = canonicalizeTimestampDefault(trimmed);\n\tif (timestampFunction !== void 0) return functionDefault(timestampFunction);\n\tif (UUID_PATTERN.test(trimmed) || UUID_OSSP_PATTERN.test(trimmed)) return functionDefault(\"gen_random_uuid()\");\n\tconst body = literalBody(trimmed);\n\treturn body === void 0 ? functionDefault(trimmed) : {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody\n\t\t}\n\t};\n}\n/** The body of a scalar literal: `true`, `false`, a numeral, or the text of a quoted string. */\nfunction literalBody(expression) {\n\tif (TRUE_PATTERN.test(expression)) return \"true\";\n\tif (FALSE_PATTERN.test(expression)) return \"false\";\n\tconst token = readLiteralToken(expression);\n\tif (token === void 0) return void 0;\n\treturn token.kind === \"number\" ? token.numeral : token.text;\n}\n/** The element bodies of a list literal, with `null` for SQL NULL, or `undefined` when the default is not a list of literals. */\nfunction listElementBodies(expression) {\n\tconst arrayLiteral = ARRAY_LITERAL_PATTERN.exec(expression)?.[1];\n\tif (arrayLiteral !== void 0) return arrayLiteralElements(arrayLiteral.replace(/''/g, \"'\"));\n\tconst constructed = ARRAY_CONSTRUCTOR_PATTERN.exec(unwrapOuterArrayCasts(expression))?.[1];\n\tif (constructed === void 0) return void 0;\n\tif (constructed.trim() === \"\") return [];\n\tconst elements = [];\n\tfor (const element of splitConstructorElements(constructed)) {\n\t\tif (NULL_PATTERN.test(element)) {\n\t\t\telements.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tconst body = literalBody(element);\n\t\tif (body === void 0) return void 0;\n\t\telements.push(body);\n\t}\n\treturn elements;\n}\n/** The elements of an array literal (`{...}`): a quoted element is its text, and an unquoted `NULL` is SQL NULL. */\nfunction arrayLiteralElements(literal) {\n\tconst inner = literal.slice(1, -1).trim();\n\tif (inner === \"\") return [];\n\tconst tokens = splitArrayElements(inner);\n\tif (tokens === void 0) return void 0;\n\tconst elements = [];\n\tfor (const token of tokens) {\n\t\tif (token.quoted) {\n\t\t\telements.push(token.value);\n\t\t\tcontinue;\n\t\t}\n\t\tconst element = token.value.trim();\n\t\tif (element === \"\") return void 0;\n\t\telements.push(element.toUpperCase() === \"NULL\" ? null : element);\n\t}\n\treturn elements;\n}\n/**\n* Names a contract's expression default the way {@link readPostgresDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `CURRENT_TIMESTAMP` compare equal, and a `nextval(...)` default is `autoincrement()`. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.\n*/\nfunction postgresResolveDefault(def, column) {\n\tif (def.kind !== \"function\") return def;\n\tconst read = readPostgresDefault(def.expression, column.many);\n\treturn read.kind === \"function\" ? read : def;\n}\n//#endregion\nexport { readPostgresDefault as n, postgresResolveDefault as t };\n\n//# sourceMappingURL=default-normalizer-BqK6XxdC.mjs.map"],"mappings":";AACA,MAAM,kBAAkB;AACxB,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5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,MAAM,MAAM,KAAK;EACjC,IAAI,YAAY,IAAI,OAAO,KAAK;EAChC,SAAS,KAAK,QAAQ,YAAY,MAAM,SAAS,OAAO,OAAO;CAChE;CACA,OAAO;AACR;;;;AAIA,SAAS,uBAAuB,KAAK,QAAQ;CAC5C,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,MAAM,OAAO,oBAAoB,IAAI,YAAY,OAAO,IAAI;CAC5D,OAAO,KAAK,SAAS,aAAa,OAAO;AAC1C"}
@@ -1,4 +1,4 @@
1
- import { ReportedLiteralDefault } from "@prisma/orm-family-sql/family/control";
1
+ import { DefaultResolverColumn, ReportedLiteralDefault } from "@prisma/orm-family-sql/family/control";
2
2
  import { ColumnDefault } from "@prisma/orm-framework/contract/types";
3
3
  //#region ../../../3-targets/3-targets/postgres/dist/default-normalizer.d.mts
4
4
  //#region src/core/default-normalizer.d.ts
@@ -13,13 +13,13 @@ type PostgresReportedDefault = {
13
13
  readonly literal: ReportedLiteralDefault;
14
14
  };
15
15
  /**
16
- * Reads a column's reported default. `nativeType` ends in `[]` for a list column, whose literal is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.
16
+ * Reads a column's reported default. A list column (`many`) has a literal that is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.
17
17
  */
18
- declare function readPostgresDefault(rawDefault: string, nativeType?: string): PostgresReportedDefault;
18
+ declare function readPostgresDefault(rawDefault: string, many: boolean): PostgresReportedDefault;
19
19
  /**
20
20
  * Names a contract's expression default the way {@link readPostgresDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `CURRENT_TIMESTAMP` compare equal, and a `nextval(...)` default is `autoincrement()`. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.
21
21
  */
22
- declare function postgresResolveDefault(def: ColumnDefault, resolvedNativeType: string): ColumnDefault;
22
+ declare function postgresResolveDefault(def: ColumnDefault, column: DefaultResolverColumn): ColumnDefault;
23
23
  //#endregion
24
24
  export { postgresResolveDefault as n, readPostgresDefault as r, PostgresReportedDefault as t };
25
- //# sourceMappingURL=default-normalizer-CTAiFe9Y.d.mts.map
25
+ //# sourceMappingURL=default-normalizer-P-u2VRBf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-normalizer-P-u2VRBf.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer.d.mts"],"mappings":";;;;;KAIK;WACM;WACA;;WAEA;;WAEA;WACA,SAAS;;;;;iBAKH,oBAAoB,oBAAoB,gBAAgB;;;;iBAIxD,uBAAuB,KAAK,eAAe,QAAQ,wBAAwB"}
@@ -1,12 +1,12 @@
1
1
  import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
2
- import { M as postgresQualifyColumnType } from "./codecs-D183NDmb-DKryvPH2.mjs";
3
- import { h as postgresCreateNamespace } from "./postgres-schema-BtW3Sw0F-CH3NqoOo.mjs";
4
- import { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from "./authoring-mmK5aduF-BltVG_HJ.mjs";
5
- import { t as postgresRenderCheckExpressions } from "./check-expressions-DoxKokL1-RVvYRdA6.mjs";
6
- import { t as postgresDataTypeEntries } from "./data-type-entries-KJ4Mn8C5-DY3rLz33.mjs";
7
- import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-CMaPJG46-CPYTMJ7t.mjs";
2
+ import { M as postgresQualifyColumnType } from "./codecs-UZ1NEbvk-CMnI6Ti0.mjs";
3
+ import { h as postgresCreateNamespace } from "./postgres-schema-DyUXtYIT-vb-RxpRN.mjs";
4
+ import { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from "./authoring-DhyLHFHA-pB4NuFxh.mjs";
5
+ import { t as postgresRenderCheckExpressions } from "./check-expressions-7uCCP01t-WtUqfqkP.mjs";
6
+ import { t as postgresDataTypeEntries } from "./data-type-entries-CqnLlCkK-uN0WjREd.mjs";
7
+ import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-C1AjrKaP-CYer0qt7.mjs";
8
8
  import { n as postgresIndexTypes } from "./index-types-BihjrAAq-ktkeKE97.mjs";
9
- //#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-axWY-kHl.mjs
9
+ //#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-Bzs7kSyA.mjs
10
10
  const postgresTargetDescriptorMeta = {
11
11
  ...postgresTargetDescriptorMetaRuntime,
12
12
  defaultNamespaceId: DEFAULT_NAMESPACE_ID,
@@ -33,4 +33,4 @@ const postgresTargetDescriptorMeta = {
33
33
  //#endregion
34
34
  export { postgresTargetDescriptorMeta as t };
35
35
 
36
- //# sourceMappingURL=descriptor-meta-axWY-kHl-Bt2_NjH4.mjs.map
36
+ //# sourceMappingURL=descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-axWY-kHl-Bt2_NjH4.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-axWY-kHl.mjs"],"sourcesContent":["import { t as postgresDataTypeEntries } from \"./data-type-entries-KJ4Mn8C5.mjs\";\nimport { E as postgresQualifyColumnType } from \"./codecs-D183NDmb.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from \"./authoring-mmK5aduF.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-BtW3Sw0F.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-DoxKokL1.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-CMaPJG46.mjs\";\nimport { n as postgresIndexTypes } from \"./index-types-BihjrAAq.mjs\";\nconst postgresTargetDescriptorMeta = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tindexTypes: postgresIndexTypes,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tfield: postgresAuthoringFieldPresets,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tentityTypes: postgresAuthoringEntityTypes,\n\t\tpslBlockDescriptors: postgresAuthoringPslBlockDescriptors,\n\t\tmodelAttributes: postgresAuthoringModelAttributes,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tqualifyColumnType: postgresQualifyColumnType,\n\t\trenderCheckExpressions: postgresRenderCheckExpressions,\n\t\tlowerEntityHandles: postgresLowerEntityHandles\n\t},\n\ttypes: { queryOperationTypes: { import: {\n\t\tpackage: \"@internal/target-postgres/operation-types\",\n\t\tnamed: \"QueryOperationTypes\",\n\t\talias: \"PgTargetQueryOps\"\n\t} } }\n};\n//#endregion\nexport { postgresTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-axWY-kHl.mjs.map"],"mappings":";;;;;;;;;AAQA,MAAM,+BAA+B;CACpC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,YAAY;CACZ,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,wBAAwB;EACnC,aAAa;EACb,qBAAqB;EACrB,iBAAiB;EACjB,iBAAiB;EACjB,mBAAmB;EACnB,wBAAwB;EACxB,oBAAoB;CACrB;CACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ;EACvC,SAAS;EACT,OAAO;EACP,OAAO;CACR,EAAE,EAAE;AACL"}
1
+ {"version":3,"file":"descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-Bzs7kSyA.mjs"],"sourcesContent":["import { t as postgresDataTypeEntries } from \"./data-type-entries-CqnLlCkK.mjs\";\nimport { E as postgresQualifyColumnType } from \"./codecs-UZ1NEbvk.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from \"./authoring-DhyLHFHA.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DyUXtYIT.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-7uCCP01t.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-C1AjrKaP.mjs\";\nimport { n as postgresIndexTypes } from \"./index-types-BihjrAAq.mjs\";\nconst postgresTargetDescriptorMeta = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tindexTypes: postgresIndexTypes,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tfield: postgresAuthoringFieldPresets,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tentityTypes: postgresAuthoringEntityTypes,\n\t\tpslBlockDescriptors: postgresAuthoringPslBlockDescriptors,\n\t\tmodelAttributes: postgresAuthoringModelAttributes,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tqualifyColumnType: postgresQualifyColumnType,\n\t\trenderCheckExpressions: postgresRenderCheckExpressions,\n\t\tlowerEntityHandles: postgresLowerEntityHandles\n\t},\n\ttypes: { queryOperationTypes: { import: {\n\t\tpackage: \"@internal/target-postgres/operation-types\",\n\t\tnamed: \"QueryOperationTypes\",\n\t\talias: \"PgTargetQueryOps\"\n\t} } }\n};\n//#endregion\nexport { postgresTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-Bzs7kSyA.mjs.map"],"mappings":";;;;;;;;;AAQA,MAAM,+BAA+B;CACpC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,YAAY;CACZ,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,wBAAwB;EACnC,aAAa;EACb,qBAAqB;EACrB,iBAAiB;EACjB,iBAAiB;EACjB,mBAAmB;EACnB,wBAAwB;EACxB,oBAAoB;CACrB;CACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ;EACvC,SAAS;EACT,OAAO;EACP,OAAO;CACR,EAAE,EAAE;AACL"}
@@ -1,6 +1,6 @@
1
- import { o as postgresCodecRegistry } from "./codec-registry-CvKdYTYj-4xXqgKKs.mjs";
2
- import { r as postgresAdapterContractContributions } from "./contract-contributions-DrHk5h_E-BbmViVsC.mjs";
3
- //#region ../../../3-targets/6-adapters/postgres/dist/descriptor-meta-CvJvXGfx.mjs
1
+ import { o as postgresCodecRegistry } from "./codec-registry-T79ktJL4-B9_zlIhI.mjs";
2
+ import { r as postgresAdapterContractContributions } from "./contract-contributions-CQqafzSC-DrMFSSO4.mjs";
3
+ //#region ../../../3-targets/6-adapters/postgres/dist/descriptor-meta-DDh7-s6c.mjs
4
4
  const postgresAdapterDescriptorMeta = {
5
5
  kind: "adapter",
6
6
  familyId: "sql",
@@ -33,4 +33,4 @@ const postgresAdapterDescriptorMeta = {
33
33
  //#endregion
34
34
  export { postgresAdapterDescriptorMeta as t };
35
35
 
36
- //# sourceMappingURL=descriptor-meta-CvJvXGfx-CGIgsveo.mjs.map
36
+ //# sourceMappingURL=descriptor-meta-DDh7-s6c-D6qC3SDx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-CvJvXGfx-CGIgsveo.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/descriptor-meta-CvJvXGfx.mjs"],"sourcesContent":["import { t as postgresAdapterContractContributions } from \"./contract-contributions-DrHk5h_E.mjs\";\nimport { postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\n//#region src/core/descriptor-meta.ts\nconst postgresAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: postgresAdapterContractContributions.capabilities,\n\ttypes: {\n\t\taggregateDescriptors: postgresAdapterContractContributions.types.aggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgresCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PgTypes\"\n\t\t\t},\n\t\t\ttypeImports: [{\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"JsonValue\",\n\t\t\t\talias: \"JsonValue\"\n\t\t\t}],\n\t\t\tparameterizedOutputTypes: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"ParameterizedOutputTypesForTypeParams\",\n\t\t\t\talias: \"PgParameterizedOutputTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { postgresAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CvJvXGfx.mjs.map"],"mappings":";;;AAGA,MAAM,gCAAgC;CACrC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,qCAAqC;CACnD,OAAO;EACN,sBAAsB,qCAAqC,MAAM;EACjE,YAAY;GACX,kBAAkB,MAAM,KAAK,sBAAsB,OAAO,CAAC;GAC3D,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;GACA,aAAa,CAAC;IACb,SAAS;IACT,OAAO;IACP,OAAO;GACR,CAAC;GACD,0BAA0B;IACzB,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
1
+ {"version":3,"file":"descriptor-meta-DDh7-s6c-D6qC3SDx.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/descriptor-meta-DDh7-s6c.mjs"],"sourcesContent":["import { t as postgresAdapterContractContributions } from \"./contract-contributions-CQqafzSC.mjs\";\nimport { postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\n//#region src/core/descriptor-meta.ts\nconst postgresAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: postgresAdapterContractContributions.capabilities,\n\ttypes: {\n\t\taggregateDescriptors: postgresAdapterContractContributions.types.aggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgresCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PgTypes\"\n\t\t\t},\n\t\t\ttypeImports: [{\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"JsonValue\",\n\t\t\t\talias: \"JsonValue\"\n\t\t\t}],\n\t\t\tparameterizedOutputTypes: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"ParameterizedOutputTypesForTypeParams\",\n\t\t\t\talias: \"PgParameterizedOutputTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { postgresAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DDh7-s6c.mjs.map"],"mappings":";;;AAGA,MAAM,gCAAgC;CACrC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,qCAAqC;CACnD,OAAO;EACN,sBAAsB,qCAAqC,MAAM;EACjE,YAAY;GACX,kBAAkB,MAAM,KAAK,sBAAsB,OAAO,CAAC;GAC3D,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;GACA,aAAa,CAAC;IACb,SAAS;IACT,OAAO;IACP,OAAO;GACR,CAAC;GACD,0BAA0B;IACzB,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
@@ -1,5 +1,5 @@
1
- import { J as postgresDataTypes } from "./data-types-CQs1yW4F-CSexn8mK.mjs";
2
- //#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-CMaPJG46.mjs
1
+ import { J as postgresDataTypes } from "./data-types-Cs-LkJBw-CJN57Y5M.mjs";
2
+ //#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-C1AjrKaP.mjs
3
3
  const postgresTargetDescriptorMetaRuntime = {
4
4
  kind: "target",
5
5
  familyId: "sql",
@@ -12,4 +12,4 @@ const postgresTargetDescriptorMetaRuntime = {
12
12
  //#endregion
13
13
  export { postgresTargetDescriptorMetaRuntime as t };
14
14
 
15
- //# sourceMappingURL=descriptor-meta-runtime-CMaPJG46-CPYTMJ7t.mjs.map
15
+ //# sourceMappingURL=descriptor-meta-runtime-C1AjrKaP-CYer0qt7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-runtime-CMaPJG46-CPYTMJ7t.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-CMaPJG46.mjs"],"sourcesContent":["import { R as postgresDataTypes } from \"./data-types-CQs1yW4F.mjs\";\nconst postgresTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: postgresDataTypes\n};\n//#endregion\nexport { postgresTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-CMaPJG46.mjs.map"],"mappings":";;AACA,MAAM,sCAAsC;CAC3C,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ"}
1
+ {"version":3,"file":"descriptor-meta-runtime-C1AjrKaP-CYer0qt7.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-C1AjrKaP.mjs"],"sourcesContent":["import { R as postgresDataTypes } from \"./data-types-Cs-LkJBw.mjs\";\nconst postgresTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: postgresDataTypes\n};\n//#endregion\nexport { postgresTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-C1AjrKaP.mjs.map"],"mappings":";;AACA,MAAM,sCAAsC;CAC3C,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ"}
@@ -1,13 +1,13 @@
1
1
  import { c as postgresError } from "./errors-BrhQYgdL-D_lIrddD.mjs";
2
2
  import { n as FULL_TEXT_INDEX_TYPE, s as fullTextIndexDefinitionOf } from "./full-text-index-definition-BPxQQBuC-BrpDsuJu.mjs";
3
- import { d as isPostgresSchema } from "./postgres-schema-BtW3Sw0F-CH3NqoOo.mjs";
3
+ import { d as isPostgresSchema } from "./postgres-schema-DyUXtYIT-vb-RxpRN.mjs";
4
4
  import { t as postgresAccessMethodOf } from "./index-types-BihjrAAq-ktkeKE97.mjs";
5
5
  import { a as postgresDiffSubjectGranularity, n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
6
6
  import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
7
- import { t as postgresResolveDefault } from "./default-normalizer-BqFHmlox-CP8ywN-r.mjs";
8
- import { n as renderFullTextIndexDocument } from "./full-text-search-document-DbegbX0J-jrbc8kfp.mjs";
9
- import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-B8cX92k0-DzN6Alxy.mjs";
10
- import { d as resolvePostgresNodeIssueControlPolicySubject } from "./control-policy-BdfDPcjX-BueP9PBT.mjs";
7
+ import { t as postgresResolveDefault } from "./default-normalizer-BqK6XxdC-BAgxt9FF.mjs";
8
+ import { n as renderFullTextIndexDocument } from "./full-text-search-document-Doy5TF7c-DezgYsP-.mjs";
9
+ import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-IdPEiyLX-BZGpy8Wz.mjs";
10
+ import { d as resolvePostgresNodeIssueControlPolicySubject } from "./control-policy-BHjZnca1-DUWuKmdJ.mjs";
11
11
  import { blindCast } from "@prisma/orm-framework/utils/casts";
12
12
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
13
13
  import { diffSchemas, issueOutcome } from "@prisma/orm-framework/components/control";
@@ -16,7 +16,7 @@ import { ifDefined } from "@prisma/orm-framework/utils/defined";
16
16
  import { contractNamespaceToSchemaIR, sqlTypeLookupsOf } from "@prisma/orm-family-sql/family/control";
17
17
  import { PrimaryKey, RelationalSchemaNodeKind, SqlForeignKeyIR, SqlIndexIR, SqlUniqueIR } from "@prisma/orm-family-sql/schema-ir/types";
18
18
  import { classifyDiffSubjectGranularity } from "@prisma/orm-family-sql/family/diff";
19
- //#region ../../../3-targets/3-targets/postgres/dist/diff-database-schema-DLIpM5BX.mjs
19
+ //#region ../../../3-targets/3-targets/postgres/dist/diff-database-schema-DyCIRT80.mjs
20
20
  /** The database root's fixed sentinel id (`PostgresDatabaseSchemaNode#id`). */
21
21
  function databaseStep() {
22
22
  return {
@@ -406,4 +406,4 @@ function buildPostgresPlanDiff(input) {
406
406
  //#endregion
407
407
  export { contractToPostgresDatabaseSchemaNode as n, diffPostgresSchema as r, buildPostgresPlanDiff as t };
408
408
 
409
- //# sourceMappingURL=diff-database-schema-DLIpM5BX-DlEJquxk.mjs.map
409
+ //# sourceMappingURL=diff-database-schema-DyCIRT80-C1zMCmRx.mjs.map