Skip to content

PostgresCounterStoreOptions

Defined in: src/counters/postgres.ts:26

Options for createPostgresCounterStore.

Property Type Description Defined in
client? SqlClient Alias for PostgresCounterStoreOptions.pool. src/counters/postgres.ts:30
connectionString? string Connection string used to lazily create a pg Pool when no pool is given. src/counters/postgres.ts:32
createTable? boolean Run CREATE TABLE IF NOT EXISTS on first use. Default true. src/counters/postgres.ts:38
now? () => number Clock (unix ms) for expiry hints and claim TTLs. Default Date.now. src/counters/postgres.ts:40
pool? SqlClient A pg Pool / Client, or a PGlite instance. src/counters/postgres.ts:28
table? string Table name (default "xtandard_entitlements_counters"). Must be a safe SQL identifier. src/counters/postgres.ts:36
url? string Alias for PostgresCounterStoreOptions.connectionString. src/counters/postgres.ts:34