Aller au contenu principal

Class: SimpleKVStore

Hierarchy

Constructors

constructor

new SimpleKVStore(data?)

Parameters

NameType
data?DataType

Overrides

BaseKVStore.constructor

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:14

Properties

data

Private data: DataType

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:10


fs

Private fs: undefined | GenericFileSystem

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:12


persistPath

Private persistPath: undefined | string

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:11

Methods

delete

delete(key, collection?): Promise<boolean>

Parameters

NameTypeDefault value
keystringundefined
collectionstringDEFAULT_COLLECTION

Returns

Promise<boolean>

Overrides

BaseKVStore.delete

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:52


get

get(key, collection?): Promise<any>

Parameters

NameTypeDefault value
keystringundefined
collectionstringDEFAULT_COLLECTION

Returns

Promise<any>

Overrides

BaseKVStore.get

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:34


getAll

getAll(collection?): Promise<DataType>

Parameters

NameTypeDefault value
collectionstringDEFAULT_COLLECTION

Returns

Promise<DataType>

Overrides

BaseKVStore.getAll

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:48


persist

persist(persistPath, fs?): Promise<void>

Parameters

NameType
persistPathstring
fs?GenericFileSystem

Returns

Promise<void>

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:63


put

put(key, val, collection?): Promise<void>

Parameters

NameTypeDefault value
keystringundefined
valanyundefined
collectionstringDEFAULT_COLLECTION

Returns

Promise<void>

Overrides

BaseKVStore.put

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:19


toDict

toDict(): DataType

Returns

DataType

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:99


fromDict

Static fromDict(saveDict): SimpleKVStore

Parameters

NameType
saveDictDataType

Returns

SimpleKVStore

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:103


fromPersistPath

Static fromPersistPath(persistPath, fs?): Promise<SimpleKVStore>

Parameters

NameType
persistPathstring
fs?GenericFileSystem

Returns

Promise<SimpleKVStore>

Defined in

packages/core/src/storage/kvStore/SimpleKVStore.ts:73