UNPKG

pg-transactional-outbox

Version:

A PostgreSQL based transactional outbox and inbox pattern implementation to support exactly once message processing (with at least once message delivery).

11 lines 633 B
import { Client, ClientBase, Pool, PoolClient } from 'pg'; /** * This interface combines the used query functions from the 'pg' library * `Pool`, `Client`, `ClientBase`, and `PoolClient`. */ export declare type DatabaseClient = Pool | PoolClient | ClientBase | Client; /** Check if it is a pool client to correctly release it */ export declare const releaseIfPoolClient: (client: DatabaseClient, err?: Error | boolean) => void; /** Check if the given error is based on a PostgreSQL serialization or deadlock error. */ export declare const isPgSerializationError: (error: unknown) => boolean; //# sourceMappingURL=database.d.ts.map