Ana içeriğe geç

Class: SimpleKVStore

Hierarchy

Constructors

constructor

new SimpleKVStore(data?): SimpleKVStore

Parameters

NameType
dataDataType

Returns

SimpleKVStore

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:14


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:51


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:33


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:47


persist

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

Parameters

NameTypeDefault value
persistPathstringundefined
fsGenericFileSystemdefaultFS

Returns

Promise<void>

Defined in

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


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:18


toDict

toDict(): DataType

Returns

DataType

Defined in

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


fromDict

fromDict(saveDict): SimpleKVStore

Parameters

NameType
saveDictDataType

Returns

SimpleKVStore

Defined in

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


fromPersistPath

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

Parameters

NameTypeDefault value
persistPathstringundefined
fsGenericFileSystemdefaultFS

Returns

Promise<SimpleKVStore>

Defined in

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