Dumptypeno test imports ittype Dump = { readonly versions: readonly DumpedVersion[]; readonly blobs: readonly { readonly sha: string; readonly bytes: Uint8Array }[] };What a dump holds: its version rows and its blobs.
A dump written in the plain INSERTs of an engine: what the rows a dump holds become as text for SQLite, PostgreSQL or DuckDB, so that the engine's own client replays them with no library code. It writes text and runs nothing.
import { redump } from "./redump.ts";
const text = redump({ versions: [], blobs: [] }, "postgres", naming);Dumptypeno test imports ittype Dump = { readonly versions: readonly DumpedVersion[]; readonly blobs: readonly { readonly sha: string; readonly bytes: Uint8Array }[] };What a dump holds: its version rows and its blobs.
DumpedVersiontypeno test imports ittype DumpedVersion = readonly [string, string, string, number, string, string | null, string, string, string | null];A version row as a dump gives it: its nine values in the order of the columns.
redumpfunctionno test imports itfunction redump(dump: Dump, target: "duckdb" | "postgres" | "sqlite", naming: Naming): stringA dump (the rows parseDump read) written as the plain INSERTs of an engine, in key order, so that the engine's own client replays it with no library code: SQLite's form is what the real sqlite3 writes (X'hex' for bytes); PostgreSQL's is what pg_dump --data-only --inserts --on-conflict-do-nothing writes ('\xhex' and ON CONFLICT DO NOTHING); DuckDB's is INSERT OR IGNORE with unhex. Every row of every form replays as a union.