Adapter

Signature

export interface Adapter

Properties

Methods

scan(query: string, keys?: false): Awaitable<any[]>;scan(query: string, keys: true): Awaitable<string[]>;scan(query: string, keys?: boolean): Awaitable<(any | string)[]>;
bulkSet(entries: AdapterEntry[]): Awaitable<void>;

Stores every entry atomically. The batch itself is not atomic and implementations may execute entries concurrently or out of order. If the operation rejects, any subset may already be committed, but no writes remain pending after the returned promise settles.

bulkPatch(entries: AdapterEntry[]): Awaitable<void>;

Patches every entry atomically. The batch itself is not atomic and implementations may execute entries concurrently or out of order. If the operation rejects, any subset may already be committed, but no writes remain pending after the returned promise settles.

bulkRemove(keys: string[]): Awaitable<void>;

Removes every entry atomically. The batch itself is not atomic and implementations may execute entries concurrently or out of order. If the operation rejects, any subset may already be committed, but no removals remain pending after the returned promise settles.

remove(key: string): Awaitable<void>;

Removes the value and its owning relationship as one logical operation.

removeToRelationship(to: string, keys: string | string[]): Awaitable<void>;

Removes the selected values and relationships owned by `to`.

removeRelationship(to: string | string[]): Awaitable<void>;

Removes every value and relationship owned by the supplied relationships.