KeyValueMemoryImpl
@daydreamsai/core / KeyValueMemoryImpl
Class: KeyValueMemoryImpl
Defined in: packages/core/src/memory/kv-memory.ts:3
Key-Value Memory interface
Implements
Constructors
Constructor
new KeyValueMemoryImpl(
provider):KeyValueMemoryImpl
Defined in: packages/core/src/memory/kv-memory.ts:4
Parameters
provider
Returns
KeyValueMemoryImpl
Methods
count()
count(
pattern?):Promise<number>
Defined in: packages/core/src/memory/kv-memory.ts:26
Parameters
pattern?
string
Returns
Promise<number>
Implementation of
delete()
delete(
key):Promise<boolean>
Defined in: packages/core/src/memory/kv-memory.ts:14
Parameters
key
string
Returns
Promise<boolean>
Implementation of
deleteBatch()
deleteBatch(
keys):Promise<number>
Defined in: packages/core/src/memory/kv-memory.ts:47
Parameters
keys
string[]
Returns
Promise<number>
Implementation of
exists()
exists(
key):Promise<boolean>
Defined in: packages/core/src/memory/kv-memory.ts:18
Parameters
key
string
Returns
Promise<boolean>
Implementation of
get()
get<
T>(key):Promise<null|T>
Defined in: packages/core/src/memory/kv-memory.ts:6
Type Parameters
T
T
Parameters
key
string
Returns
Promise<null | T>
Implementation of
getBatch()
getBatch<
T>(keys):Promise<Map<string,T>>
Defined in: packages/core/src/memory/kv-memory.ts:39
Type Parameters
T
T
Parameters
keys
string[]
Returns
Promise<Map<string, T>>
Implementation of
keys()
keys(
pattern?):Promise<string[]>
Defined in: packages/core/src/memory/kv-memory.ts:22
Parameters
pattern?
string
Returns
Promise<string[]>
Implementation of
scan()
scan(
pattern?):AsyncIterator<[string,unknown]>
Defined in: packages/core/src/memory/kv-memory.ts:30
Parameters
pattern?
string
Returns
AsyncIterator<[string, unknown]>
Implementation of
set()
set<
T>(key,value,options?):Promise<void>
Defined in: packages/core/src/memory/kv-memory.ts:10
Type Parameters
T
T
Parameters
key
string
value
T
options?
Returns
Promise<void>
Implementation of
setBatch()
setBatch<
T>(entries,options?):Promise<void>
Defined in: packages/core/src/memory/kv-memory.ts:43
Type Parameters
T
T
Parameters
entries
Map<string, T>
options?
Returns
Promise<void>