Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/store-sqlite / / SqliteIdempotencyStore

Class: SqliteIdempotencyStore ​

Defined in: packages/store-sqlite/src/idempotency-store.ts:49

Stable

Default IdempotencyStore implementation.

Implements ​

Constructors ​

Constructor ​

ts
new SqliteIdempotencyStore(conn): SqliteIdempotencyStore;

Defined in: packages/store-sqlite/src/idempotency-store.ts:51

Parameters ​

ParameterType
connSqliteConnection

Returns ​

SqliteIdempotencyStore

Methods ​

delete() ​

ts
delete(key): Promise<void>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:92

Parameters ​

ParameterType
keystring

Returns ​

Promise&lt;void&gt;

Implementation of ​

IdempotencyStore.delete


get() ​

ts
get(key): Promise<
  | IdempotencyRecord
| null>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:73

Parameters ​

ParameterType
keystring

Returns ​

Promise< | IdempotencyRecord | null>

Implementation of ​

IdempotencyStore.get


prune() ​

ts
prune(olderThan): Promise<number>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:96

Delete records whose expiry is older than the supplied epoch-ms instant. Production caller: the server's hourly scheduleIdempotencyPruning sweep (started by app-lifecycle), so expired rows no longer accumulate forever.

Parameters ​

ParameterType
olderThannumber

Returns ​

Promise&lt;number&gt;

Implementation of ​

IdempotencyStore.prune


put() ​

ts
put(record): Promise<void>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:55

Parameters ​

ParameterType
recordIdempotencyRecord

Returns ​

Promise&lt;void&gt;

Implementation of ​

IdempotencyStore.put