Skip to main content

@flow-state-dev/vercel/store

Interfaces​

VercelPostgresStoresAdapter​

A StoreAdapter that also exposes a same-pool ScheduleIndex.

Extends​

  • StoreAdapter

Properties​

capabilities​
readonly capabilities: readonly (keyof CapabilitySlotMap)[];

Slots this adapter is willing to back.

Inherited from​

StoreAdapter.capabilities

scheduleIndex​
readonly scheduleIndex: ScheduleIndex;

Schedule index bound to the same pool the stores use. Install it behind the app's stable schedule-index proxy (e.g. setScheduleIndexImpl) so scheduled flows resolve against the same database. No-ops until the pool is resolved on first getRouter() / ready().

Methods​

dispose()?​
dispose?(): void | Promise<void>;

Release pooled resources. Called by FlowState.dispose().

Returns​

void | Promise<void>

Inherited from​

StoreAdapter.dispose

resolve()​
resolve(slots): Promise<Partial<StoreRegistry>>;

Realize the adapter for the given slots. Returns the StoreRegistry sub-stores it provides. Memoize internally so repeated resolution (e.g. an adapter shared across slots) opens pools once.

Parameters​
slots​

readonly (keyof CapabilitySlotMap)[]

Returns​

Promise<Partial<StoreRegistry>>

Inherited from​

StoreAdapter.resolve


VercelPostgresStoresOptions​

Properties​

connectionString?​
connectionString?: string;

Postgres connection string. Defaults to FSD_DB_URL then DATABASE_URL. The Neon Client swap is applied automatically for .neon.tech URLs.

Functions​

vercelPostgresStores()​

function vercelPostgresStores(options?): VercelPostgresStoresAdapter;

Parameters​

options?​

VercelPostgresStoresOptions

Returns​

VercelPostgresStoresAdapter