LimitedMemoryAdapter
Signature
export declare class LimitedMemoryAdapter<T> implements AdapterProperties
20isAsyncstoragerelationshipskeyToStorageoptions_getKeyResource_getKeyScope_supportsNamespaceIndex_setIndexedStorage_deleteIndexedStorage_getIndexedStorage_getDerivedNamespace_isResourceNamespace_findNamespaceByStorage_getStorageNamespace_getStorageEntry__set_getRelationshipData_getRelationshipSet_ensureRelationshipSet
Methods
21Properties
isAsync: boolean;readonly storage: Map<string, LimitedCollection<string, T>>;readonly relationships: Map<string, Map<string, Set<string>>>;readonly keyToStorage: Map<string, LimitedCollection<string, T>>;options: MakeRequired<LimitedMemoryAdapterOptions<T>, 'default' | 'encode' | 'decode'>;private _getKeyResource;private _getKeyScope;private _supportsNamespaceIndex;private _setIndexedStorage;private _deleteIndexedStorage;private _getIndexedStorage;private _getDerivedNamespace;private _isResourceNamespace;private _findNamespaceByStorage;private _getStorageNamespace;private _getStorageEntry;private __set;private _getRelationshipData;private _getRelationshipSet;private _ensureRelationshipSet;Methods
constructorConstructorconstructor(options?: LimitedMemoryAdapterOptions<T>);start(): void;scan(query: string, keys?: false): any[];scan(query: string, keys: true): string[];bulkGet(keys: string[]): unknown[];get(key: string): unknown;bulkSet(keys: [ string, any][]): void;set(keys: string, data: any): void;bulkPatch(keys: [ string, any][]): void;patch(keys: string, data: any): void;values(to: string): any[];keys(to: string): string[];count(to: string): number;bulkRemove(keys: string[]): void;remove(key: string): void;flush(): void;contains(to: string, keys: string): boolean;getToRelationship(to: string): string[];bulkAddToRelationShip(data: Record<string, string[]>): void;addToRelationship(to: string, keys: string | string[]): void;removeToRelationship(to: string, keys: string | string[]): void;removeRelationship(to: string | string[]): void;