KeyValueMemory
@daydreamsai/core / KeyValueMemory
Interface: KeyValueMemory
Defined in: packages/core/src/memory/types.ts:341
Key-Value Memory interface
Methods
count()
count(
pattern?):Promise<number>
Defined in: packages/core/src/memory/types.ts:347
Parameters
pattern?
string
Returns
Promise<number>
delete()
delete(
key):Promise<boolean>
Defined in: packages/core/src/memory/types.ts:344
Parameters
key
string
Returns
Promise<boolean>
deleteBatch()
deleteBatch(
keys):Promise<number>
Defined in: packages/core/src/memory/types.ts:353
Parameters
keys
string[]
Returns
Promise<number>
exists()
exists(
key):Promise<boolean>
Defined in: packages/core/src/memory/types.ts:345
Parameters
key
string
Returns
Promise<boolean>
get()
get<
T>(key):Promise<null|T>
Defined in: packages/core/src/memory/types.ts:342
Type Parameters
T
T
Parameters
key
string
Returns
Promise<null | T>
getBatch()
getBatch<
T>(keys):Promise<Map<string,T>>
Defined in: packages/core/src/memory/types.ts:351
Type Parameters
T
T
Parameters
keys
string[]
Returns
Promise<Map<string, T>>
keys()
keys(
pattern?):Promise<string[]>
Defined in: packages/core/src/memory/types.ts:346
Parameters
pattern?
string
Returns
Promise<string[]>
scan()
scan(
pattern?):AsyncIterator<[string,unknown]>
Defined in: packages/core/src/memory/types.ts:348
Parameters
pattern?
string
Returns
AsyncIterator<[string, unknown]>
set()
set<
T>(key,value,options?):Promise<void>
Defined in: packages/core/src/memory/types.ts:343
Type Parameters
T
T
Parameters
key
string
value
T
options?
Returns
Promise<void>
setBatch()
setBatch<
T>(entries,options?):Promise<void>
Defined in: packages/core/src/memory/types.ts:352
Type Parameters
T
T
Parameters
entries
Map<string, T>
options?
Returns
Promise<void>