Skip to content

Function: createPostgresLedgerBuilder() ​

ts
function createPostgresLedgerBuilder(uri, compaction?): PostgresLedgerBuilder;

Defined in: postgres/src/builders/create-postgres-ledger-builder.ts:17

Creates a pure, side-effect-free PostgresLedgerBuilder for postgres.ledger(uri).

Stores the literal connection URI or symbolic EnvRef and optional CompactionConfigNode in an immutable closure that compiles to a frozen PostgresLedgerNode.

Parameters ​

ParameterTypeDescription
uristring | EnvRefPostgreSQL connection URI or symbolic P.env(...) reference.
compaction?CompactionConfigNodeOptional pre-compiled compaction configuration.

Returns ​

PostgresLedgerBuilder

Immutable builder for PostgresLedgerNode.

Released under the MIT License.