@xtandard/links/storage/postgres
Postgres storage: createPostgresStorage() keeps a single jsonb key/value
table, created on first use, with atomic compare-and-swap. Works with pg
or PGlite.
import { … } from "@xtandard/links/storage/postgres";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createPostgresStorage |
Create a Postgres-backed PostgresLinksStorage. The table is created lazily on first use; connection (when using connectionString/url) is also lazy. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
PostgresLinksStorage |
A CompareAndSwapLinksStorage 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_links_kv". |