API reference
@searsuite/sear-foundation-storage
Abstract key-value storage contracts and in-memory adapters.
4 exportsderived from source
- classDataStoragesource ↗
-
class DataStorage<U, T, S>DataStorage public API.
constructorconstructor DataStorage<U, T, S>(storage: S): DataStorage<U, T, S>Creates a DataStorage instance.
storage: S
propertysymbolstatic readonly symbol: symbolDI token for resolving DataStorage.
methoddelete delete(key: U): voidDeletes the requested entry.
key: U
methodget get(key: U): T | undefinedReturns the value.
key: U
methodset set(key: U, value: T): voidUpdates the value.
key: Uvalue: T
- classDataStorageFactorysource ↗
-
class DataStorageFactory<T>Factory contract for creating data storage instances.
constructorconstructor DataStorageFactory<T>(): DataStorageFactory<T>methodcreate create(): TCreates the value.
- classMapDataStoragesource ↗
-
class MapDataStorage<U, T> extends DataStorage<U, T, Map<U, T>>Map-backed DataStorage implementation.
constructorconstructor MapDataStorage<U, T>(): MapDataStorage<U, T>Creates a MapDataStorage instance.
methoddelete delete(key: U): voidDeletes the requested entry.
key: U
methodget get(key: U): T | undefinedReturns the value.
key: U
methodset set(key: U, value: T): voidUpdates the value.
key: Uvalue: T
- classMapDataStorageFactorysource ↗
-
class MapDataStorageFactory<U, T> extends DataStorageFactory<MapDataStorage<U, T>>MapDataStorageFactory public API.
constructorconstructor MapDataStorageFactory<U, T>(): MapDataStorageFactory<U, T>methodcreate create(): MapDataStorage<U, T>Creates the value.
No public exports match that search.