Skip to main content
Version: 2.x

Interface: PostgresStoreOptions

Defined in: javascript/src/credits/postgres/store.ts:111

Construction options for the PostgreSQL credit store.

Extends​

Properties​

applicationName?​

optional applicationName?: string

Defined in: javascript/src/shared/postgres-client.ts:76

PostgreSQL application_name. Defaults to bursar-js.

Inherited from​

PostgresConnectionOptions.applicationName


connectionTimeoutMs?​

optional connectionTimeoutMs?: number

Defined in: javascript/src/shared/postgres-client.ts:66

Time allowed to establish or acquire a connection. Defaults to 10 seconds.

Inherited from​

PostgresConnectionOptions.connectionTimeoutMs


idleTimeoutMs?​

optional idleTimeoutMs?: number

Defined in: javascript/src/shared/postgres-client.ts:72

Idle pooled connection lifetime. Uses pg's default when omitted.

Inherited from​

PostgresConnectionOptions.idleTimeoutMs


idleTransactionTimeoutMs?​

optional idleTransactionTimeoutMs?: number

Defined in: javascript/src/shared/postgres-client.ts:70

Server-side idle transaction deadline. Defaults to 30 seconds; set 0 to disable.

Inherited from​

PostgresConnectionOptions.idleTransactionTimeoutMs


instrumentation?​

optional instrumentation?: Instrumentation

Defined in: javascript/src/shared/postgres-client.ts:80

Optional vendor-neutral instrumentation. Defaults to Bursar's no-op registry.

Inherited from​

PostgresConnectionOptions.instrumentation


maxConnections?​

optional maxConnections?: number

Defined in: javascript/src/shared/postgres-client.ts:74

Maximum connections in an SDK-owned pool. Uses pg's default when omitted.

Inherited from​

PostgresConnectionOptions.maxConnections


onPoolError?​

optional onPoolError?: (error) => void

Defined in: javascript/src/shared/postgres-client.ts:78

Receives typed errors emitted by idle pool clients. Must not throw.

Parameters​

error​

BursarError

Returns​

void

Inherited from​

PostgresConnectionOptions.onPoolError


poolConstructor?​

optional poolConstructor?: PostgresPoolConstructor

Defined in: javascript/src/credits/postgres/store.ts:119

Injectable pg.Pool constructor for custom runtimes and tests.


postgres​

postgres: string | PostgresPool

Defined in: javascript/src/credits/postgres/store.ts:113

PostgreSQL connection string or an application-owned pool.


providerEnvironment​

providerEnvironment: NonNullable<"live" | "test" | "sandbox" | undefined>

Defined in: javascript/src/credits/postgres/store.ts:117

Explicit financial namespace for catalog provider references.

Overrides​

PostgresConnectionOptions.providerEnvironment


statementTimeoutMs?​

optional statementTimeoutMs?: number

Defined in: javascript/src/shared/postgres-client.ts:68

Server-side statement deadline. Defaults to 30 seconds; set 0 to disable.

Inherited from​

PostgresConnectionOptions.statementTimeoutMs


tenantId​

tenantId: string

Defined in: javascript/src/credits/postgres/store.ts:115

Tenant UUID bound to every store transaction.


usageBackend?​

optional usageBackend?: "postgres" | "clickhouse"

Defined in: javascript/src/credits/postgres/store.ts:120