Skip to content

@xtandard/flags/storage/postgres

Postgres storage: createPostgresStorage, one key/jsonb table created on demand, over pg or any client with a query() method (PGlite included). Optional peer dependency: pg, unless you pass your own client.

Subpath entry for @xtandard/flags/storage/postgres: re-exports the adapter so the bundler can map it to its own dist file.

import { … } from "@xtandard/flags/storage/postgres";
Name Summary
createPostgresStorage Create a Postgres-backed PostgresFlagsStorage. The table is created on first use.
Name Summary
PostgresFlagsStorage A compare-and-swap capable FlagsStorage backed by Postgres, plus a close() method that ends the underlying pool — but only the one this adapter created. A client you passed in is left for you to manage.
PostgresStorageOptions Options for createPostgresStorage. table defaults to "xtandard_flags".