InMemoryKeyValueProvider
@daydreamsai/core / InMemoryKeyValueProvider
Class: InMemoryKeyValueProvider
Defined in: packages/core/src/memory/providers/in-memory.ts:20
In-memory Key-Value Provider for testing
Implements
Constructors
Constructor
new InMemoryKeyValueProvider():
InMemoryKeyValueProvider
Returns
InMemoryKeyValueProvider
Methods
close()
close():
Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:28
Returns
Promise<void>
Implementation of
count()
count(
pattern?):Promise<number>
Defined in: packages/core/src/memory/providers/in-memory.ts:87
Parameters
pattern?
string
Returns
Promise<number>
Implementation of
delete()
delete(
key):Promise<boolean>
Defined in: packages/core/src/memory/providers/in-memory.ts:66
Parameters
key
string
Returns
Promise<boolean>
Implementation of
deleteBatch()
deleteBatch(
keys):Promise<number>
Defined in: packages/core/src/memory/providers/in-memory.ts:124
Parameters
keys
string[]
Returns
Promise<number>
Implementation of
exists()
exists(
key):Promise<boolean>
Defined in: packages/core/src/memory/providers/in-memory.ts:71
Parameters
key
string
Returns
Promise<boolean>
Implementation of
get()
get<
T>(key):Promise<null|T>
Defined in: packages/core/src/memory/providers/in-memory.ts:44
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/providers/in-memory.ts:102
Type Parameters
T
T
Parameters
keys
string[]
Returns
Promise<Map<string, T>>
Implementation of
health()
health():
Promise<HealthStatus>
Defined in: packages/core/src/memory/providers/in-memory.ts:33
Returns
Promise<HealthStatus>
Implementation of
initialize()
initialize():
Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:24
Returns
Promise<void>
Implementation of
keys()
keys(
pattern?):Promise<string[]>
Defined in: packages/core/src/memory/providers/in-memory.ts:76
Parameters
pattern?
string
Returns
Promise<string[]>
Implementation of
scan()
scan(
pattern?):AsyncIterator<[string,any]>
Defined in: packages/core/src/memory/providers/in-memory.ts:92
Parameters
pattern?
string
Returns
AsyncIterator<[string, any]>
Implementation of
set()
set<
T>(key,value,options?):Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:49
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/providers/in-memory.ts:116
Type Parameters
T
T
Parameters
entries
Map<string, T>
options?
Returns
Promise<void>