okmodel 0.8.0 → 0.9.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 (202) hide show
  1. package/README.md +14 -0
  2. package/dist/dialects/pg/ext/btree-gin.d.ts +26 -0
  3. package/dist/dialects/pg/ext/btree-gin.js +20 -0
  4. package/dist/dialects/pg/ext/btree-gist.d.ts +26 -0
  5. package/dist/dialects/pg/ext/btree-gist.js +20 -0
  6. package/dist/dialects/pg/ext/call.d.ts +53 -0
  7. package/dist/dialects/pg/ext/citext.js +1 -1
  8. package/dist/dialects/pg/ext/feature.d.ts +26 -0
  9. package/dist/dialects/pg/ext/fuzzystrmatch.d.ts +34 -0
  10. package/dist/dialects/pg/ext/fuzzystrmatch.js +33 -0
  11. package/dist/dialects/pg/ext/hstore.d.ts +41 -0
  12. package/dist/dialects/pg/ext/hstore.js +29 -0
  13. package/dist/dialects/pg/ext/index.d.ts +56 -0
  14. package/dist/dialects/pg/ext/index.js +1 -1
  15. package/dist/dialects/pg/ext/ltree.d.ts +41 -0
  16. package/dist/dialects/pg/ext/ltree.js +29 -0
  17. package/dist/dialects/pg/ext/pg-trgm.js +4 -13
  18. package/dist/dialects/pg/ext/pgcrypto.d.ts +33 -0
  19. package/dist/dialects/pg/ext/pgcrypto.js +33 -0
  20. package/dist/dialects/pg/ext/unaccent.d.ts +26 -0
  21. package/dist/dialects/pg/ext/unaccent.js +21 -0
  22. package/dist/dialects/pg/ext/using.d.ts +23 -0
  23. package/dist/dialects/pg/ext/versions.d.ts +36 -0
  24. package/dist/dialects/pg/external.d.ts +19 -0
  25. package/dist/dialects/pg/fn/index.js +4 -4
  26. package/dist/dialects/pg/index.d.ts +1 -0
  27. package/dist/dialects/pg/index.js +16 -11
  28. package/dist/dialects/pg/view/index.js +5 -5
  29. package/dist/dialects/pg/view/scratch.d.ts +4 -1
  30. package/dist/runtime/artifact-file.d.ts +22 -0
  31. package/dist/runtime/client.d.ts +10 -0
  32. package/dist/runtime/drift-detail.d.ts +2 -1
  33. package/dist/runtime/drift.d.ts +3 -10
  34. package/dist/runtime/pg/bun.js +4 -4
  35. package/dist/runtime/pg/neon.js +4 -4
  36. package/dist/runtime/pg/pg.js +4 -4
  37. package/dist/runtime/pg/pglite.js +4 -4
  38. package/dist/runtime/pg/postgresjs.js +4 -4
  39. package/dist/runtime/server-check.d.ts +36 -6
  40. package/dist/runtime/traits/index.js +5 -5
  41. package/dist/runtime/validate/index.js +1 -1
  42. package/dist/shared/{4m6hskg8.js → 0j6qe91y.js} +4 -4
  43. package/dist/shared/{14x60fbf.js → 1mxm04fy.js} +5 -5
  44. package/dist/shared/{b6d6p0zc.js → 2szgv6yj.js} +5 -5
  45. package/dist/shared/{f4jy1j7x.js → 2zdxkt7b.js} +909 -100
  46. package/dist/shared/{mnvjvqyp.js → 3456242y.js} +17 -17
  47. package/dist/shared/3t6kw83m.js +1 -1
  48. package/dist/shared/{6m78c8ss.js → 5kyb3tqx.js} +1 -1
  49. package/dist/shared/61bmrmhr.js +35 -0
  50. package/dist/shared/{zbqbmmrp.js → 62b603gr.js} +8 -8
  51. package/dist/shared/{jgqj11w4.js → 6f0z3hzh.js} +4 -0
  52. package/dist/shared/{dpc2r7rb.js → 6nae0spm.js} +150 -89
  53. package/dist/shared/{0wrea3jq.js → 71n0jmhc.js} +1 -1
  54. package/dist/shared/7ba5h6pb.js +17 -0
  55. package/dist/shared/{k86n8vq3.js → 8jesqsrk.js} +1 -1
  56. package/dist/shared/{qd9hhd8f.js → 8n688yjg.js} +1 -1
  57. package/dist/shared/{zgex00fd.js → 8qzkd9f3.js} +5 -5
  58. package/dist/shared/{mkrn359n.js → 90sg0w5a.js} +159 -31
  59. package/dist/shared/{7ghwamrf.js → 99qp9vtg.js} +1 -1
  60. package/dist/shared/{bxas03mq.js → 9dtgn1z2.js} +1 -1
  61. package/dist/shared/{p5nh3r8q.js → aksb89mn.js} +2 -2
  62. package/dist/shared/{wcrheftc.js → bphrgwz9.js} +2 -2
  63. package/dist/shared/{wz2a78mp.js → c3mvnq7a.js} +1 -1
  64. package/dist/shared/{pan0370z.js → ccsmhv9r.js} +24 -6
  65. package/dist/shared/{n0jmpgj1.js → cexb7z6b.js} +1 -1
  66. package/dist/shared/{wvdjznah.js → cf8zdz5p.js} +5 -5
  67. package/dist/shared/{3449rcae.js → ckz05z15.js} +4 -4
  68. package/dist/shared/{35q0n9tz.js → dd5pmnky.js} +7 -7
  69. package/dist/shared/{e8zyaqvj.js → ds229x4r.js} +1 -1
  70. package/dist/{tooling/shared/yw30vnq2.js → shared/e275q7sd.js} +1 -1
  71. package/dist/shared/{mfedzr74.js → ebhz8vh6.js} +4 -4
  72. package/dist/shared/{z581d7ny.js → fdsz3w80.js} +2 -2
  73. package/dist/shared/{sjk86yrx.js → fk9vef30.js} +84 -73
  74. package/dist/shared/{needfe47.js → g89fmz5s.js} +1 -1
  75. package/dist/shared/{m4xff2a6.js → ghqzdp94.js} +2 -2
  76. package/dist/shared/h9811jjm.js +17 -0
  77. package/dist/shared/{kj9d8maq.js → jpybhf98.js} +1 -1
  78. package/dist/shared/kzgrnckd.js +29 -0
  79. package/dist/shared/{agsfb86s.js → mazpbcdj.js} +4 -4
  80. package/dist/shared/{195pzzzz.js → mgaq2sd3.js} +10 -7
  81. package/dist/shared/{5mtf6cj3.js → mvmm3xpb.js} +5 -2
  82. package/dist/shared/{p3xbdcvt.js → myk8fswx.js} +55 -6
  83. package/dist/shared/{njga14v4.js → n306gqkd.js} +8 -8
  84. package/dist/shared/n5whk3mt.js +665 -0
  85. package/dist/shared/{bah9nbg3.js → npdftanb.js} +12 -20
  86. package/dist/shared/{16kvjebh.js → pg4ezgyf.js} +7 -26
  87. package/dist/{tooling/shared/08kemxjd.js → shared/pgsak1yw.js} +1 -1
  88. package/dist/shared/{jp36k7dp.js → qvwwp1mp.js} +61 -40
  89. package/dist/shared/rbxt795q.js +1766 -0
  90. package/dist/shared/{g5yc06ka.js → s7he5e5d.js} +1 -1
  91. package/dist/shared/{hfqmpasr.js → ss2kv2rs.js} +5 -5
  92. package/dist/shared/stfa9xcw.js +450 -0
  93. package/dist/{tooling/shared/rs1jb051.js → shared/tr64w5p0.js} +1 -1
  94. package/dist/shared/{jebgrkeq.js → tw1nvvfj.js} +2 -2
  95. package/dist/shared/{v1wad97q.js → wvtjg5m3.js} +1 -1
  96. package/dist/shared/xqacq37x.js +61 -0
  97. package/dist/shared/{n05z9nwz.js → xtsydxjg.js} +1 -1
  98. package/dist/shared/{jx2m62cs.js → xv8qj97g.js} +5 -5
  99. package/dist/shared/{63f4ksbz.js → xwhdcrm4.js} +1 -1
  100. package/dist/shared/{hm5f8jby.js → yvabyg9k.js} +6 -6
  101. package/dist/shared/yybhre6n.js +136 -0
  102. package/dist/shared/zdqf8k5d.js +8 -0
  103. package/dist/tooling/cli.js +94 -22
  104. package/dist/tooling/driver-run.js +15 -332
  105. package/dist/tooling/github/comment.d.ts +50 -0
  106. package/dist/tooling/github/post-comment.d.ts +17 -0
  107. package/dist/tooling/migrate/commands.d.ts +2 -1
  108. package/dist/tooling/migrate/config.d.ts +13 -0
  109. package/dist/tooling/migrate/export.d.ts +165 -0
  110. package/dist/tooling/migrate/ext-surface.d.ts +80 -0
  111. package/dist/tooling/migrate/ext.d.ts +31 -4
  112. package/dist/tooling/migrate/import-drizzle.d.ts +40 -0
  113. package/dist/tooling/migrate/index.d.ts +3 -0
  114. package/dist/tooling/migrate/index.js +55 -10
  115. package/dist/tooling/migrate/lint-rules.d.ts +18 -1
  116. package/dist/tooling/migrate/lint.d.ts +14 -1
  117. package/dist/tooling/migrate/place.d.ts +18 -0
  118. package/dist/tooling/migrate/plan-json.d.ts +65 -0
  119. package/dist/tooling/migrate/project.d.ts +10 -1
  120. package/dist/tooling/migrate/pull-emit.d.ts +98 -0
  121. package/dist/tooling/migrate/pull-routines.d.ts +126 -0
  122. package/dist/tooling/migrate/pull-verify.d.ts +26 -0
  123. package/dist/tooling/migrate/pull.d.ts +62 -0
  124. package/dist/tooling/migrate/reprint.d.ts +32 -0
  125. package/dist/tooling/migrate/sandbox.d.ts +8 -2
  126. package/dist/tooling/migrate/schema-api.d.ts +43 -0
  127. package/dist/tooling/migrate/sql-lex.d.ts +18 -0
  128. package/dist/tooling/shared/{3m1hkg7z.js → 04svnxxj.js} +4 -4
  129. package/dist/tooling/shared/{ppnnnvj8.js → 0j0jtse1.js} +1 -1
  130. package/dist/tooling/shared/{z8d7ptht.js → 0r05zhyq.js} +5 -5
  131. package/dist/tooling/shared/{a6pp9d12.js → 1800eymw.js} +3 -3
  132. package/dist/tooling/shared/{cmptmb4f.js → 35zemrmf.js} +1 -1
  133. package/dist/tooling/shared/{w7qe8sj1.js → 3rmaz3pq.js} +1 -1
  134. package/dist/{shared/q0cqt2sp.js → tooling/shared/3yn79q5m.js} +1 -1
  135. package/dist/tooling/shared/{2revefqt.js → 57btdkgm.js} +2 -2
  136. package/dist/tooling/shared/{ma2340rx.js → 5bmksndh.js} +2 -2
  137. package/dist/tooling/shared/{9xzm7hjg.js → 5p8km5jb.js} +3 -3
  138. package/dist/tooling/shared/{xhrnjch9.js → 5x3pf400.js} +3 -3
  139. package/dist/tooling/shared/{wwnekq5n.js → 5zrzffnk.js} +1 -1
  140. package/dist/tooling/shared/{p7f08ktn.js → 62fxpc1p.js} +7 -7
  141. package/dist/tooling/shared/{7ae7rjmn.js → 68tf18v4.js} +2 -2
  142. package/dist/tooling/shared/{rf83gr2d.js → 6vk28rjp.js} +7 -3
  143. package/dist/tooling/shared/76pv6qff.js +9 -0
  144. package/dist/tooling/shared/{bz2dqhab.js → 7aews1zg.js} +3 -3
  145. package/dist/tooling/shared/{9kazs5p6.js → 7b3xp9gc.js} +3 -3
  146. package/dist/tooling/shared/{4d2w25vw.js → 7pxncnzs.js} +2 -2
  147. package/dist/tooling/shared/{zvnhh1n0.js → 829fjxyw.js} +2 -2
  148. package/dist/tooling/shared/{dzx85q70.js → 8m5znpdt.js} +1 -1
  149. package/dist/tooling/shared/{g9ad4n80.js → 8yr7ges1.js} +7 -7
  150. package/dist/tooling/shared/{tn8gay14.js → 9qr9rkbh.js} +6 -6
  151. package/dist/tooling/shared/{8sqrsw3s.js → 9sfbtwsk.js} +3 -3
  152. package/dist/{shared/bnby0esn.js → tooling/shared/9wsnsvbf.js} +1 -1
  153. package/dist/tooling/shared/{aftb2mwr.js → a2xe04bm.js} +1 -1
  154. package/dist/tooling/shared/{nf7jmhfa.js → a4pzghha.js} +2 -2
  155. package/dist/tooling/shared/{y5656f0e.js → am04v8na.js} +5 -5
  156. package/dist/tooling/shared/{417zdsk7.js → asgr07mp.js} +5 -5
  157. package/dist/tooling/shared/{pqy21k24.js → c0xevn1h.js} +4 -4
  158. package/dist/tooling/shared/dhatassp.js +134 -0
  159. package/dist/tooling/shared/{spk1jg3r.js → ezqn88nj.js} +8 -8
  160. package/dist/tooling/shared/{6nyfyw70.js → f77nnfqy.js} +2 -2
  161. package/dist/tooling/shared/{wt7j7nf6.js → fh07z1dt.js} +1 -1
  162. package/dist/tooling/shared/{3rrw5w8f.js → gqwevek4.js} +1 -1
  163. package/dist/tooling/shared/{f9mphxej.js → hfq3n3bd.js} +346 -19
  164. package/dist/tooling/shared/{vs0t6qt8.js → j664qjrt.js} +2 -2
  165. package/dist/tooling/shared/{733a1tq3.js → jpgmjsx3.js} +3 -3
  166. package/dist/tooling/shared/{mtrqn2hn.js → jr2nmr81.js} +22 -30
  167. package/dist/{shared/mtw6jz76.js → tooling/shared/jsjjz875.js} +1 -1
  168. package/dist/tooling/shared/{2wtvc7rw.js → kbqnrs1x.js} +2 -2
  169. package/dist/tooling/shared/{gfvtj6d0.js → kz715295.js} +7 -7
  170. package/dist/tooling/shared/{a7q7t4n3.js → m3xt8b1h.js} +2 -2
  171. package/dist/tooling/shared/{dw08f3m8.js → m4hhb8aa.js} +2 -2
  172. package/dist/tooling/shared/{y031jct9.js → mw5npye0.js} +2 -2
  173. package/dist/tooling/shared/{vraj6d74.js → nxq95eb6.js} +3 -3
  174. package/dist/tooling/shared/{fb9k2qwd.js → qartgazh.js} +11 -30
  175. package/dist/tooling/shared/{xjs6zqtc.js → rcywj2w8.js} +9 -9
  176. package/dist/tooling/shared/{dy672fz6.js → s6qha57m.js} +2 -2
  177. package/dist/tooling/shared/{vx86qjv8.js → shjs0379.js} +3 -3
  178. package/dist/tooling/shared/{345tbc2k.js → sjwkt1pg.js} +1 -1
  179. package/dist/tooling/shared/{rq5kk8j6.js → stebqyyd.js} +3 -3
  180. package/dist/tooling/shared/{yk9mp7vb.js → t4xveemq.js} +4 -4
  181. package/dist/tooling/shared/{djydjpqt.js → t6zjeake.js} +5 -5
  182. package/dist/tooling/shared/{zhwnfyb2.js → tcwpjvxe.js} +1 -1
  183. package/dist/tooling/shared/{72fyg4zv.js → tpssp7ac.js} +1 -1
  184. package/dist/tooling/shared/{jne7b93p.js → v6j1ep6w.js} +3 -3
  185. package/dist/tooling/shared/{ec71zqgt.js → vwr2y833.js} +2 -2
  186. package/dist/tooling/shared/{j9t5s12a.js → w17sj05d.js} +2 -2
  187. package/dist/tooling/shared/{3tq8pnb8.js → w5d89rb4.js} +1 -1
  188. package/dist/tooling/shared/{smn6kz1p.js → wbwq1jsa.js} +2 -2
  189. package/dist/tooling/shared/{pwsytxm5.js → wezxf3h8.js} +1 -1
  190. package/dist/tooling/shared/{5bvw2nev.js → yb4kd19s.js} +1 -1
  191. package/dist/tooling/shared/{gmcf9cxf.js → ybdew6j7.js} +2 -2
  192. package/dist/tooling/shared/{ep8zh3bk.js → yfedr1zb.js} +1 -1
  193. package/dist/tooling/shared/{ddjtfgnx.js → yhp829bx.js} +3 -3
  194. package/dist/tooling/shared/{yfr8hzhm.js → ytk1tjs0.js} +1 -1
  195. package/dist/tooling/shared/{03k6res6.js → zs9aymcp.js} +1 -1
  196. package/dist/tooling/shared/zx3v9phv.js +8 -0
  197. package/dist/tooling/testing/index.js +2 -2
  198. package/package.json +38 -9
  199. package/dist/shared/fjpnhqan.js +0 -71
  200. package/dist/shared/n41w4fbz.js +0 -113
  201. package/dist/tooling/shared/pw8fgahx.js +0 -69
  202. /package/dist/shared/{ae4j5f42.js → mfvx6kjx.js} +0 -0
@@ -1,9 +1,13 @@
1
1
  import {
2
2
  serializeCatalog2
3
3
  } from "./12z7aznj.js";
4
+ import {
5
+ quoteIdent2,
6
+ qualify2
7
+ } from "./fk9vef30.js";
4
8
  import {
5
9
  roleExists
6
- } from "./kj9d8maq.js";
10
+ } from "./jpybhf98.js";
7
11
  import {
8
12
  canonicalTypeName,
9
13
  createdRoleName,
@@ -16,14 +20,10 @@ import {
16
20
  planMigration,
17
21
  sessionFailure,
18
22
  assertTargetPolicy
19
- } from "./dpc2r7rb.js";
23
+ } from "./6nae0spm.js";
20
24
  import {
21
25
  snakeCase
22
26
  } from "./gcefca6p.js";
23
- import {
24
- quoteIdent,
25
- qualify
26
- } from "./sjk86yrx.js";
27
27
  import {
28
28
  catalog,
29
29
  isDomain
@@ -70,7 +70,7 @@ async function runTarget(connection, run, session) {
70
70
  async function assumeRole(connection, role, session) {
71
71
  if (session.setRole === role)
72
72
  return;
73
- await connection.execute(`set role ${quoteIdent(role)}`);
73
+ await connection.execute(`set role ${quoteIdent2(role)}`);
74
74
  session.setRole = role;
75
75
  }
76
76
  async function grantAppMeta(connection, role, session) {
@@ -79,12 +79,12 @@ async function grantAppMeta(connection, role, session) {
79
79
  const previous = session.setRole;
80
80
  if (previous !== undefined)
81
81
  await connection.execute("reset role");
82
- await connection.execute(`grant select on okm_meta to ${quoteIdent(role)}`);
82
+ await connection.execute(`grant select on okm_meta to ${quoteIdent2(role)}`);
83
83
  if (previous !== undefined)
84
- await connection.execute(`set role ${quoteIdent(previous)}`);
84
+ await connection.execute(`set role ${quoteIdent2(previous)}`);
85
85
  }
86
86
  async function grantSchema(connection, schema, role) {
87
- await connection.execute(`grant usage, create on schema ${quoteIdent(schema)} to ${quoteIdent(role)}`);
87
+ await connection.execute(`grant usage, create on schema ${quoteIdent2(schema)} to ${quoteIdent2(role)}`);
88
88
  }
89
89
  async function runUnit(connection, unit, run, session) {
90
90
  const only = unit.steps.length === 1 ? unit.steps[0] : undefined;
@@ -113,7 +113,7 @@ async function runUnit(connection, unit, run, session) {
113
113
  if (created !== undefined && created === run.migrationRole) {
114
114
  if (!existed) {
115
115
  await grantSchema(connection, run.schema ?? "public", created);
116
- await connection.execute(`grant select, insert, update on okm_meta, okm_history, okm_backfill to ${quoteIdent(created)}`);
116
+ await connection.execute(`grant select, insert, update on okm_meta, okm_history, okm_backfill to ${quoteIdent2(created)}`);
117
117
  }
118
118
  await assumeRole(connection, created, session);
119
119
  }
@@ -305,7 +305,7 @@ async function rebuildInvalidIndex(connection, sql) {
305
305
  const valid = found.rows[0]?.[0];
306
306
  if (valid === undefined || wireTrue(valid))
307
307
  return;
308
- await connection.execute(`drop index concurrently if exists ${quoteIdent(name)}`);
308
+ await connection.execute(`drop index concurrently if exists ${quoteIdent2(name)}`);
309
309
  }
310
310
  function concurrentIndexName(sql) {
311
311
  const match = /^create\s+(?:unique\s+)?index\s+concurrently\s+(?:if\s+not\s+exists\s+)?(?:"([^"]+)"|([A-Za-z_][\w$]*))/i.exec(sql.trim());
@@ -331,7 +331,7 @@ async function assertSchemaUsageLanded(connection, sql) {
331
331
  throw new OkmError2("OKM1825", `Grant usage on schema ${schema} to ${role} did not take effect.`, {
332
332
  kind: "forbidden",
333
333
  fix: {
334
- summary: `Make the migration role the owner of schema ${schema}. ALTER SCHEMA ${quoteIdent(schema)} OWNER TO <migration role>.`
334
+ summary: `Make the migration role the owner of schema ${schema}. ALTER SCHEMA ${quoteIdent2(schema)} OWNER TO <migration role>.`
335
335
  }
336
336
  });
337
337
  }
@@ -423,11 +423,11 @@ function readReference(tables, casing, head) {
423
423
  function referenceInserts(tables, schema) {
424
424
  const statements = [];
425
425
  for (const item of tables) {
426
- const conflict = item.key.map((name) => quoteIdent(name)).join(", ");
426
+ const conflict = item.key.map((name) => quoteIdent2(name)).join(", ");
427
427
  for (const row of item.rows) {
428
- const columns = row.map(([name]) => quoteIdent(name)).join(", ");
428
+ const columns = row.map(([name]) => quoteIdent2(name)).join(", ");
429
429
  const values = row.map(([, value]) => literal(value)).join(", ");
430
- statements.push(`insert into ${qualify(schema, item.table)} (${columns}) values (${values}) on conflict (${conflict}) do nothing`);
430
+ statements.push(`insert into ${qualify2(schema, item.table)} (${columns}) values (${values}) on conflict (${conflict}) do nothing`);
431
431
  }
432
432
  }
433
433
  return statements;
@@ -616,7 +616,7 @@ async function installSnapshot(connection, head, schema, reference, session, mig
616
616
  if (created !== undefined && created === migrationRole) {
617
617
  await flush();
618
618
  await grantSchema(connection, schema, created);
619
- await connection.execute(`grant select, insert, update on okm_meta, okm_history, okm_backfill to ${quoteIdent(created)}`);
619
+ await connection.execute(`grant select, insert, update on okm_meta, okm_history, okm_backfill to ${quoteIdent2(created)}`);
620
620
  await assumeRole(connection, created, session);
621
621
  }
622
622
  }
@@ -15,7 +15,7 @@ import {
15
15
  expectOf2,
16
16
  allowSet2,
17
17
  noteGuarded2
18
- } from "./bxas03mq.js";
18
+ } from "./9dtgn1z2.js";
19
19
  import {
20
20
  emitWhere,
21
21
  projectExpr,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  build3
3
- } from "./n0jmpgj1.js";
3
+ } from "./cexb7z6b.js";
4
4
  export {
5
5
  build3 as build
6
6
  };
@@ -0,0 +1,35 @@
1
+ import {
2
+ quoteIdent2,
3
+ renderCatalog2,
4
+ uniqueBeforeForeignKey2,
5
+ ownedByView2,
6
+ dropObjectSql2,
7
+ createObjectSql2,
8
+ functionSql2,
9
+ viewSql2,
10
+ policyCreatePlan2,
11
+ policyDropPlan2,
12
+ refreshMaterializedViewSql2,
13
+ alterColumnSql2,
14
+ identitySequence2,
15
+ createTableSql2,
16
+ qualify2
17
+ } from "./fk9vef30.js";
18
+ import"./12z7aznj.js";
19
+ export {
20
+ alterColumnSql2 as alterColumnSql,
21
+ createObjectSql2 as createObjectSql,
22
+ createTableSql2 as createTableSql,
23
+ dropObjectSql2 as dropObjectSql,
24
+ functionSql2 as functionSql,
25
+ identitySequence2 as identitySequence,
26
+ ownedByView2 as ownedByView,
27
+ policyCreatePlan2 as policyCreatePlan,
28
+ policyDropPlan2 as policyDropPlan,
29
+ qualify2 as qualify,
30
+ quoteIdent2 as quoteIdent,
31
+ refreshMaterializedViewSql2 as refreshMaterializedViewSql,
32
+ renderCatalog2 as renderCatalog,
33
+ uniqueBeforeForeignKey2 as uniqueBeforeForeignKey,
34
+ viewSql2 as viewSql
35
+ };
@@ -3,18 +3,18 @@ import {
3
3
  } from "./cm3w0ywp.js";
4
4
  import {
5
5
  noTimeout
6
- } from "./q0cqt2sp.js";
6
+ } from "./tr64w5p0.js";
7
7
  import {
8
8
  noticeBuffer,
9
9
  WireSession
10
- } from "./mtw6jz76.js";
10
+ } from "./e275q7sd.js";
11
11
  import {
12
12
  BUNSQL_CAPABILITIES,
13
13
  driverErrors,
14
14
  rejectClosed,
15
15
  mapFailure,
16
16
  runCall
17
- } from "./ae4j5f42.js";
17
+ } from "./mfvx6kjx.js";
18
18
 
19
19
  // src/adapters/pg/bunsql.ts
20
20
  import { SQL as BunSQL } from "bun";
@@ -66,19 +66,19 @@ function open5(config) {
66
66
  };
67
67
  const run = (text, params, watch) => {
68
68
  const sent = dropped;
69
- return root.query(text, params, watch).catch((error) => import("./wvdjznah.js").then((mod) => mod.recover(sql, error, text, root.depth(), clientPools.has(pool), dropped > sent, () => root.query(text, params, watch))));
69
+ return root.query(text, params, watch).catch((error) => import("./cf8zdz5p.js").then((mod) => mod.recover(sql, error, text, root.depth(), clientPools.has(pool), dropped > sent, () => root.query(text, params, watch))));
70
70
  };
71
71
  const afterDrop = (text, params, watch) => {
72
72
  if (dropped === 0)
73
73
  return run(text, params, watch);
74
74
  const seen = dropped;
75
- return import("./wvdjznah.js").then((mod) => mod.drainClosed(sql).then(() => {
75
+ return import("./cf8zdz5p.js").then((mod) => mod.drainClosed(sql).then(() => {
76
76
  if (dropped === seen)
77
77
  dropped = 0;
78
78
  return run(text, params, watch);
79
79
  }));
80
80
  };
81
- const checkout = () => closed ? rejectClosed() : import("./wvdjznah.js").then((mod) => mod.checkout(held));
81
+ const checkout = () => closed ? rejectClosed() : import("./cf8zdz5p.js").then((mod) => mod.checkout(held));
82
82
  const pool = {
83
83
  capabilities: BUNSQL_CAPABILITIES,
84
84
  execute(text, params, options) {
@@ -101,12 +101,12 @@ function open5(config) {
101
101
  reserve: () => checkout(),
102
102
  stream(text, params) {
103
103
  return async function* () {
104
- const { streamRows } = await import("./wvdjznah.js");
104
+ const { streamRows } = await import("./cf8zdz5p.js");
105
105
  yield* streamRows(checkout, text, params);
106
106
  }();
107
107
  },
108
108
  listen(channel, onNotify) {
109
- return import("./wvdjznah.js").then((mod) => mod.listen(sql, parked, closed, channel, onNotify));
109
+ return import("./cf8zdz5p.js").then((mod) => mod.listen(sql, parked, closed, channel, onNotify));
110
110
  },
111
111
  stats: () => statsOf(counters, max),
112
112
  async close() {
@@ -10,6 +10,8 @@ function extension2(name, options = {}) {
10
10
  const schema = options.schema ?? "public";
11
11
  const relocatable = options.relocatable ?? true;
12
12
  const version = options.version;
13
+ const requires = options.requires;
14
+ const provides = options.provides;
13
15
  const record = extensionObject({
14
16
  name,
15
17
  schema,
@@ -22,6 +24,8 @@ function extension2(name, options = {}) {
22
24
  schema,
23
25
  relocatable,
24
26
  ...version !== undefined ? { version } : {},
27
+ ...requires !== undefined ? { requires } : {},
28
+ ...provides !== undefined ? { provides } : {},
25
29
  contribute(peers, built) {
26
30
  const names = peerNames(peers);
27
31
  assertDeclared(names, built);