Skip to content

pgReady

function pgReady(connection, ddl): () => Promise<ClosableSqlClient>;

Defined in: src/storage/postgres.ts:110

Memoize “get the client and run these statements once” (semi-public, ADR 0004). The returned function resolves the client after the DDL has run; a failed DDL is retried on the next call. Products pass extra statements for their own tables (au’s event log).

Parameter Type
connection PgConnection
ddl string[]

() => Promise<ClosableSqlClient>