Skip to content

generateLocalSchemaSql

generateLocalSchemaSql<TRegistry>(registry): string

Defined in: packages/client/src/schema.ts:550

The complete local schema — durable statements then ephemeral statements — the single script the wipe/rebuild paths and every external caller keep using. For an all-persistent registry the durable stream is the registry-ordered stream, followed by the always-applied ephemeral portion — which for any registry with a writable table carries the pgxsinkit_all_mutations TEMP VIEW as its trailing statement. For a MIXED registry the script is idempotent-equivalent to (not a character-for-character match of) a single-pass interleave: the persistent clusters precede the ephemeral ones and the ephemeral portion re-emits idempotent enum guards — a reordering of independent IF NOT EXISTS DDL that executes to the same schema. Equals durable + ephemeral by construction (test-covered).

TRegistry extends SyncTableRegistry

TRegistry

string