db/db_pg.ts

PostgreSQL driver adapter for Db.

Provides create_pg_db() to construct a Db backed by a pg.Pool. Only imports pg types — the actual pg package is dynamically imported by callers (e.g., create_db) that construct the Pool.

Declarations
#

view source

create_pg_db
#

db/db_pg.ts view source

(pool: Pool): DbDriverResult

Create a Db backed by a pg Pool.

Owns the transaction implementation (acquires a dedicated pool client per transaction) and returns a close callback bound to pool.end().

pool

an already-constructed pg.Pool

type Pool

returns

DbDriverResult

Depends on
#

Imported by
#