@intentius/chant-lexicon-sql 0.116.0 → 0.118.0

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 (259) hide show
  1. package/dist/clickhouse/access.d.ts +132 -0
  2. package/dist/clickhouse/access.d.ts.map +1 -0
  3. package/dist/clickhouse/apply/apply.d.ts.map +1 -1
  4. package/dist/clickhouse/apply/statements.d.ts +2 -0
  5. package/dist/clickhouse/apply/statements.d.ts.map +1 -1
  6. package/dist/clickhouse/entities.d.ts +171 -2
  7. package/dist/clickhouse/entities.d.ts.map +1 -1
  8. package/dist/clickhouse/http.d.ts +3 -0
  9. package/dist/clickhouse/http.d.ts.map +1 -1
  10. package/dist/clickhouse/import/generator.d.ts +28 -0
  11. package/dist/clickhouse/import/generator.d.ts.map +1 -1
  12. package/dist/clickhouse/import/ir.d.ts.map +1 -1
  13. package/dist/clickhouse/import/parser.d.ts +3 -3
  14. package/dist/clickhouse/import/parser.d.ts.map +1 -1
  15. package/dist/clickhouse/live/bind.d.ts.map +1 -1
  16. package/dist/clickhouse/live/catalog.d.ts +41 -6
  17. package/dist/clickhouse/live/catalog.d.ts.map +1 -1
  18. package/dist/clickhouse/live/describe-resources.d.ts +3 -2
  19. package/dist/clickhouse/live/describe-resources.d.ts.map +1 -1
  20. package/dist/clickhouse/parser.d.ts +54 -3
  21. package/dist/clickhouse/parser.d.ts.map +1 -1
  22. package/dist/clickhouse/plan/commands.d.ts +3 -1
  23. package/dist/clickhouse/plan/commands.d.ts.map +1 -1
  24. package/dist/clickhouse/plan/deep.d.ts.map +1 -1
  25. package/dist/clickhouse/plan/diff.d.ts +12 -0
  26. package/dist/clickhouse/plan/diff.d.ts.map +1 -1
  27. package/dist/clickhouse/plan/normalize.d.ts +61 -1
  28. package/dist/clickhouse/plan/normalize.d.ts.map +1 -1
  29. package/dist/clickhouse/plan/report.d.ts.map +1 -1
  30. package/dist/clickhouse/plan/rules.d.ts +7 -0
  31. package/dist/clickhouse/plan/rules.d.ts.map +1 -1
  32. package/dist/clickhouse/plan/schema.d.ts +8 -4
  33. package/dist/clickhouse/plan/schema.d.ts.map +1 -1
  34. package/dist/clickhouse/rebuild/backfill.d.ts +3 -1
  35. package/dist/clickhouse/rebuild/backfill.d.ts.map +1 -1
  36. package/dist/clickhouse/rebuild/observe.d.ts +7 -3
  37. package/dist/clickhouse/rebuild/observe.d.ts.map +1 -1
  38. package/dist/clickhouse/rebuild/op.d.ts +8 -0
  39. package/dist/clickhouse/rebuild/op.d.ts.map +1 -1
  40. package/dist/clickhouse/rebuild/steps.d.ts +48 -0
  41. package/dist/clickhouse/rebuild/steps.d.ts.map +1 -1
  42. package/dist/clickhouse/testing/fake-server.d.ts.map +1 -1
  43. package/dist/clickhouse/testing/writable-server.d.ts.map +1 -1
  44. package/dist/clickhouse/topology.d.ts.map +1 -1
  45. package/dist/clickhouse.d.ts +1 -1
  46. package/dist/clickhouse.d.ts.map +1 -1
  47. package/dist/codegen/classifier-page.d.ts.map +1 -1
  48. package/dist/codegen/registry.d.ts.map +1 -1
  49. package/dist/config.d.ts +70 -7
  50. package/dist/config.d.ts.map +1 -1
  51. package/dist/core/references.d.ts +4 -2
  52. package/dist/core/references.d.ts.map +1 -1
  53. package/dist/core/statements.d.ts +11 -0
  54. package/dist/core/statements.d.ts.map +1 -1
  55. package/dist/files/build-root.d.ts +26 -0
  56. package/dist/files/build-root.d.ts.map +1 -0
  57. package/dist/files/clickhouse.d.ts +19 -0
  58. package/dist/files/clickhouse.d.ts.map +1 -0
  59. package/dist/files/common.d.ts +25 -0
  60. package/dist/files/common.d.ts.map +1 -0
  61. package/dist/files/postgres.d.ts +36 -0
  62. package/dist/files/postgres.d.ts.map +1 -0
  63. package/dist/import-parser.d.ts +25 -0
  64. package/dist/import-parser.d.ts.map +1 -0
  65. package/dist/index.d.ts +2 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/integrity.json +8 -8
  68. package/dist/lint/rules/sqlch001.d.ts +1 -1
  69. package/dist/lint/rules/sqlch001.d.ts.map +1 -1
  70. package/dist/lint/rules/sqlch002.d.ts.map +1 -1
  71. package/dist/lint/rules/sqlpg001.d.ts.map +1 -1
  72. package/dist/lint/rules/templates.d.ts +1 -1
  73. package/dist/lint/rules/templates.d.ts.map +1 -1
  74. package/dist/lsp/postgres-template.d.ts.map +1 -1
  75. package/dist/manifest.json +1 -1
  76. package/dist/meta.json +50 -0
  77. package/dist/okf/index.md +11 -1
  78. package/dist/okf/rules/SQLCH001.md +2 -2
  79. package/dist/okf/types/Dictionary.md +9 -0
  80. package/dist/okf/types/Function.md +9 -0
  81. package/dist/okf/types/Grant.md +9 -0
  82. package/dist/okf/types/PostgresDefaultPrivileges.md +9 -0
  83. package/dist/okf/types/PostgresGrant.md +9 -0
  84. package/dist/okf/types/PostgresPolicy.md +9 -0
  85. package/dist/okf/types/PostgresRole.md +9 -0
  86. package/dist/okf/types/Role.md +9 -0
  87. package/dist/okf/types/RowPolicy.md +9 -0
  88. package/dist/okf/types/User.md +9 -0
  89. package/dist/op/activities/clickhouse-rebuild.d.ts.map +1 -1
  90. package/dist/op/activities/postgres-migration.d.ts.map +1 -1
  91. package/dist/op/activity-contracts.d.ts +19 -0
  92. package/dist/op/activity-contracts.d.ts.map +1 -1
  93. package/dist/plugin.d.ts.map +1 -1
  94. package/dist/postgres/access/acl.d.ts +119 -0
  95. package/dist/postgres/access/acl.d.ts.map +1 -0
  96. package/dist/postgres/access/import.d.ts +13 -0
  97. package/dist/postgres/access/import.d.ts.map +1 -0
  98. package/dist/postgres/access/live.d.ts +24 -0
  99. package/dist/postgres/access/live.d.ts.map +1 -0
  100. package/dist/postgres/apply/apply.d.ts.map +1 -1
  101. package/dist/postgres/apply/statements.d.ts +71 -0
  102. package/dist/postgres/apply/statements.d.ts.map +1 -1
  103. package/dist/postgres/entities.d.ts +106 -4
  104. package/dist/postgres/entities.d.ts.map +1 -1
  105. package/dist/postgres/entity-types.d.ts +4 -0
  106. package/dist/postgres/entity-types.d.ts.map +1 -1
  107. package/dist/postgres/import/generator.d.ts +37 -1
  108. package/dist/postgres/import/generator.d.ts.map +1 -1
  109. package/dist/postgres/import/live-export.d.ts +6 -0
  110. package/dist/postgres/import/live-export.d.ts.map +1 -1
  111. package/dist/postgres/live/bind.d.ts +2 -0
  112. package/dist/postgres/live/bind.d.ts.map +1 -1
  113. package/dist/postgres/live/catalog.d.ts +11 -2
  114. package/dist/postgres/live/catalog.d.ts.map +1 -1
  115. package/dist/postgres/live/client.d.ts +3 -0
  116. package/dist/postgres/live/client.d.ts.map +1 -1
  117. package/dist/postgres/live/describe-resources.d.ts +9 -0
  118. package/dist/postgres/live/describe-resources.d.ts.map +1 -1
  119. package/dist/postgres/migrate/op.d.ts +29 -0
  120. package/dist/postgres/migrate/op.d.ts.map +1 -1
  121. package/dist/postgres/parser.d.ts +76 -3
  122. package/dist/postgres/parser.d.ts.map +1 -1
  123. package/dist/postgres/plan/commands.d.ts +12 -0
  124. package/dist/postgres/plan/commands.d.ts.map +1 -1
  125. package/dist/postgres/plan/deep.d.ts.map +1 -1
  126. package/dist/postgres/plan/diff.d.ts +10 -1
  127. package/dist/postgres/plan/diff.d.ts.map +1 -1
  128. package/dist/postgres/plan/normalize.d.ts +8 -1
  129. package/dist/postgres/plan/normalize.d.ts.map +1 -1
  130. package/dist/postgres/plan/rules.d.ts +8 -0
  131. package/dist/postgres/plan/rules.d.ts.map +1 -1
  132. package/dist/postgres/plan/schema.d.ts +2 -1
  133. package/dist/postgres/plan/schema.d.ts.map +1 -1
  134. package/dist/postgres/plan/server-normalize.d.ts +4 -1
  135. package/dist/postgres/plan/server-normalize.d.ts.map +1 -1
  136. package/dist/postgres.d.ts +1 -1
  137. package/dist/postgres.d.ts.map +1 -1
  138. package/dist/rules/postgres-templates.ts +2 -2
  139. package/dist/rules/sqlch001.ts +26 -4
  140. package/dist/rules/sqlch002.ts +3 -2
  141. package/dist/rules/sqlpg001.ts +7 -4
  142. package/dist/rules/templates.ts +2 -2
  143. package/dist/serializer.d.ts +2 -1
  144. package/dist/serializer.d.ts.map +1 -1
  145. package/dist/sql-files.d.ts +79 -0
  146. package/dist/sql-files.d.ts.map +1 -0
  147. package/dist/token-source.d.ts +88 -0
  148. package/dist/token-source.d.ts.map +1 -0
  149. package/dist/validate.d.ts.map +1 -1
  150. package/package.json +2 -2
  151. package/src/clickhouse/access.test.ts +203 -0
  152. package/src/clickhouse/access.ts +595 -0
  153. package/src/clickhouse/apply/apply.ts +29 -20
  154. package/src/clickhouse/apply/statements.ts +105 -8
  155. package/src/clickhouse/dictionary.test.ts +177 -0
  156. package/src/clickhouse/entities.ts +356 -6
  157. package/src/clickhouse/function.test.ts +91 -0
  158. package/src/clickhouse/http.ts +11 -2
  159. package/src/clickhouse/import/generator.ts +81 -46
  160. package/src/clickhouse/import/import.test.ts +9 -3
  161. package/src/clickhouse/import/ir.ts +6 -2
  162. package/src/clickhouse/import/parser.ts +10 -18
  163. package/src/clickhouse/live/access.e2e.test.ts +218 -0
  164. package/src/clickhouse/live/bind.ts +17 -6
  165. package/src/clickhouse/live/catalog.ts +106 -10
  166. package/src/clickhouse/live/describe-resources.ts +23 -10
  167. package/src/clickhouse/live/dictionaries.e2e.test.ts +186 -0
  168. package/src/clickhouse/live/functions.e2e.test.ts +155 -0
  169. package/src/clickhouse/live/live.test.ts +2 -2
  170. package/src/clickhouse/parser.ts +136 -4
  171. package/src/clickhouse/plan/commands.ts +18 -7
  172. package/src/clickhouse/plan/deep.ts +71 -11
  173. package/src/clickhouse/plan/diff.ts +65 -2
  174. package/src/clickhouse/plan/normalize.ts +200 -6
  175. package/src/clickhouse/plan/report.ts +14 -3
  176. package/src/clickhouse/plan/rules.ts +44 -1
  177. package/src/clickhouse/plan/schema.ts +40 -17
  178. package/src/clickhouse/plan/server-format.ts +1 -1
  179. package/src/clickhouse/rebuild/backfill.ts +5 -25
  180. package/src/clickhouse/rebuild/observe.ts +7 -3
  181. package/src/clickhouse/rebuild/op.ts +9 -0
  182. package/src/clickhouse/rebuild/rebuild.e2e.test.ts +62 -0
  183. package/src/clickhouse/rebuild/rebuild.test.ts +54 -0
  184. package/src/clickhouse/rebuild/steps.ts +136 -1
  185. package/src/clickhouse/testing/fake-server.ts +2 -0
  186. package/src/clickhouse/testing/writable-server.ts +2 -0
  187. package/src/clickhouse/topology.ts +17 -2
  188. package/src/clickhouse.ts +19 -0
  189. package/src/codegen/classifier-page.ts +2 -0
  190. package/src/codegen/registry.ts +10 -0
  191. package/src/config.ts +22 -3
  192. package/src/core/references.ts +5 -3
  193. package/src/core/statements.ts +11 -1
  194. package/src/files/build-root.ts +62 -0
  195. package/src/files/clickhouse.ts +52 -0
  196. package/src/files/common.ts +54 -0
  197. package/src/files/postgres.ts +371 -0
  198. package/src/generated/lexicon-sql.json +50 -0
  199. package/src/import-parser.ts +61 -0
  200. package/src/index.ts +14 -1
  201. package/src/lint/rules/postgres-templates.ts +2 -2
  202. package/src/lint/rules/sqlch001.ts +26 -4
  203. package/src/lint/rules/sqlch002.ts +3 -2
  204. package/src/lint/rules/sqlpg001.ts +7 -4
  205. package/src/lint/rules/templates.ts +2 -2
  206. package/src/lsp/postgres-template.ts +2 -0
  207. package/src/lsp/template.ts +3 -3
  208. package/src/mcp/index.ts +6 -6
  209. package/src/mcp/postgres.ts +1 -1
  210. package/src/migration-statements.test.ts +25 -0
  211. package/src/migration-statements.ts +8 -0
  212. package/src/op/activities/clickhouse-rebuild.ts +1 -0
  213. package/src/op/activities/postgres-migration.ts +27 -2
  214. package/src/op/activity-contracts.ts +2 -0
  215. package/src/plugin.ts +29 -5
  216. package/src/postgres/access/access.e2e.test.ts +191 -0
  217. package/src/postgres/access/access.test.ts +147 -0
  218. package/src/postgres/access/acl.ts +400 -0
  219. package/src/postgres/access/import.ts +64 -0
  220. package/src/postgres/access/live.ts +123 -0
  221. package/src/postgres/apply/apply.ts +117 -4
  222. package/src/postgres/apply/constraint-sequences.e2e.test.ts +179 -0
  223. package/src/postgres/apply/safe-sequences.e2e.test.ts +176 -0
  224. package/src/postgres/apply/statements.test.ts +138 -6
  225. package/src/postgres/apply/statements.ts +210 -18
  226. package/src/postgres/entities.ts +287 -11
  227. package/src/postgres/entity-types.ts +4 -0
  228. package/src/postgres/import/generator.ts +129 -46
  229. package/src/postgres/import/live-export.ts +12 -2
  230. package/src/postgres/live/bind.ts +20 -6
  231. package/src/postgres/live/catalog.ts +79 -3
  232. package/src/postgres/live/client.ts +10 -2
  233. package/src/postgres/live/describe-resources.ts +27 -3
  234. package/src/postgres/migrate/migrate.test.ts +24 -1
  235. package/src/postgres/migrate/op.ts +80 -35
  236. package/src/postgres/migrate/outer.e2e.test.ts +163 -0
  237. package/src/postgres/parser.ts +247 -8
  238. package/src/postgres/plan/commands.ts +60 -7
  239. package/src/postgres/plan/deep.ts +24 -3
  240. package/src/postgres/plan/diff.ts +71 -6
  241. package/src/postgres/plan/normalize.ts +115 -2
  242. package/src/postgres/plan/plan.test.ts +2 -2
  243. package/src/postgres/plan/rules.ts +49 -5
  244. package/src/postgres/plan/schema.ts +4 -2
  245. package/src/postgres/plan/server-normalize.ts +29 -1
  246. package/src/postgres.ts +11 -0
  247. package/src/serializer.ts +14 -9
  248. package/src/skill-defs.ts +1 -1
  249. package/src/skills/chant-sql-postgres-migration.md +3 -1
  250. package/src/skills/chant-sql-postgres-plan.md +3 -3
  251. package/src/skills/chant-sql-postgres.md +9 -2
  252. package/src/skills/chant-sql-rebuild.md +3 -2
  253. package/src/skills/chant-sql.md +7 -1
  254. package/src/sql-files.test.ts +188 -0
  255. package/src/sql-files.ts +218 -0
  256. package/src/token-source.e2e.test.ts +142 -0
  257. package/src/token-source.test.ts +119 -0
  258. package/src/token-source.ts +189 -0
  259. package/src/validate.ts +10 -0
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: PostgresGrant
4
+ description: sql resource type Postgres::Grant
5
+ name: PostgresGrant
6
+ lexicon: sql
7
+ resource_type: Postgres::Grant
8
+ ---
9
+ `Postgres::Grant`, a resource type of the sql lexicon.
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: PostgresPolicy
4
+ description: sql resource type Postgres::Policy
5
+ name: PostgresPolicy
6
+ lexicon: sql
7
+ resource_type: Postgres::Policy
8
+ ---
9
+ `Postgres::Policy`, a resource type of the sql lexicon.
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: PostgresRole
4
+ description: sql resource type Postgres::Role
5
+ name: PostgresRole
6
+ lexicon: sql
7
+ resource_type: Postgres::Role
8
+ ---
9
+ `Postgres::Role`, a resource type of the sql lexicon.
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: Role
4
+ description: sql resource type ClickHouse::Role
5
+ name: Role
6
+ lexicon: sql
7
+ resource_type: ClickHouse::Role
8
+ ---
9
+ `ClickHouse::Role`, a resource type of the sql lexicon.
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: RowPolicy
4
+ description: sql resource type ClickHouse::RowPolicy
5
+ name: RowPolicy
6
+ lexicon: sql
7
+ resource_type: ClickHouse::RowPolicy
8
+ ---
9
+ `ClickHouse::RowPolicy`, a resource type of the sql lexicon.
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: User
4
+ description: sql resource type ClickHouse::User
5
+ name: User
6
+ lexicon: sql
7
+ resource_type: ClickHouse::User
8
+ ---
9
+ `ClickHouse::User`, a resource type of the sql lexicon.
@@ -1 +1 @@
1
- {"version":3,"file":"clickhouse-rebuild.d.ts","sourceRoot":"","sources":["../../../src/op/activities/clickhouse-rebuild.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OA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AAI,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,YAAY,CAAC,CAExJ;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,YAAY,CAAC,CAExJ;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,YAAY,CAAC,CAExJ;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,cAAc,CAAC,CAE5J;AAED,6CAA6C;AAC7C,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAEhK"}
@@ -27,6 +27,7 @@ export declare const clickhouseRebuildPlanContract: import("@intentius/chant/op"
27
27
  retain?: string | undefined;
28
28
  mutationTimeout?: string | undefined;
29
29
  replicaTimeout?: string | undefined;
30
+ cutoverTimeout?: string | undefined;
30
31
  stack?: string | undefined;
31
32
  ownershipEnv?: string | undefined;
32
33
  cwd?: string | undefined;
@@ -52,6 +53,7 @@ export declare const clickhouseRebuildCreateContract: import("@intentius/chant/o
52
53
  retain?: string | undefined;
53
54
  mutationTimeout?: string | undefined;
54
55
  replicaTimeout?: string | undefined;
56
+ cutoverTimeout?: string | undefined;
55
57
  stack?: string | undefined;
56
58
  ownershipEnv?: string | undefined;
57
59
  cwd?: string | undefined;
@@ -75,6 +77,7 @@ export declare const clickhouseRebuildDualWriteContract: import("@intentius/chan
75
77
  retain?: string | undefined;
76
78
  mutationTimeout?: string | undefined;
77
79
  replicaTimeout?: string | undefined;
80
+ cutoverTimeout?: string | undefined;
78
81
  stack?: string | undefined;
79
82
  ownershipEnv?: string | undefined;
80
83
  cwd?: string | undefined;
@@ -99,6 +102,7 @@ export declare const clickhouseRebuildBackfillContract: import("@intentius/chant
99
102
  retain?: string | undefined;
100
103
  mutationTimeout?: string | undefined;
101
104
  replicaTimeout?: string | undefined;
105
+ cutoverTimeout?: string | undefined;
102
106
  stack?: string | undefined;
103
107
  ownershipEnv?: string | undefined;
104
108
  cwd?: string | undefined;
@@ -124,6 +128,7 @@ export declare const clickhouseRebuildVerifyContract: import("@intentius/chant/o
124
128
  retain?: string | undefined;
125
129
  mutationTimeout?: string | undefined;
126
130
  replicaTimeout?: string | undefined;
131
+ cutoverTimeout?: string | undefined;
127
132
  stack?: string | undefined;
128
133
  ownershipEnv?: string | undefined;
129
134
  cwd?: string | undefined;
@@ -154,6 +159,7 @@ export declare const clickhouseRebuildSwapContract: import("@intentius/chant/op"
154
159
  retain?: string | undefined;
155
160
  mutationTimeout?: string | undefined;
156
161
  replicaTimeout?: string | undefined;
162
+ cutoverTimeout?: string | undefined;
157
163
  stack?: string | undefined;
158
164
  ownershipEnv?: string | undefined;
159
165
  cwd?: string | undefined;
@@ -179,6 +185,7 @@ export declare const clickhouseRebuildRetainContract: import("@intentius/chant/o
179
185
  retain?: string | undefined;
180
186
  mutationTimeout?: string | undefined;
181
187
  replicaTimeout?: string | undefined;
188
+ cutoverTimeout?: string | undefined;
182
189
  stack?: string | undefined;
183
190
  ownershipEnv?: string | undefined;
184
191
  cwd?: string | undefined;
@@ -204,6 +211,7 @@ export declare const clickhouseRebuildDropContract: import("@intentius/chant/op"
204
211
  retain?: string | undefined;
205
212
  mutationTimeout?: string | undefined;
206
213
  replicaTimeout?: string | undefined;
214
+ cutoverTimeout?: string | undefined;
207
215
  stack?: string | undefined;
208
216
  ownershipEnv?: string | undefined;
209
217
  cwd?: string | undefined;
@@ -228,6 +236,7 @@ export declare const clickhouseRebuildCompensateContract: import("@intentius/cha
228
236
  retain?: string | undefined;
229
237
  mutationTimeout?: string | undefined;
230
238
  replicaTimeout?: string | undefined;
239
+ cutoverTimeout?: string | undefined;
231
240
  stack?: string | undefined;
232
241
  ownershipEnv?: string | undefined;
233
242
  cwd?: string | undefined;
@@ -252,6 +261,7 @@ export declare const postgresMigrationPlanContract: import("@intentius/chant/op"
252
261
  stack?: string | undefined;
253
262
  ownershipEnv?: string | undefined;
254
263
  cwd?: string | undefined;
264
+ keepOnFailure?: boolean | undefined;
255
265
  }, {
256
266
  state: "done" | "migrate" | "switched";
257
267
  migration: string;
@@ -277,6 +287,7 @@ export declare const postgresMigrationExpandContract: import("@intentius/chant/o
277
287
  stack?: string | undefined;
278
288
  ownershipEnv?: string | undefined;
279
289
  cwd?: string | undefined;
290
+ keepOnFailure?: boolean | undefined;
280
291
  }, {
281
292
  state: "done" | "migrate" | "switched";
282
293
  column: string;
@@ -299,6 +310,7 @@ export declare const postgresMigrationDualWriteContract: import("@intentius/chan
299
310
  stack?: string | undefined;
300
311
  ownershipEnv?: string | undefined;
301
312
  cwd?: string | undefined;
313
+ keepOnFailure?: boolean | undefined;
302
314
  }, {
303
315
  state: "done" | "migrate" | "switched";
304
316
  trigger: string;
@@ -321,6 +333,7 @@ export declare const postgresMigrationBackfillContract: import("@intentius/chant
321
333
  stack?: string | undefined;
322
334
  ownershipEnv?: string | undefined;
323
335
  cwd?: string | undefined;
336
+ keepOnFailure?: boolean | undefined;
324
337
  }, {
325
338
  state: "done" | "migrate" | "switched";
326
339
  batches: number;
@@ -346,6 +359,7 @@ export declare const postgresMigrationCarryContract: import("@intentius/chant/op
346
359
  stack?: string | undefined;
347
360
  ownershipEnv?: string | undefined;
348
361
  cwd?: string | undefined;
362
+ keepOnFailure?: boolean | undefined;
349
363
  }, {
350
364
  state: "done" | "migrate" | "switched";
351
365
  built: number;
@@ -370,6 +384,7 @@ export declare const postgresMigrationVerifyContract: import("@intentius/chant/o
370
384
  stack?: string | undefined;
371
385
  ownershipEnv?: string | undefined;
372
386
  cwd?: string | undefined;
387
+ keepOnFailure?: boolean | undefined;
373
388
  }, {
374
389
  state: "done" | "migrate" | "switched";
375
390
  rows: number;
@@ -397,6 +412,7 @@ export declare const postgresMigrationSwitchContract: import("@intentius/chant/o
397
412
  stack?: string | undefined;
398
413
  ownershipEnv?: string | undefined;
399
414
  cwd?: string | undefined;
415
+ keepOnFailure?: boolean | undefined;
400
416
  }, {
401
417
  state: "done" | "migrate" | "switched";
402
418
  switched: boolean;
@@ -420,6 +436,7 @@ export declare const postgresMigrationRetainContract: import("@intentius/chant/o
420
436
  stack?: string | undefined;
421
437
  ownershipEnv?: string | undefined;
422
438
  cwd?: string | undefined;
439
+ keepOnFailure?: boolean | undefined;
423
440
  }, {
424
441
  state: "done" | "migrate" | "switched";
425
442
  due: boolean;
@@ -444,6 +461,7 @@ export declare const postgresMigrationContractContract: import("@intentius/chant
444
461
  stack?: string | undefined;
445
462
  ownershipEnv?: string | undefined;
446
463
  cwd?: string | undefined;
464
+ keepOnFailure?: boolean | undefined;
447
465
  }, {
448
466
  state: "done" | "migrate" | "switched";
449
467
  dropped: boolean;
@@ -467,6 +485,7 @@ export declare const postgresMigrationCompensateContract: import("@intentius/cha
467
485
  stack?: string | undefined;
468
486
  ownershipEnv?: string | undefined;
469
487
  cwd?: string | undefined;
488
+ keepOnFailure?: boolean | undefined;
470
489
  }, {
471
490
  dropped: string[];
472
491
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../src/op/activity-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;EAKzC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;EAK9C,CAAC;AAE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MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;EAK/C,CAAC;AAIF,+FAA+F;AAC/F,eAAO,MAAM,eAAe;;;;;;;;;EAS3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAwB5E,eAAO,MAAM,SAAS,EAAE,aAkNvB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAwB5E,eAAO,MAAM,SAAS,EAAE,aA0OvB,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Access as chant compares it (#3681): the privileges each role holds on each
3
+ * object, and the default privileges objects are created with.
4
+ *
5
+ * A `grant` declaration is a statement, not an object: `GRANT SELECT ON a, b
6
+ * TO r1, r2` is four privileges, and the catalog keeps no statement, only
7
+ * each object's access control list. So declarations and the server are both
8
+ * brought to the same form, one entry per object (or column) and grantee
9
+ * holding a set of privileges, and those entries are compared.
10
+ *
11
+ * What a declared object's entries should be:
12
+ *
13
+ * - what Postgres gives a new object of its kind, the owner's own privileges
14
+ * left out (a function or procedure: EXECUTE to PUBLIC; anything else:
15
+ * nothing);
16
+ * - with the declared default privileges for objects of that kind created by
17
+ * the role that applies, globally and in the object's schema, since chant
18
+ * creates it as that role;
19
+ * - with every declared GRANT added and every declared REVOKE taken away, in
20
+ * the build's order.
21
+ *
22
+ * The owner's own privileges are never compared: the owner has them by
23
+ * owning the object. A grant on an object the build does not declare (the
24
+ * `public` schema) is compared too, from what Postgres gives a new object.
25
+ *
26
+ * Default privileges are compared for the role that applies (and each role a
27
+ * declaration names with `FOR ROLE`): globally, where none declared means
28
+ * Postgres's own defaults, and per schema, where none declared means none.
29
+ */
30
+ import type { PgChange } from "../plan/diff.js";
31
+ import type { CanonicalPgObject } from "../plan/normalize.js";
32
+ export type AclKind = "schema" | "table" | "sequence" | "function" | "procedure" | "column" | "default";
33
+ /** The kinds of object default privileges are for. */
34
+ export type DefaultObjects = "tables" | "sequences" | "functions" | "types" | "schemas";
35
+ /** What an entry is on. */
36
+ export interface AclTarget {
37
+ kind: AclKind;
38
+ /** The object's canonical name: `app`, `app.orders`, `app.f(integer)`. Empty for default privileges. */
39
+ name: string;
40
+ column?: string;
41
+ /** Default privileges: whose new objects (`""` for the role that applies), in which schema (undefined: every schema), of which kind. */
42
+ role?: string;
43
+ schema?: string;
44
+ objects?: DefaultObjects;
45
+ }
46
+ /** One grantee's privileges on one target: each privilege, and whether it was granted WITH GRANT OPTION. */
47
+ export interface AclEntry {
48
+ target: AclTarget;
49
+ grantee: string;
50
+ privileges: Map<string, boolean>;
51
+ }
52
+ export type AccessState = Map<string, AclEntry>;
53
+ /** An access change, with the statements that make it and the grant declarations behind it. */
54
+ export interface AccessChange {
55
+ change: PgChange;
56
+ target: AclTarget;
57
+ grantee: string;
58
+ sql: string[];
59
+ /** The export names of the declarations that grant or revoke on this target to this grantee. */
60
+ exports: string[];
61
+ }
62
+ declare const SELF = "";
63
+ /** A target's key: relations (tables, views, sequences) share one namespace, as in the catalog. */
64
+ export declare function targetKey(t: AclTarget): string;
65
+ export declare const entryKey: (t: AclTarget, grantee: string) => string;
66
+ /** Every privilege of a kind of object, as ALL PRIVILEGES grants them. MAINTAIN is a table's from 17. */
67
+ export declare function allPrivileges(kind: AclKind | DefaultObjects, major: number): string[];
68
+ /** What Postgres gives a new object of a kind, the owner's own privileges left out: EXECUTE on a routine and USAGE on a type to PUBLIC. */
69
+ export declare function builtinEntries(kind: AclKind | DefaultObjects): Array<{
70
+ grantee: string;
71
+ privilege: string;
72
+ }>;
73
+ declare function add(state: AccessState, target: AclTarget, grantee: string, privilege: string, grantable: boolean): void;
74
+ export interface DeclaredAccess {
75
+ state: AccessState;
76
+ /** Every target the declarations decide: the declared objects and what the grants name. */
77
+ targets: AclTarget[];
78
+ /** The export names of the declarations behind each entry. */
79
+ exportsOf: Map<string, string[]>;
80
+ /** The roles `FOR ROLE` names, whose default privileges are compared too. */
81
+ forRoles: string[];
82
+ }
83
+ /**
84
+ * The access a set of declarations adds up to. `objects` are canonical, in
85
+ * the build's order, keyed by export name. `self` is the role that applies,
86
+ * when known: a declaration naming it with `FOR ROLE` is its own default
87
+ * privileges, and a grant to it is the owner's, which is never compared.
88
+ */
89
+ export declare function declaredAccess(objects: ReadonlyArray<{
90
+ key: string;
91
+ canonical: CanonicalPgObject;
92
+ }>, opts: {
93
+ major: number;
94
+ self?: string;
95
+ }): DeclaredAccess;
96
+ /**
97
+ * The changes from `before` to `after`, one per entry and direction, each
98
+ * with its statements: revokes first (a privilege, then a grant option), then
99
+ * grants (a grant option on its own with WITH GRANT OPTION).
100
+ */
101
+ export declare function diffAccess(before: AccessState, after: AccessState, exportsOf?: ReadonlyMap<string, string[]>): AccessChange[];
102
+ /** What a server holds: its entries, which objects exist, and for which kinds the role that applies has global default privileges of its own. */
103
+ export interface LiveAccess {
104
+ state: AccessState;
105
+ /** The target keys of the objects that exist. */
106
+ present: Set<string>;
107
+ /** The kinds of object the role that applies has a global `pg_default_acl` row for. */
108
+ globalDefaults: Set<DefaultObjects>;
109
+ }
110
+ /**
111
+ * The entries the server would give each declared object that does not exist
112
+ * yet: Postgres's defaults, or the role's global default privileges, and its
113
+ * default privileges in the object's schema.
114
+ */
115
+ export declare function predictedAccess(missing: readonly AclTarget[], live: LiveAccess): AccessState;
116
+ /** Adds an entry, for the live reader. */
117
+ export declare const addEntry: typeof add;
118
+ export { SELF as APPLYING_ROLE };
119
+ //# sourceMappingURL=acl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acl.d.ts","sourceRoot":"","sources":["../../../src/postgres/access/acl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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,KAAK,EAAE,WAAW,CAAC;IACnB,iDAAiD;IACjD,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,uFAAuF;IACvF,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAc5F;AAED,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,YAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Import's access (#3681): the privileges on the imported objects, and the
3
+ * default privileges of the role that reads, as `grant` declarations. Each
4
+ * is the GRANT, REVOKE or ALTER DEFAULT PRIVILEGES that takes what Postgres
5
+ * gives a new object (EXECUTE to PUBLIC on a routine, nothing on the rest) to
6
+ * what the server holds, one per object and grantee, so the import plans as
7
+ * no change.
8
+ */
9
+ import type { PostgresClient } from "../live/client.js";
10
+ import type { LivePgObject } from "../live/catalog.js";
11
+ import type { ImportedPgObject } from "../import/ir.js";
12
+ export declare function importedAccess(client: PostgresClient, objects: readonly LivePgObject[], schemas: readonly string[] | undefined): Promise<ImportedPgObject[]>;
13
+ //# sourceMappingURL=import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../src/postgres/access/import.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAuBrD,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA6BlK"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Reading access from a live server (#3681): each target's access control
3
+ * list, exploded into one entry per grantee (`aclexplode`, with
4
+ * `acldefault` where the list is NULL, which means Postgres's own defaults),
5
+ * the owner's own privileges left out; every column's list of a relation
6
+ * read; and the default privileges (`pg_default_acl`) of the role that runs
7
+ * the read and of the roles the declarations name with `FOR ROLE`, globally
8
+ * and in the schemas in scope.
9
+ */
10
+ import type { PostgresClient } from "../live/client.js";
11
+ import { type AclTarget, type LiveAccess } from "./acl.js";
12
+ export interface LiveAccessScope {
13
+ /** The schemas whose default privileges are read; undefined is every schema. */
14
+ schemas?: readonly string[];
15
+ /** Roles besides the one that runs the read whose default privileges are read. */
16
+ forRoles?: readonly string[];
17
+ /** Global default-privilege targets the declarations decide: one with no row on the server holds Postgres's own defaults. */
18
+ declaredDefaults?: readonly AclTarget[];
19
+ }
20
+ /** The access the server holds on `targets`, and the default privileges in scope. */
21
+ export declare function readLiveAccess(client: PostgresClient, targets: readonly AclTarget[], scope?: LiveAccessScope): Promise<LiveAccess & {
22
+ self: string;
23
+ }>;
24
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../../src/postgres/access/live.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAwE,KAAK,SAAS,EAAuB,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAQnJ,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,6HAA6H;IAC7H,gBAAgB,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CACzC;AA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AAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,MAKI,CAAC;AAE7G;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,SAAW,GAAG,gBAAgB,EAAE,CAc1F;AAED,0FAA0F;AAC1F,eAAO,MAAM,QAAQ,GAAI,UAAU,SAAS,gBAAgB,EAAE,KAAG,QAAQ,EAA2D,CAAC;AAErI,MAAM,WAAW,oBAAoB;IACnC,8FAA8F;IAC9F,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC1C,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,wDAAwD;IACxD,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,cAAc,CAAC;IACjC,kEAAkE;IAClE,eAAe,CAAC,EAAE,OAAO,gBAAgB,CAAC;CAC3C;AAkCD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CA6N/B"}
@@ -56,6 +56,20 @@ export interface PgStep {
56
56
  rule?: PgClassifierRuleId;
57
57
  /** An index this statement builds CONCURRENTLY: a failed build leaves it INVALID, and the applier drops it again. */
58
58
  buildsIndex?: string;
59
+ /** A query to run before the statement, whose success depends on the rows already in the table (#3686). */
60
+ precheck?: PgPrecheck;
61
+ }
62
+ /**
63
+ * A data-dependent statement's pre-check (#3686): a query that returns one
64
+ * row with one column, `n`, the count of rows (or groups of rows) the
65
+ * statement would fail on. Zero means it can run. Nothing runs it on its own:
66
+ * a caller runs every step's pre-check before the first statement, and stops
67
+ * when one is not zero. It reads the table without locking it beyond `SELECT`.
68
+ */
69
+ export interface PgPrecheck {
70
+ sql: string;
71
+ /** What a count above zero means, e.g. `rows where email is NULL, which SET NOT NULL fails on`. */
72
+ detail: string;
59
73
  }
60
74
  /** What {@link alterSteps} could not make in place: changes with no statement, each with why. */
61
75
  export interface UnsupportedChange {
@@ -81,6 +95,31 @@ export declare const objectIdent: (o: {
81
95
  export declare const KIND_WORDS: Readonly<Record<CanonicalKind, string>>;
82
96
  /** The canonical kind of an entity type. */
83
97
  export declare const kindOfType: (type: string) => CanonicalKind;
98
+ /** The rows of `table` with `column` NULL: what SET NOT NULL fails on. */
99
+ export declare function nullPrecheck(table: string, column: string): PgPrecheck;
100
+ /**
101
+ * The groups of rows of `table` with the same `columns`: what a unique index
102
+ * or a unique or primary key constraint fails on. NULLs are distinct unless
103
+ * `nullsNotDistinct`; a primary key also counts the rows with a NULL key
104
+ * column, which its implied NOT NULL fails on. `where` is a partial index's
105
+ * predicate.
106
+ */
107
+ export declare function duplicatePrecheck(table: string, columns: readonly string[], opts?: {
108
+ primaryKey?: boolean;
109
+ nullsNotDistinct?: boolean;
110
+ where?: string;
111
+ }): PgPrecheck;
112
+ /** The rows of `table` that fail a CHECK: its expression false (a NULL result passes). */
113
+ export declare function checkPrecheck(table: string, expr: string, name?: string): PgPrecheck;
114
+ /**
115
+ * The rows of `table` whose foreign key references no row: every key column
116
+ * set and no referenced row with those values (MATCH SIMPLE, the default).
117
+ * Undefined for a foreign key that names no referenced columns or is MATCH
118
+ * FULL, which the query does not cover.
119
+ */
120
+ export declare function foreignKeyPrecheck(table: string, fk: ForeignKeyDef): PgPrecheck | undefined;
121
+ /** The check that proves a column NOT NULL while SET NOT NULL runs (SQLPG210), named as the migration Op names its own. */
122
+ export declare const notNullCheckName: (column: string) => string;
84
123
  interface Statement {
85
124
  text: string;
86
125
  tokens: Token[];
@@ -101,6 +140,7 @@ export declare function createSteps(obj: Pick<DeclaredPgObject, "ddl" | "canonic
101
140
  orReplace?: boolean;
102
141
  cls?: PgChangeClass;
103
142
  rule?: PgClassifierRuleId;
143
+ access?: boolean;
104
144
  }): PgStep[];
105
145
  /** The `DROP` for an object a prune removes. Never `CASCADE`: what something else still uses is kept. */
106
146
  export declare function dropStatement(kind: CanonicalKind, schema: string | undefined, name: string, signature?: string): PgStep;
@@ -108,6 +148,22 @@ export declare function dropStatement(kind: CanonicalKind, schema: string | unde
108
148
  export declare function columnDefinition(c: ColumnDef): string;
109
149
  /** A constraint as a table constraint (`ADD CONSTRAINT ...`), whether it was declared on a column or the table. */
110
150
  export declare function constraintSql(kind: CanonicalConstraint["kind"], def: KeyDef | CheckDef | ForeignKeyDef | ExclusionDef): string;
151
+ /**
152
+ * A CHECK (SQLPG218) or a foreign key (SQLPG219) added to a table that
153
+ * exists, without reading its rows under a lock that blocks writes: the
154
+ * constraint added NOT VALID, which checks new rows only (SQLPG217), then
155
+ * validated (SQLPG220), which reads the rows under SHARE UPDATE EXCLUSIVE
156
+ * while writes go on. The applier commits between the two, since their
157
+ * classes differ, so the validation runs in a transaction of its own. A run
158
+ * interrupted after the first statement leaves the constraint NOT VALID on
159
+ * the server, and the next plan validates it as found. The first statement
160
+ * carries the pre-check (the rows the check or the foreign key refuses).
161
+ * VALIDATE needs a name, so a constraint declared without one is given
162
+ * {@link unnamedConstraintName}'s; the diff matches an unnamed declaration
163
+ * to the constraint by its body, whatever it is called.
164
+ */
165
+ /** The name given to a CHECK or foreign key declared without one: `<table>_<hash of its body>_check` or `_fkey`. */
166
+ export declare function unnamedConstraintName(table: string, c: Pick<CanonicalConstraint, "kind" | "body">): string;
111
167
  /** `ALTER SEQUENCE`'s options for what is declared, every option left out set back to its default. */
112
168
  export declare function sequenceOptionsSql(p: SequenceProps): string;
113
169
  /** Changes a plan refuses to make in place: expand and contract, by the migration Op (#3281). */
@@ -116,6 +172,19 @@ export declare const isRefused: (c: PgChange) => boolean;
116
172
  export declare const isDestructive: (c: PgChange) => boolean;
117
173
  /** Changes that replace the object: drop it and create it again from its declaration. */
118
174
  export declare const isRecreate: (c: PgChange) => boolean;
175
+ /**
176
+ * SET NOT NULL on a table that exists, without reading the table under
177
+ * ACCESS EXCLUSIVE (SQLPG210): a CHECK (column IS NOT NULL) added NOT VALID,
178
+ * which reads no rows; validated, which reads them under SHARE UPDATE
179
+ * EXCLUSIVE while writes go on; then SET NOT NULL, which the valid check
180
+ * proves without a scan (12 and later), and the check dropped. The applier
181
+ * commits between the catalog changes and the validation, so the brief
182
+ * ACCESS EXCLUSIVE locks are never held across the scan. A check left by an
183
+ * interrupted run is validated as found. The first statement carries the
184
+ * NULL count as its pre-check. 18's `NOT NULL ... NOT VALID` would save the
185
+ * last statement; the check is used on every major for one sequence.
186
+ */
187
+ export declare function setNotNullSteps(table: string, column: string, live?: Pick<PgDiffObject, "constraints">): PgStep[];
119
188
  /**
120
189
  * The statements for an object that exists on the server, change by change.
121
190
  * `live` is the server's definition, matched to the declaration (a renamed
@@ -216,6 +285,8 @@ export interface PgStatementPlanInput {
216
285
  carriesMarker?: (live: PgDiffObject, currentKey: string) => boolean;
217
286
  /** The comment an extension's control file sets, kept under the trailer when the declaration sets none. */
218
287
  extensionComment?: (name: string) => string | undefined;
288
+ /** Whether access is managed: off, a table is created without its row-level security statements. Default: on. */
289
+ access?: boolean;
219
290
  }
220
291
  export interface PgStatementPlan {
221
292
  /** One entry per declared object, in creation order. */
@@ -1 +1 @@
1
- {"version":3,"file":"statements.d.ts","sourceRoot":"","sources":["../../../src/postgres/apply/statements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;A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