Ga naar hoofdinhoud

Class: SimpleKVStore

Extends

Constructors

new SimpleKVStore()

new SimpleKVStore(data): SimpleKVStore

Parameters

data: DataType= {}

Returns

SimpleKVStore

Overrides

BaseKVStore . constructor

Source

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

Properties

data

private data: DataType = {}

Source

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


persistPath

private persistPath: undefined | string

Source

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

Methods

delete()

delete(key, collection): Promise<boolean>

Parameters

key: string

collection: string= DEFAULT_COLLECTION

Returns

Promise<boolean>

Overrides

BaseKVStore . delete

Source

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


get()

get(key, collection): Promise<any>

Parameters

key: string

collection: string= DEFAULT_COLLECTION

Returns

Promise<any>

Overrides

BaseKVStore . get

Source

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


getAll()

getAll(collection): Promise<DataType>

Parameters

collection: string= DEFAULT_COLLECTION

Returns

Promise<DataType>

Overrides

BaseKVStore . getAll

Source

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


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string

Returns

Promise<void>

Source

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


put()

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

Parameters

key: string

val: any

collection: string= DEFAULT_COLLECTION

Returns

Promise<void>

Overrides

BaseKVStore . put

Source

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


toDict()

toDict(): DataType

Returns

DataType

Source

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


fromDict()

static fromDict(saveDict): SimpleKVStore

Parameters

saveDict: DataType

Returns

SimpleKVStore

Source

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


fromPersistPath()

static fromPersistPath(persistPath): Promise <SimpleKVStore>

Parameters

persistPath: string

Returns

Promise <SimpleKVStore>

Source

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