okmodel 0.8.0 → 0.9.1
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.
- package/README.md +23 -1
- package/dist/adapters/pg/bunsql-extra.d.ts +5 -5
- package/dist/adapters/pg/bunsql.d.ts +6 -2
- package/dist/adapters/pg/nodepostgres.d.ts +16 -1
- package/dist/adapters/pg/postgres-extra.d.ts +3 -17
- package/dist/adapters/pg/postgresjs.d.ts +2 -1
- package/dist/contracts/driver.d.ts +3 -2
- package/dist/contracts/error.d.ts +1 -1
- package/dist/dialects/pg/errors.d.ts +2 -0
- package/dist/dialects/pg/ext/btree-gin.d.ts +26 -0
- package/dist/dialects/pg/ext/btree-gin.js +20 -0
- package/dist/dialects/pg/ext/btree-gist.d.ts +26 -0
- package/dist/dialects/pg/ext/btree-gist.js +20 -0
- package/dist/dialects/pg/ext/call.d.ts +53 -0
- package/dist/dialects/pg/ext/citext.js +1 -1
- package/dist/dialects/pg/ext/feature.d.ts +26 -0
- package/dist/dialects/pg/ext/fuzzystrmatch.d.ts +34 -0
- package/dist/dialects/pg/ext/fuzzystrmatch.js +33 -0
- package/dist/dialects/pg/ext/hstore.d.ts +41 -0
- package/dist/dialects/pg/ext/hstore.js +29 -0
- package/dist/dialects/pg/ext/index.d.ts +56 -0
- package/dist/dialects/pg/ext/index.js +1 -1
- package/dist/dialects/pg/ext/ltree.d.ts +41 -0
- package/dist/dialects/pg/ext/ltree.js +29 -0
- package/dist/dialects/pg/ext/pg-trgm.js +4 -13
- package/dist/dialects/pg/ext/pgcrypto.d.ts +33 -0
- package/dist/dialects/pg/ext/pgcrypto.js +33 -0
- package/dist/dialects/pg/ext/unaccent.d.ts +26 -0
- package/dist/dialects/pg/ext/unaccent.js +21 -0
- package/dist/dialects/pg/ext/using.d.ts +23 -0
- package/dist/dialects/pg/ext/versions.d.ts +36 -0
- package/dist/dialects/pg/external.d.ts +19 -0
- package/dist/dialects/pg/filters.d.ts +2 -2
- package/dist/dialects/pg/fn/index.js +5 -5
- package/dist/dialects/pg/index.d.ts +1 -0
- package/dist/dialects/pg/index.js +19 -14
- package/dist/dialects/pg/introspect.d.ts +12 -0
- package/dist/dialects/pg/view/index.js +7 -7
- package/dist/dialects/pg/view/scratch.d.ts +4 -1
- package/dist/runtime/artifact-file.d.ts +22 -0
- package/dist/runtime/client.d.ts +10 -0
- package/dist/runtime/drift-detail.d.ts +2 -1
- package/dist/runtime/drift.d.ts +3 -10
- package/dist/runtime/param-limit.d.ts +20 -0
- package/dist/runtime/pg/bun.js +4 -4
- package/dist/runtime/pg/neon.js +4 -4
- package/dist/runtime/pg/pg.js +4 -4
- package/dist/runtime/pg/pglite.js +4 -4
- package/dist/runtime/pg/postgresjs.js +11 -11
- package/dist/runtime/server-check.d.ts +36 -6
- package/dist/runtime/tenancy/index.js +1 -1
- package/dist/runtime/traits/index.js +6 -6
- package/dist/runtime/validate/index.js +2 -2
- package/dist/runtime/write.d.ts +1 -1
- package/dist/shared/{4m6hskg8.js → 0j6qe91y.js} +4 -4
- package/dist/shared/{6m78c8ss.js → 1h5h1rf5.js} +1 -1
- package/dist/shared/{4vbf83xx.js → 2vcnpf0n.js} +1 -1
- package/dist/shared/{qd9hhd8f.js → 3ap5hxvj.js} +2 -1
- package/dist/shared/{v1wad97q.js → 3d7a80fq.js} +1 -1
- package/dist/shared/{wcrheftc.js → 3dr444ny.js} +58 -79
- package/dist/shared/{hm5f8jby.js → 3vvpcphd.js} +8 -7
- package/dist/shared/{760ppr76.js → 4a3mmhhe.js} +2 -2
- package/dist/shared/{mkrn359n.js → 4pkz5nvw.js} +222 -39
- package/dist/shared/{agsfb86s.js → 4te76xc5.js} +4 -4
- package/dist/shared/{63f4ksbz.js → 60y4ahmw.js} +1 -1
- package/dist/shared/61bmrmhr.js +35 -0
- package/dist/shared/{bxas03mq.js → 63qjmhnp.js} +100 -17
- package/dist/shared/{g5yc06ka.js → 67w3kn71.js} +1 -1
- package/dist/shared/{jgqj11w4.js → 6f0z3hzh.js} +4 -0
- package/dist/shared/{njga14v4.js → 6vfvsdkt.js} +10 -8
- package/dist/shared/{kj9d8maq.js → 6xqvesa5.js} +1 -1
- package/dist/shared/8gdbty5v.js +665 -0
- package/dist/shared/{pan0370z.js → 8ma6drzr.js} +211 -30
- package/dist/shared/{mnvjvqyp.js → 8p2bgye0.js} +124 -32
- package/dist/shared/{mfedzr74.js → 8qwqrxed.js} +14 -6
- package/dist/shared/{hfqmpasr.js → 8v7vzpgt.js} +11 -8
- package/dist/shared/{7ghwamrf.js → 99qp9vtg.js} +1 -1
- package/dist/shared/{zgex00fd.js → ak61ye1f.js} +5 -5
- package/dist/shared/{dpc2r7rb.js → bdekbvmt.js} +218 -95
- package/dist/shared/{jebgrkeq.js → bxjq6xqv.js} +2 -2
- package/dist/shared/c7dqd3gk.js +1806 -0
- package/dist/shared/ddh72ym5.js +20 -0
- package/dist/shared/e1c55v04.js +10 -0
- package/dist/shared/{mtw6jz76.js → e275q7sd.js} +1 -1
- package/dist/shared/{k86n8vq3.js → ekhq3ytz.js} +1 -1
- package/dist/shared/esy4dyxe.js +17 -0
- package/dist/shared/{gcefca6p.js → f9t9g54z.js} +22 -9
- package/dist/shared/{sjk86yrx.js → fk9vef30.js} +84 -73
- package/dist/shared/fkjne6gx.js +8 -0
- package/dist/shared/{e8zyaqvj.js → fne90dvz.js} +4 -1
- package/dist/shared/{needfe47.js → g89fmz5s.js} +1 -1
- package/dist/shared/{m4xff2a6.js → ghqzdp94.js} +2 -2
- package/dist/shared/{n0jmpgj1.js → gr9sn4za.js} +1 -1
- package/dist/shared/{5mtf6cj3.js → gzgfsspx.js} +5 -2
- package/dist/shared/h9811jjm.js +17 -0
- package/dist/shared/{z581d7ny.js → hgt69zjf.js} +2 -2
- package/dist/shared/{35q0n9tz.js → jvxcp1qk.js} +71 -87
- package/dist/shared/k73e8n9d.js +136 -0
- package/dist/shared/{195pzzzz.js → kzgrcy8s.js} +12 -8
- package/dist/shared/kzgrnckd.js +29 -0
- package/dist/shared/{p3xbdcvt.js → mz48rs74.js} +68 -8
- package/dist/shared/{zbqbmmrp.js → n6je5b28.js} +13 -26
- package/dist/shared/{b6d6p0zc.js → ns35jqz0.js} +75 -49
- package/dist/shared/{n05z9nwz.js → nstwgzn8.js} +1 -1
- package/dist/{tooling/shared/08kemxjd.js → shared/pgsak1yw.js} +1 -1
- package/dist/shared/py2zrrm6.js +451 -0
- package/dist/shared/{9dr2qnx7.js → qqm3ze6q.js} +1 -1
- package/dist/shared/{wvdjznah.js → rcjm0yn7.js} +31 -38
- package/dist/shared/rged92v6.js +17 -0
- package/dist/shared/{jp36k7dp.js → rw4tpcd0.js} +81 -51
- package/dist/shared/{bsek72fg.js → s5qe47a6.js} +3 -0
- package/dist/shared/{1d9q9cv2.js → smxzjz60.js} +2 -2
- package/dist/shared/{wz2a78mp.js → th5rnaxw.js} +1 -1
- package/dist/{tooling/shared/rs1jb051.js → shared/tr64w5p0.js} +1 -1
- package/dist/shared/{14x60fbf.js → tyqapcgk.js} +73 -10
- package/dist/shared/vsna85qf.js +8 -0
- package/dist/shared/{63qtkrca.js → vy47ryqa.js} +55 -5
- package/dist/shared/{jx2m62cs.js → wbdh9qbg.js} +7 -5
- package/dist/shared/{f4jy1j7x.js → wp7y8q3y.js} +946 -105
- package/dist/shared/{16kvjebh.js → xbd9xs6p.js} +7 -26
- package/dist/shared/{bah9nbg3.js → xbvz446k.js} +18 -23
- package/dist/shared/{p5nh3r8q.js → y6tfjk9q.js} +2 -2
- package/dist/shared/{3bb7wsqt.js → ycnft340.js} +1 -1
- package/dist/shared/{z7s6fpxv.js → ymenf259.js} +1 -1
- package/dist/shared/{0wrea3jq.js → ysdw2fg3.js} +10 -2
- package/dist/shared/zecrwdk9.js +61 -0
- package/dist/shared/{3t6kw83m.js → zm2rzqba.js} +2 -1
- package/dist/tooling/cli.js +200 -50
- package/dist/tooling/driver-run.js +109 -343
- package/dist/tooling/github/comment.d.ts +56 -0
- package/dist/tooling/github/post-comment.d.ts +17 -0
- package/dist/tooling/migrate/apply.d.ts +17 -2
- package/dist/tooling/migrate/commands.d.ts +2 -1
- package/dist/tooling/migrate/config.d.ts +13 -0
- package/dist/tooling/migrate/drift.d.ts +12 -0
- package/dist/tooling/migrate/driver-url.d.ts +17 -0
- package/dist/tooling/migrate/export.d.ts +165 -0
- package/dist/tooling/migrate/ext-surface.d.ts +80 -0
- package/dist/tooling/migrate/ext.d.ts +31 -4
- package/dist/tooling/migrate/import-drizzle.d.ts +40 -0
- package/dist/tooling/migrate/index.d.ts +3 -0
- package/dist/tooling/migrate/index.js +57 -10
- package/dist/tooling/migrate/lint-rules.d.ts +18 -1
- package/dist/tooling/migrate/lint.d.ts +14 -1
- package/dist/tooling/migrate/place.d.ts +18 -0
- package/dist/tooling/migrate/plan-json.d.ts +65 -0
- package/dist/tooling/migrate/policy.d.ts +17 -5
- package/dist/tooling/migrate/pooler-probe.d.ts +23 -0
- package/dist/tooling/migrate/project.d.ts +10 -1
- package/dist/tooling/migrate/pull-emit.d.ts +98 -0
- package/dist/tooling/migrate/pull-routines.d.ts +126 -0
- package/dist/tooling/migrate/pull-verify.d.ts +26 -0
- package/dist/tooling/migrate/pull.d.ts +65 -0
- package/dist/tooling/migrate/reprint.d.ts +32 -0
- package/dist/tooling/migrate/runner.d.ts +24 -1
- package/dist/tooling/migrate/sandbox.d.ts +8 -2
- package/dist/tooling/migrate/schema-api.d.ts +43 -0
- package/dist/tooling/migrate/sql-lex.d.ts +18 -0
- package/dist/tooling/shared/{ppnnnvj8.js → 09a6vsys.js} +1 -1
- package/dist/tooling/shared/{7ae7rjmn.js → 0v9ptnxp.js} +8 -8
- package/dist/tooling/shared/{fb9k2qwd.js → 0wtzps9p.js} +11 -30
- package/dist/tooling/shared/{a6pp9d12.js → 0yhf1db4.js} +6 -6
- package/dist/tooling/shared/{dy672fz6.js → 19msgrsc.js} +2 -2
- package/dist/{shared/q0cqt2sp.js → tooling/shared/1fwfm5m3.js} +1 -1
- package/dist/tooling/shared/{f9mphxej.js → 2jdn09e2.js} +401 -24
- package/dist/tooling/shared/{jne7b93p.js → 2qrte2ct.js} +5 -5
- package/dist/tooling/shared/{5bvw2nev.js → 2v4nwnkb.js} +1 -1
- package/dist/tooling/shared/{spk1jg3r.js → 33z39trp.js} +106 -23
- package/dist/tooling/shared/{z8d7ptht.js → 353vnw9z.js} +5 -5
- package/dist/tooling/shared/{dw08f3m8.js → 390kry9g.js} +2 -2
- package/dist/tooling/shared/{xjs6zqtc.js → 3f6etb9z.js} +18 -31
- package/dist/{shared/bnby0esn.js → tooling/shared/3t2cqmsx.js} +1 -1
- package/dist/tooling/shared/{wwnekq5n.js → 4dzvjtpy.js} +1 -1
- package/dist/tooling/shared/{y5656f0e.js → 4ec0nxvw.js} +10 -10
- package/dist/tooling/shared/{3m1hkg7z.js → 4tg2bn41.js} +59 -78
- package/dist/tooling/shared/{zvnhh1n0.js → 5rah55z0.js} +2 -2
- package/dist/tooling/shared/{pqy21k24.js → 804w1t69.js} +4 -4
- package/dist/tooling/shared/8g0m0rvd.js +134 -0
- package/dist/tooling/shared/8msbtw5s.js +8 -0
- package/dist/tooling/shared/{4d2w25vw.js → 8t22h3h7.js} +2 -2
- package/dist/tooling/shared/{smn6kz1p.js → 91c59b7b.js} +2 -2
- package/dist/tooling/shared/{aftb2mwr.js → adk9k6va.js} +1 -1
- package/dist/tooling/shared/{j9t5s12a.js → ajjd5cwz.js} +2 -2
- package/dist/tooling/shared/{cmptmb4f.js → angjck01.js} +1 -1
- package/dist/tooling/shared/{yw30vnq2.js → asnnc3v5.js} +1 -1
- package/dist/tooling/shared/{ma2340rx.js → bj1kyqc8.js} +2 -2
- package/dist/tooling/shared/{2wtvc7rw.js → bt3tjemb.js} +11 -3
- package/dist/tooling/shared/{ec71zqgt.js → chk2bh4f.js} +2 -2
- package/dist/tooling/shared/{gmcf9cxf.js → ckq4z5ax.js} +5 -2
- package/dist/tooling/shared/{w7qe8sj1.js → d3rhb24q.js} +1 -1
- package/dist/tooling/shared/{y031jct9.js → d8q00vxg.js} +4 -4
- package/dist/tooling/shared/{vs0t6qt8.js → dx188rxs.js} +2 -2
- package/dist/tooling/shared/{g9ad4n80.js → efq6p9df.js} +35 -42
- package/dist/tooling/shared/{ddjtfgnx.js → en6rwzq0.js} +3 -3
- package/dist/tooling/shared/{6nyfyw70.js → f2r5g0fs.js} +2 -2
- package/dist/tooling/shared/{03k6res6.js → f4gep0nk.js} +1 -1
- package/dist/tooling/shared/{gfvtj6d0.js → f8a010fm.js} +13 -11
- package/dist/tooling/shared/{3tq8pnb8.js → fdsek6pa.js} +1 -1
- package/dist/tooling/shared/fvmrxsd1.js +8 -0
- package/dist/tooling/shared/{733a1tq3.js → g3xybeqf.js} +4 -3
- package/dist/tooling/shared/{pwsytxm5.js → gefmpwsa.js} +1 -1
- package/dist/tooling/shared/{mtrqn2hn.js → gjj71hfh.js} +25 -30
- package/dist/tooling/shared/{8sqrsw3s.js → jgzt69pa.js} +5 -5
- package/dist/tooling/shared/{nf7jmhfa.js → jm30k2ca.js} +10 -8
- package/dist/tooling/shared/{vx86qjv8.js → kayqzpbk.js} +6 -3
- package/dist/tooling/shared/{zhwnfyb2.js → kvw1672d.js} +1 -1
- package/dist/tooling/shared/{rq5kk8j6.js → mr1kcgpw.js} +3 -3
- package/dist/tooling/shared/{72fyg4zv.js → mwbdf409.js} +1 -1
- package/dist/tooling/shared/{wt7j7nf6.js → ns9207v3.js} +1 -1
- package/dist/tooling/shared/{9xzm7hjg.js → p6tjv97k.js} +3 -3
- package/dist/tooling/shared/{yfr8hzhm.js → p73evwf0.js} +1 -1
- package/dist/tooling/shared/{dzx85q70.js → phc1nc4g.js} +1 -1
- package/dist/tooling/shared/{417zdsk7.js → ppybjw50.js} +79 -16
- package/dist/tooling/shared/{yk9mp7vb.js → qdrn8ghn.js} +5 -4
- package/dist/tooling/shared/rd8h01ta.js +20 -0
- package/dist/tooling/shared/{bz2dqhab.js → rwg8y90m.js} +3 -3
- package/dist/tooling/shared/{xhrnjch9.js → ry2f3w8p.js} +3 -3
- package/dist/tooling/shared/{a7q7t4n3.js → ryc5sa58.js} +8 -8
- package/dist/tooling/shared/{2revefqt.js → ss87qxwv.js} +2 -2
- package/dist/tooling/shared/{rf83gr2d.js → vg68k11z.js} +7 -3
- package/dist/tooling/shared/{p7f08ktn.js → vms9dta5.js} +73 -89
- package/dist/tooling/shared/{3rrw5w8f.js → xchpnbdv.js} +1 -1
- package/dist/tooling/shared/{djydjpqt.js → xn6p01fh.js} +5 -5
- package/dist/tooling/shared/{9kazs5p6.js → xwr6q618.js} +3 -3
- package/dist/tooling/shared/{ep8zh3bk.js → xx3gmq94.js} +1 -1
- package/dist/tooling/shared/{tn8gay14.js → y2bd7yfx.js} +21 -13
- package/dist/tooling/shared/{vraj6d74.js → y4gq9rbe.js} +11 -11
- package/dist/tooling/shared/y4vwft92.js +9 -0
- package/dist/tooling/shared/{345tbc2k.js → yz68xcmc.js} +1 -1
- package/dist/tooling/testing/factories.d.ts +1 -3
- package/dist/tooling/testing/index.js +2 -2
- package/package.json +39 -9
- package/dist/shared/3449rcae.js +0 -14
- package/dist/shared/fjpnhqan.js +0 -71
- package/dist/shared/n41w4fbz.js +0 -113
- package/dist/tooling/shared/pw8fgahx.js +0 -69
- /package/dist/shared/{ae4j5f42.js → mfvx6kjx.js} +0 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DriverError2,
|
|
3
3
|
isConnectionFailure
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./2jdn09e2.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
send3,
|
|
7
7
|
reserve2,
|
|
8
|
-
|
|
9
|
-
} from "./
|
|
8
|
+
releaseReserved2
|
|
9
|
+
} from "./3f6etb9z.js";
|
|
10
10
|
import {
|
|
11
11
|
resetSession2,
|
|
12
12
|
refuseWhenLost2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./8t22h3h7.js";
|
|
14
14
|
import {
|
|
15
15
|
cursorStream
|
|
16
16
|
} from "./7kms6fvj.js";
|
|
17
17
|
import {
|
|
18
18
|
WireSession
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./asnnc3v5.js";
|
|
20
20
|
import {
|
|
21
21
|
noTimeout
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./1fwfm5m3.js";
|
|
23
23
|
import {
|
|
24
24
|
rejectClosed,
|
|
25
25
|
runCall
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./ry2f3w8p.js";
|
|
27
27
|
|
|
28
28
|
// src/adapters/pg/bunsql-extra.ts
|
|
29
29
|
async function recover(sql, error, text, depth, clientRead, closedDuring, again) {
|
|
@@ -60,19 +60,13 @@ function lostQuery(error) {
|
|
|
60
60
|
function socketClosed(error) {
|
|
61
61
|
if (!(error instanceof Error))
|
|
62
62
|
return false;
|
|
63
|
-
if (error.message
|
|
63
|
+
if (bunClosed(error.message))
|
|
64
64
|
return true;
|
|
65
|
-
return error.cause instanceof Error && error.cause.message
|
|
65
|
+
return error.cause instanceof Error && bunClosed(error.cause.message);
|
|
66
66
|
}
|
|
67
|
-
async function listen(sql,
|
|
67
|
+
async function listen(sql, closed, channel, onNotify) {
|
|
68
68
|
if (closed)
|
|
69
69
|
return rejectClosed();
|
|
70
|
-
const pending = parked.splice(0);
|
|
71
|
-
for (const reserved of pending) {
|
|
72
|
-
const done = reserved.release();
|
|
73
|
-
if (done instanceof Promise)
|
|
74
|
-
await done;
|
|
75
|
-
}
|
|
76
70
|
const subscription = await sql.listen(channel, onNotify);
|
|
77
71
|
return async () => {
|
|
78
72
|
await subscription.unlisten();
|
|
@@ -82,9 +76,9 @@ async function checkout(held) {
|
|
|
82
76
|
const { counters, isClosed } = held;
|
|
83
77
|
if (isClosed())
|
|
84
78
|
return rejectClosed();
|
|
85
|
-
const reserved = await
|
|
79
|
+
const reserved = await reserve2(held.sql, held.acquireMs, counters);
|
|
86
80
|
counters.reserved += 1;
|
|
87
|
-
const session = new WireSession((text, params) =>
|
|
81
|
+
const session = new WireSession((text, params) => send3(reserved, text, params), held.notices, isClosed, false, () => {
|
|
88
82
|
counters.reservedBusy += 1;
|
|
89
83
|
}, () => {
|
|
90
84
|
counters.reservedBusy = Math.max(0, counters.reservedBusy - 1);
|
|
@@ -122,7 +116,7 @@ async function checkout(held) {
|
|
|
122
116
|
if (gone !== undefined)
|
|
123
117
|
return gone;
|
|
124
118
|
return guard(() => runCall(isClosed(), options, async (watch) => {
|
|
125
|
-
const { runAtomicBatch } = await import("./
|
|
119
|
+
const { runAtomicBatch } = await import("./xchpnbdv.js");
|
|
126
120
|
return runAtomicBatch(session, statements, watch);
|
|
127
121
|
}));
|
|
128
122
|
},
|
|
@@ -138,20 +132,33 @@ async function checkout(held) {
|
|
|
138
132
|
try {
|
|
139
133
|
if (!lost.on)
|
|
140
134
|
await reset(session, reserved);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
else if (session.depth() > 0 && !reportsClosed(reserved)) {
|
|
136
|
+
await reserved.unsafe("ROLLBACK").catch(() => {
|
|
137
|
+
return;
|
|
138
|
+
});
|
|
139
|
+
session.abandon();
|
|
140
|
+
}
|
|
141
|
+
} catch {
|
|
142
|
+
lost.on = true;
|
|
146
143
|
} finally {
|
|
147
144
|
counters.reserved = Math.max(0, counters.reserved - 1);
|
|
148
145
|
if (lost.on) {
|
|
149
146
|
try {
|
|
150
147
|
reserved.release();
|
|
151
148
|
} catch {}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
if (counters.reserved === 0)
|
|
150
|
+
await flushClosed(held.sql);
|
|
151
|
+
} else {
|
|
152
|
+
try {
|
|
153
|
+
await releaseReserved2(reserved);
|
|
154
|
+
} catch {
|
|
155
|
+
try {
|
|
156
|
+
reserved.release();
|
|
157
|
+
} catch {}
|
|
158
|
+
if (counters.reserved === 0)
|
|
159
|
+
await flushClosed(held.sql);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
155
162
|
}
|
|
156
163
|
}
|
|
157
164
|
};
|
|
@@ -159,20 +166,6 @@ async function checkout(held) {
|
|
|
159
166
|
function reportsClosed(reserved) {
|
|
160
167
|
return Reflect.get(reserved, "closed") === true;
|
|
161
168
|
}
|
|
162
|
-
async function takeOpen(held) {
|
|
163
|
-
while (held.parked.length > 0) {
|
|
164
|
-
const next = held.parked.pop();
|
|
165
|
-
if (next === undefined)
|
|
166
|
-
return;
|
|
167
|
-
if (!reportsClosed(next))
|
|
168
|
-
return next;
|
|
169
|
-
try {
|
|
170
|
-
next.release();
|
|
171
|
-
} catch {}
|
|
172
|
-
await flushClosed(held.sql);
|
|
173
|
-
}
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
169
|
async function flushClosed(sql) {
|
|
177
170
|
for (let attempt = 0;attempt < 3; attempt += 1) {
|
|
178
171
|
try {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build3
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./5rah55z0.js";
|
|
4
4
|
import {
|
|
5
5
|
attachHttp
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./gjj71hfh.js";
|
|
7
7
|
import {
|
|
8
8
|
OkmError,
|
|
9
9
|
rejectKeys,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
indexes,
|
|
12
12
|
isRecord,
|
|
13
13
|
fail2
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./2jdn09e2.js";
|
|
15
15
|
|
|
16
16
|
// src/runtime/read-stream.ts
|
|
17
17
|
var DEFAULT_BATCH = 1000;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
touchFields,
|
|
3
3
|
fieldSealed
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./33z39trp.js";
|
|
5
5
|
import {
|
|
6
6
|
throwNamed,
|
|
7
7
|
projectExpr,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isRecord,
|
|
11
11
|
registerFailFix,
|
|
12
12
|
fail2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./2jdn09e2.js";
|
|
14
14
|
|
|
15
15
|
// src/runtime/conflict.ts
|
|
16
16
|
registerFailFix("OKM1104", "Set on to the columns of a unique constraint or the primary key.");
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DriverError2,
|
|
3
3
|
isConnectionLost
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./2jdn09e2.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./
|
|
6
|
+
connectClient2,
|
|
7
|
+
send2
|
|
8
|
+
} from "./4ec0nxvw.js";
|
|
9
9
|
import {
|
|
10
10
|
resetSession2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./8t22h3h7.js";
|
|
12
12
|
import {
|
|
13
13
|
WireSession
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./asnnc3v5.js";
|
|
15
15
|
import {
|
|
16
16
|
noTimeout
|
|
17
|
-
} from "./
|
|
17
|
+
} from "./1fwfm5m3.js";
|
|
18
18
|
import {
|
|
19
19
|
rejectClosed,
|
|
20
20
|
runCall
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./ry2f3w8p.js";
|
|
22
22
|
|
|
23
23
|
// src/adapters/pg/neon-extra.ts
|
|
24
24
|
async function checkout(held) {
|
|
25
25
|
const { pool, counters, named, isClosed } = held;
|
|
26
26
|
if (isClosed())
|
|
27
27
|
return rejectClosed();
|
|
28
|
-
const client = await
|
|
28
|
+
const client = await connectClient2(pool, held.acquireMs, counters);
|
|
29
29
|
counters.reserved += 1;
|
|
30
30
|
let lost = false;
|
|
31
31
|
const onError = () => {
|
|
@@ -35,7 +35,7 @@ async function checkout(held) {
|
|
|
35
35
|
events.on("error", onError);
|
|
36
36
|
const local = new Set;
|
|
37
37
|
const session = new WireSession((text, params) => {
|
|
38
|
-
const pending =
|
|
38
|
+
const pending = send2(client, text, params, named);
|
|
39
39
|
const guarded = pending.catch((error) => {
|
|
40
40
|
if (isConnectionLost(error) || lost) {
|
|
41
41
|
lost = true;
|
|
@@ -67,7 +67,7 @@ async function checkout(held) {
|
|
|
67
67
|
if (refused !== undefined)
|
|
68
68
|
return refused;
|
|
69
69
|
return guard(() => runCall(isClosed(), options, async (watch) => {
|
|
70
|
-
const { runAtomicBatch } = await import("./
|
|
70
|
+
const { runAtomicBatch } = await import("./xchpnbdv.js");
|
|
71
71
|
return runAtomicBatch(session, statements, watch);
|
|
72
72
|
}));
|
|
73
73
|
},
|
|
@@ -78,6 +78,8 @@ async function checkout(held) {
|
|
|
78
78
|
try {
|
|
79
79
|
if (!lost)
|
|
80
80
|
await reset(session, client);
|
|
81
|
+
} catch {
|
|
82
|
+
lost = true;
|
|
81
83
|
} finally {
|
|
82
84
|
counters.reserved = Math.max(0, counters.reserved - 1);
|
|
83
85
|
events.removeListener("error", onError);
|
|
@@ -15,9 +15,10 @@ import {
|
|
|
15
15
|
expectOf2,
|
|
16
16
|
allowSet2,
|
|
17
17
|
noteGuarded2
|
|
18
|
-
} from "./
|
|
19
|
-
import"./
|
|
20
|
-
import"./
|
|
18
|
+
} from "./33z39trp.js";
|
|
19
|
+
import"./fdsek6pa.js";
|
|
20
|
+
import"./rd8h01ta.js";
|
|
21
|
+
import"./angjck01.js";
|
|
21
22
|
export {
|
|
22
23
|
Sql2 as Sql,
|
|
23
24
|
WRITE_PARAM_BUDGET2 as WRITE_PARAM_BUDGET,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
logicalIntent,
|
|
12
12
|
appliedRules,
|
|
13
13
|
rejectKeys
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./2jdn09e2.js";
|
|
15
15
|
|
|
16
16
|
// src/runtime/client.ts
|
|
17
17
|
var PLAN_LIMIT = 64;
|
|
@@ -84,7 +84,7 @@ function openClient(session) {
|
|
|
84
84
|
},
|
|
85
85
|
close,
|
|
86
86
|
connected: session.connected,
|
|
87
|
-
tx: (...args) => import("./
|
|
87
|
+
tx: (...args) => import("./mr1kcgpw.js").then((mod) => mod.tx(session, args)),
|
|
88
88
|
batch: (ops, options) => batchHandle(session, ops, options),
|
|
89
89
|
...session.tx?.extras
|
|
90
90
|
};
|
|
@@ -119,7 +119,7 @@ function tableApi(session, table, view, uses) {
|
|
|
119
119
|
const api = {
|
|
120
120
|
find(options = {}) {
|
|
121
121
|
if ("lock" in options) {
|
|
122
|
-
return lazyRead(session, () => import("./
|
|
122
|
+
return lazyRead(session, () => import("./dx188rxs.js"), table, options, base, view);
|
|
123
123
|
}
|
|
124
124
|
return start(session, "find", table, options, base, view);
|
|
125
125
|
},
|
|
@@ -133,10 +133,10 @@ function tableApi(session, table, view, uses) {
|
|
|
133
133
|
return start(session, "exists", table, options, base, view);
|
|
134
134
|
},
|
|
135
135
|
page(options) {
|
|
136
|
-
return lazyRead(session, () => import("./
|
|
136
|
+
return lazyRead(session, () => import("./ajjd5cwz.js"), table, options, base, view);
|
|
137
137
|
},
|
|
138
138
|
aggregate(options = {}) {
|
|
139
|
-
return lazyRead(session, () => import("./
|
|
139
|
+
return lazyRead(session, () => import("./rwg8y90m.js"), table, options, base, view);
|
|
140
140
|
},
|
|
141
141
|
insert(data, options = {}) {
|
|
142
142
|
return writeHandle(session, "insert", table, data, options, mods);
|
|
@@ -149,9 +149,9 @@ function tableApi(session, table, view, uses) {
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
for (const walk of ["descendants", "ancestors"]) {
|
|
152
|
-
api[walk] = (id, options) => lazyRead(session, () => import("./
|
|
152
|
+
api[walk] = (id, options) => lazyRead(session, () => import("./390kry9g.js"), table, { id, walk, options }, base, view);
|
|
153
153
|
}
|
|
154
|
-
api.sync = (id, relation, ids, options) => lazyRead(session, () => import("./
|
|
154
|
+
api.sync = (id, relation, ids, options) => lazyRead(session, () => import("./353vnw9z.js"), table, { id, relation, ids, options }, base, view, true);
|
|
155
155
|
const hooks = session.schema.hooks;
|
|
156
156
|
if (hooks !== undefined) {
|
|
157
157
|
for (const hook of hooks) {
|
|
@@ -171,13 +171,13 @@ function tableApi(session, table, view, uses) {
|
|
|
171
171
|
return api;
|
|
172
172
|
}
|
|
173
173
|
function batchHandle(session, ops, options, replica) {
|
|
174
|
-
return queryHandle(() => import("./
|
|
174
|
+
return queryHandle(() => import("./kayqzpbk.js").then((mod) => mod.batch(session, ops, options, replica)), {
|
|
175
175
|
replica: () => batchHandle(session, ops, options, true)
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
var writers;
|
|
179
179
|
function loadWrite() {
|
|
180
|
-
writers ??= import("./
|
|
180
|
+
writers ??= import("./g3xybeqf.js");
|
|
181
181
|
return writers;
|
|
182
182
|
}
|
|
183
183
|
function queryHandle(run, extra) {
|
|
@@ -287,7 +287,7 @@ function lazyRead(session, load, table, options, mods, view, sync) {
|
|
|
287
287
|
return queryHandle(() => read().then((box) => box.it), extra);
|
|
288
288
|
}
|
|
289
289
|
async function decodeRows(plan, rows, table) {
|
|
290
|
-
return plan.outputs.includes.length === 0 ? decodeResult(plan, rows, table) : (await import("./
|
|
290
|
+
return plan.outputs.includes.length === 0 ? decodeResult(plan, rows, table) : (await import("./p73evwf0.js")).decodeIncluded(plan, rows, table);
|
|
291
291
|
}
|
|
292
292
|
function readHandle(session, table, call, mods, decode, extra) {
|
|
293
293
|
let prepared;
|
|
@@ -297,17 +297,17 @@ function readHandle(session, table, call, mods, decode, extra) {
|
|
|
297
297
|
if (prepared !== undefined)
|
|
298
298
|
return prepared;
|
|
299
299
|
if (mods.uses !== undefined) {
|
|
300
|
-
call = (await import("./
|
|
300
|
+
call = (await import("./bj1kyqc8.js")).refine(session.schema, origin, mods.uses);
|
|
301
301
|
}
|
|
302
302
|
if (searched) {
|
|
303
|
-
call = (await import("./
|
|
303
|
+
call = (await import("./91c59b7b.js")).applyTextSearch(session.schema, call);
|
|
304
304
|
}
|
|
305
305
|
const hooks = await hooksFor(call);
|
|
306
306
|
if (readNeedsOperatorSql(session.schema, call) || hooks?.needsOperator(session.schema, call)) {
|
|
307
307
|
await loadOperatorSql();
|
|
308
308
|
}
|
|
309
309
|
if (call.build === undefined && selectHasWindow(call.select)) {
|
|
310
|
-
call = (await import("./
|
|
310
|
+
call = (await import("./804w1t69.js")).attach(session.schema, call);
|
|
311
311
|
}
|
|
312
312
|
const bound = bindCall(session.schema, call, hooks);
|
|
313
313
|
let plan = session.cache.get(bound.key);
|
|
@@ -327,6 +327,9 @@ function readHandle(session, table, call, mods, decode, extra) {
|
|
|
327
327
|
const run = async () => {
|
|
328
328
|
await session.connected;
|
|
329
329
|
const { plan, params } = await prepare();
|
|
330
|
+
if (params.length > 65535) {
|
|
331
|
+
(await import("./fvmrxsd1.js")).refuseParamLimit(params.length);
|
|
332
|
+
}
|
|
330
333
|
try {
|
|
331
334
|
const result = await session.pool.execute(plan.text, params, callOptions(call, session.timeouts?.statement));
|
|
332
335
|
if (session.hookm && result.notices.length) {
|
|
@@ -337,7 +340,7 @@ function readHandle(session, table, call, mods, decode, extra) {
|
|
|
337
340
|
const mapped = await mapError(session, error);
|
|
338
341
|
if (session.schema.model[table]?.conceal !== true)
|
|
339
342
|
throw logged(session, mapped);
|
|
340
|
-
const { scrubCall } = await import("./
|
|
343
|
+
const { scrubCall } = await import("./mwbdf409.js");
|
|
341
344
|
throw logged(session, scrubCall(mapped, session.schema, call));
|
|
342
345
|
}
|
|
343
346
|
};
|
|
@@ -370,7 +373,7 @@ function readHandle(session, table, call, mods, decode, extra) {
|
|
|
370
373
|
}
|
|
371
374
|
function streamLazy(session, call, mods, view, batch) {
|
|
372
375
|
return async function* () {
|
|
373
|
-
const { streamRows } = await import("./
|
|
376
|
+
const { streamRows } = await import("./en6rwzq0.js");
|
|
374
377
|
yield* streamRows(session, call, mods, view, batch, (error) => logged(session, error));
|
|
375
378
|
}();
|
|
376
379
|
}
|
|
@@ -403,22 +406,14 @@ function readCall(op, table, options, all, scope, model, schema, view) {
|
|
|
403
406
|
};
|
|
404
407
|
}
|
|
405
408
|
async function checkServer(pool, schema, http, requireMeta, options, source) {
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
try {
|
|
409
|
-
const result = await pool.execute(server.versionQuery, undefined, options);
|
|
410
|
-
rows = result.rows;
|
|
411
|
-
} catch (error) {
|
|
412
|
-
const { mapPostgresError } = await import("./ep8zh3bk.js");
|
|
413
|
-
throw mapPostgresError(error, mapOptions(http, false, schema));
|
|
414
|
-
}
|
|
415
|
-
await server.acceptServer(pool, schema, rows, http, requireMeta, options, source);
|
|
409
|
+
const { acceptServer } = await import("./y4vwft92.js");
|
|
410
|
+
await acceptServer(pool, schema, http, requireMeta, options, source);
|
|
416
411
|
}
|
|
417
412
|
async function mapError(session, error) {
|
|
418
413
|
if (error instanceof OkmError) {
|
|
419
414
|
return session.http === undefined ? error : new OkmError(error.code, error.message, { ...errorFields(error), http: session.http });
|
|
420
415
|
}
|
|
421
|
-
const { mapPostgresError } = await import("./
|
|
416
|
+
const { mapPostgresError } = await import("./xx3gmq94.js");
|
|
422
417
|
return mapPostgresError(error, mapOptions(session.http, session.includeValues, session.schema));
|
|
423
418
|
}
|
|
424
419
|
function errorFields(error) {
|
|
@@ -432,7 +427,7 @@ function errorFields(error) {
|
|
|
432
427
|
var includeHooks;
|
|
433
428
|
var operatorSql;
|
|
434
429
|
function loadOperatorSql() {
|
|
435
|
-
operatorSql ??= import("./
|
|
430
|
+
operatorSql ??= import("./xwr6q618.js").then(() => {
|
|
436
431
|
return;
|
|
437
432
|
});
|
|
438
433
|
return operatorSql;
|
|
@@ -443,7 +438,7 @@ function selectHasWindow(select) {
|
|
|
443
438
|
function hooksFor(call) {
|
|
444
439
|
if (call.include === undefined)
|
|
445
440
|
return Promise.resolve(undefined);
|
|
446
|
-
includeHooks ??= import("./
|
|
441
|
+
includeHooks ??= import("./p73evwf0.js").then((mod) => mod.includeHooks);
|
|
447
442
|
return includeHooks;
|
|
448
443
|
}
|
|
449
444
|
function bindNow(schema, call) {
|
|
@@ -454,7 +449,7 @@ function bindNow(schema, call) {
|
|
|
454
449
|
function finish(session, view, call) {
|
|
455
450
|
if (session.schema.model[call.table]?.conceal !== true)
|
|
456
451
|
return view;
|
|
457
|
-
return import("./
|
|
452
|
+
return import("./mwbdf409.js").then((mod) => mod.redactView(session.schema, view, call));
|
|
458
453
|
}
|
|
459
454
|
function inspection(plan, params, call, source) {
|
|
460
455
|
return {
|
|
@@ -502,4 +497,4 @@ function logged(session, error) {
|
|
|
502
497
|
return error;
|
|
503
498
|
}
|
|
504
499
|
|
|
505
|
-
export { createClient, openClient, queryHandle, decodeRows, readHandle, readCall, withHttp, attachHttp, settleCall };
|
|
500
|
+
export { createClient, openClient, queryHandle, decodeRows, readHandle, readCall, withHttp, attachHttp, mapOptions, settleCall };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
open2
|
|
3
|
+
} from "./4ec0nxvw.js";
|
|
4
4
|
import {
|
|
5
5
|
createClient
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./gjj71hfh.js";
|
|
7
7
|
|
|
8
8
|
// src/runtime/pg/neon.ts
|
|
9
9
|
function connect(target, options) {
|
|
10
10
|
if (typeof target === "object" && !isPool(target)) {
|
|
11
|
-
return import("./
|
|
11
|
+
return import("./bt3tjemb.js").then((mod) => mod.default(target, options, (config) => open2({
|
|
12
12
|
url: config.url,
|
|
13
13
|
...options.mode !== undefined ? { mode: options.mode } : {},
|
|
14
14
|
...config.max !== undefined ? { max: config.max } : {},
|
|
@@ -18,7 +18,7 @@ function connect(target, options) {
|
|
|
18
18
|
})));
|
|
19
19
|
}
|
|
20
20
|
const owned = !isPool(target);
|
|
21
|
-
const opened = isPool(target) ? Promise.resolve(target) :
|
|
21
|
+
const opened = isPool(target) ? Promise.resolve(target) : open2({
|
|
22
22
|
url: target,
|
|
23
23
|
...options.mode !== undefined ? { mode: options.mode } : {},
|
|
24
24
|
...options.max !== undefined ? { max: options.max } : {},
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
armDriverError2,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
logClientError2,
|
|
4
|
+
open5,
|
|
5
|
+
send4,
|
|
6
|
+
connectClient3
|
|
7
|
+
} from "./ppybjw50.js";
|
|
7
8
|
import {
|
|
8
9
|
NODE_POSTGRES_CAPABILITIES,
|
|
9
10
|
readCapability2,
|
|
10
11
|
hasCapability2
|
|
11
|
-
} from "./
|
|
12
|
+
} from "./ry2f3w8p.js";
|
|
12
13
|
export {
|
|
13
14
|
armDriverError2 as armDriverError,
|
|
14
15
|
NODE_POSTGRES_CAPABILITIES as capabilities,
|
|
15
|
-
|
|
16
|
+
connectClient3 as connectClient,
|
|
16
17
|
hasCapability2 as hasCapability,
|
|
17
|
-
|
|
18
|
+
logClientError2 as logClientError,
|
|
19
|
+
open5 as open,
|
|
18
20
|
readCapability2 as readCapability,
|
|
19
|
-
|
|
21
|
+
send4 as send
|
|
20
22
|
};
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./n4jqhpqz.js";
|
|
4
4
|
import {
|
|
5
5
|
refuseUncancellableTimeout
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./kvw1672d.js";
|
|
7
7
|
import {
|
|
8
8
|
withHttp,
|
|
9
9
|
settleCall
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./gjj71hfh.js";
|
|
11
11
|
import {
|
|
12
12
|
OkmError,
|
|
13
13
|
rejectKeys,
|
|
14
14
|
isRecord,
|
|
15
15
|
fail2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./2jdn09e2.js";
|
|
17
17
|
|
|
18
18
|
// src/runtime/batch.ts
|
|
19
19
|
async function batch(session, ops, options, replica) {
|
|
@@ -45,6 +45,9 @@ async function batch(session, ops, options, replica) {
|
|
|
45
45
|
if (item.checked === "parent") {
|
|
46
46
|
throw new OkmError("OKM1705", "batch does not take an update that sets a path column. The parent is checked in the statement, and a batch cannot report that after it commits. Use update({ where, set }) inside tx().", { fix: { summary: "Use update({ where, set }) inside tx()." } });
|
|
47
47
|
}
|
|
48
|
+
if (item.checked === "tree") {
|
|
49
|
+
fail2("OKM1121", "batch does not take an update that sets a tree parent. The cycle is checked in the statement, and a batch cannot report that after it commits. Use update({ where, set }) inside tx().");
|
|
50
|
+
}
|
|
48
51
|
if (item.checked !== undefined) {
|
|
49
52
|
fail2("OKM1121", item.checked === "restore" ? "batch does not take restore: it is refused while its parent is archived, and a batch cannot report that after it commits. Use tx()." : "batch does not take a write with expect: the count is checked after the statement ran, and a batch cannot report that after it commits. Use tx().");
|
|
50
53
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
async function refuseUncancellableTimeout(pool, timeout) {
|
|
3
3
|
if (pool.capabilities.cancel === true || timeout === undefined || !(timeout > 0))
|
|
4
4
|
return;
|
|
5
|
-
const { refused } = await import("./
|
|
5
|
+
const { refused } = await import("./yz68xcmc.js");
|
|
6
6
|
await refused();
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
refuseUncancellableTimeout
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./kvw1672d.js";
|
|
4
4
|
import {
|
|
5
5
|
openClient,
|
|
6
6
|
withHttp,
|
|
7
7
|
settleCall
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./gjj71hfh.js";
|
|
9
9
|
import {
|
|
10
10
|
OkmError,
|
|
11
11
|
isConnectionLost,
|
|
12
12
|
rejectKeys,
|
|
13
13
|
isRecord,
|
|
14
14
|
fail2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./2jdn09e2.js";
|
|
16
16
|
|
|
17
17
|
// src/runtime/transaction.ts
|
|
18
18
|
var BEGIN = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
open6,
|
|
3
3
|
seal2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./xn6p01fh.js";
|
|
5
5
|
import {
|
|
6
6
|
createClient
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./gjj71hfh.js";
|
|
8
8
|
|
|
9
9
|
// src/runtime/pg/pglite.ts
|
|
10
10
|
async function connect(target, options) {
|
|
11
11
|
if (typeof target === "object" && !isPool(target)) {
|
|
12
|
-
return import("./
|
|
12
|
+
return import("./bt3tjemb.js").then((mod) => mod.default(target, options, open6));
|
|
13
13
|
}
|
|
14
14
|
const pool = isPool(target) ? seal2(target) : await open6({
|
|
15
15
|
...target !== undefined ? { dataDir: target } : {},
|