InMemoryGraphProvider
@daydreamsai/core / InMemoryGraphProvider
Class: InMemoryGraphProvider
Defined in: packages/core/src/memory/providers/in-memory.ts:290
In-memory Graph Provider for testing
Implements
Constructors
Constructor
new InMemoryGraphProvider():
InMemoryGraphProvider
Returns
InMemoryGraphProvider
Methods
addEdge()
addEdge(
edge):Promise<string>
Defined in: packages/core/src/memory/providers/in-memory.ts:378
Parameters
edge
Returns
Promise<string>
Implementation of
addNode()
addNode(
node):Promise<string>
Defined in: packages/core/src/memory/providers/in-memory.ts:319
Parameters
node
Returns
Promise<string>
Implementation of
close()
close():
Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:300
Returns
Promise<void>
Implementation of
deleteEdge()
deleteEdge(
id):Promise<boolean>
Defined in: packages/core/src/memory/providers/in-memory.ts:424
Parameters
id
string
Returns
Promise<boolean>
Implementation of
deleteNode()
deleteNode(
id):Promise<boolean>
Defined in: packages/core/src/memory/providers/in-memory.ts:349
Parameters
id
string
Returns
Promise<boolean>
Implementation of
findNodes()
findNodes(
filter):Promise<GraphNode[]>
Defined in: packages/core/src/memory/providers/in-memory.ts:439
Parameters
filter
Returns
Promise<GraphNode[]>
Implementation of
getEdges()
getEdges(
nodeId,direction):Promise<GraphEdge[]>
Defined in: packages/core/src/memory/providers/in-memory.ts:402
Parameters
nodeId
string
direction
"out" | "in" | "both"
Returns
Promise<GraphEdge[]>
Implementation of
getNode()
getNode(
id):Promise<null|GraphNode>
Defined in: packages/core/src/memory/providers/in-memory.ts:335
Parameters
id
string
Returns
Promise<null | GraphNode>
Implementation of
health()
health():
Promise<HealthStatus>
Defined in: packages/core/src/memory/providers/in-memory.ts:307
Returns
Promise<HealthStatus>
Implementation of
initialize()
initialize():
Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:296
Returns
Promise<void>
Implementation of
shortestPath()
shortestPath(
from,to):Promise<null|GraphPath>
Defined in: packages/core/src/memory/providers/in-memory.ts:535
Parameters
from
string
to
string
Returns
Promise<null | GraphPath>
Implementation of
traverse()
traverse(
traversal):Promise<GraphPath[]>
Defined in: packages/core/src/memory/providers/in-memory.ts:477
Parameters
traversal
Returns
Promise<GraphPath[]>
Implementation of
updateNode()
updateNode(
id,updates):Promise<void>
Defined in: packages/core/src/memory/providers/in-memory.ts:340
Parameters
id
string
updates
Partial<GraphNode>
Returns
Promise<void>