Skip to main content

Class: SimpleKVStore

Extends

Constructors

new SimpleKVStore()

new SimpleKVStore(data?): SimpleKVStore

Parameters

data?: DataType

Returns

SimpleKVStore

Overrides

BaseKVStore.constructor

Defined in

packages/core/storage/kv-store/dist/index.d.ts:17

Methods

delete()

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

Parameters

key: string

collection?: string

Returns

Promise<boolean>

Overrides

BaseKVStore.delete

Defined in

packages/core/storage/kv-store/dist/index.d.ts:21


get()

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

Parameters

key: string

collection?: string

Returns

Promise<StoredValue>

Overrides

BaseKVStore.get

Defined in

packages/core/storage/kv-store/dist/index.d.ts:19


getAll()

getAll(collection?): Promise<Record<string, StoredValue>>

Parameters

collection?: string

Returns

Promise<Record<string, StoredValue>>

Overrides

BaseKVStore.getAll

Defined in

packages/core/storage/kv-store/dist/index.d.ts:20


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string

Returns

Promise<void>

Defined in

packages/core/storage/kv-store/dist/index.d.ts:22


put()

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

Parameters

key: string

val: StoredValue

collection?: string

Returns

Promise<void>

Overrides

BaseKVStore.put

Defined in

packages/core/storage/kv-store/dist/index.d.ts:18


toDict()

toDict(): DataType

Returns

DataType

Defined in

packages/core/storage/kv-store/dist/index.d.ts:24


fromDict()

static fromDict(saveDict): SimpleKVStore

Parameters

saveDict: DataType

Returns

SimpleKVStore

Defined in

packages/core/storage/kv-store/dist/index.d.ts:25


fromPersistPath()

static fromPersistPath(persistPath): Promise<SimpleKVStore>

Parameters

persistPath: string

Returns

Promise<SimpleKVStore>

Defined in

packages/core/storage/kv-store/dist/index.d.ts:23