LimitedMemoryAdapter

Signature

export declare class LimitedMemoryAdapter<T> implements Adapter

Properties

readonly relationships: Map<string, Map<string, Set<string>>>;

Methods

scan(query: string, keys?: false): any[];scan(query: string, keys: true): string[];
bulkGet(keys: string[]): unknown[];
get(key: string): unknown;
set(key: string, value: any, relationship: AdapterRelationship): void;

Stores the value and relationship as one atomic operation.

bulkSet(entries: AdapterEntry[]): 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.

patch(key: string, value: any, relationship: AdapterRelationship): void;

Patches the value and stores its relationship as one atomic operation.

bulkPatch(entries: AdapterEntry[]): 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.

keys(to: string): string[];
count(to: string): number;
contains(to: string, id: string): boolean;
bulkRemove(keys: string[]): 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): void;

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

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

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

removeRelationship(to: string | string[]): void;

Removes every value and relationship owned by the supplied relationships.