Class: SimpleKVStore
Extends
Constructors
new SimpleKVStore()
new SimpleKVStore(
data
):SimpleKVStore
Parameters
• data: DataType
= {}
Returns
Overrides
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:14
Properties
data
private
data:DataType
={}
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:14
fs
private
fs:undefined
|GenericFileSystem
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:12
persistPath
private
persistPath:undefined
|string
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:11
Methods
delete()
delete(
key
,collection
):Promise
<boolean
>
Parameters
• key: string
• collection: string
= DEFAULT_COLLECTION
Returns
Promise
<boolean
>
Overrides
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:51
get()
get(
key
,collection
):Promise
<any
>
Parameters
• key: string
• collection: string
= DEFAULT_COLLECTION
Returns
Promise
<any
>
Overrides
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:33
getAll()
getAll(
collection
):Promise
<DataType
>
Parameters
• collection: string
= DEFAULT_COLLECTION
Returns
Promise
<DataType
>
Overrides
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:47
persist()
persist(
persistPath
,fs
):Promise
<void
>
Parameters
• persistPath: string
• fs: GenericFileSystem
= defaultFS
Returns
Promise
<void
>
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:65
put()
put(
key
,val
,collection
):Promise
<void
>
Parameters
• key: string
• val: any
• collection: string
= DEFAULT_COLLECTION
Returns
Promise
<void
>
Overrides
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:18
toDict()
toDict():
DataType
Returns
DataType
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:102
fromDict()
static
fromDict(saveDict
):SimpleKVStore
Parameters
• saveDict: DataType
Returns
Source
packages/core/src/storage/kvStore/SimpleKVStore.ts:106
fromPersistPath()
static
fromPersistPath(persistPath
,fs
):Promise
<SimpleKVStore
>
Parameters
• persistPath: string
• fs: GenericFileSystem
= defaultFS
Returns
Promise
<SimpleKVStore
>