Class: SimpleKVStore
Hierarchy
-
↳
SimpleKVStore
Constructors
constructor
• new SimpleKVStore(data?
): SimpleKVStore
Parameters
Name | Type |
---|---|
data | DataType |
Returns
Overrides
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:13
Properties
data
• Private
data: DataType
= {}
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:13
fs
• Private
fs: undefined
| GenericFileSystem
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:11
persistPath
• Private
persistPath: undefined
| string
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:10
Methods
delete
▸ delete(key
, collection?
): Promise
<boolean
>
Parameters
Name | Type | Default value |
---|---|---|
key | string | undefined |
collection | string | DEFAULT_COLLECTION |
Returns
Promise
<boolean
>
Overrides
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:50
get
▸ get(key
, collection?
): Promise
<any
>
Parameters
Name | Type | Default value |
---|---|---|
key | string | undefined |
collection | string | DEFAULT_COLLECTION |
Returns
Promise
<any
>
Overrides
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:32
getAll
▸ getAll(collection?
): Promise
<DataType
>
Parameters
Name | Type | Default value |
---|---|---|
collection | string | DEFAULT_COLLECTION |
Returns
Promise
<DataType
>
Overrides
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:46
persist
▸ persist(persistPath
, fs?
): Promise
<void
>
Parameters
Name | Type |
---|---|
persistPath | string |
fs? | GenericFileSystem |
Returns
Promise
<void
>
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:61
put
▸ put(key
, val
, collection?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
key | string | undefined |
val | any | undefined |
collection | string | DEFAULT_COLLECTION |
Returns
Promise
<void
>
Overrides
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:17
toDict
▸ toDict(): DataType
Returns
DataType
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:97
fromDict
▸ fromDict(saveDict
): SimpleKVStore
Parameters
Name | Type |
---|---|
saveDict | DataType |
Returns
Defined in
packages/core/src/storage/kvStore/SimpleKVStore.ts:101
fromPersistPath
▸ fromPersistPath(persistPath
, fs?
): Promise
<SimpleKVStore
>
Parameters
Name | Type |
---|---|
persistPath | string |
fs? | GenericFileSystem |
Returns
Promise
<SimpleKVStore
>