Adapter
Signature
export interface AdapterProperties
1Methods
18Properties
isAsync: boolean;Methods
start(): Awaitable<void>;scan(query: string, keys?: false): Awaitable<any[]>;scan(query: string, keys: true): Awaitable<string[]>;scan(query: string, keys?: boolean): Awaitable<(any | string)[]>;bulkGet(keys: string[]): Awaitable<any[]>;get(keys: string): Awaitable<any | null>;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.
set(key: string, value: any, relationship: AdapterRelationship): Awaitable<void>;Stores the value and relationship as one atomic operation.
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.
patch(key: string, value: any, relationship: AdapterRelationship): Awaitable<void>;Patches the value and stores its relationship as one atomic operation.
values(to: string): Awaitable<any[]>;keys(to: string): Awaitable<string[]>;count(to: string): Awaitable<number>;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.
flush(): Awaitable<void>;contains(to: string, keys: string): Awaitable<boolean>;getToRelationship(to: string): Awaitable<string[]>;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.