Arcana.Graph.GraphStore.Memory (Arcana v2.0.1)

Copy Markdown View Source

In-memory implementation of the GraphStore behaviour.

Uses GenServer to store graph data in memory. Useful for testing and small-scale applications that don't need persistence.

Usage

# Start a memory store
{:ok, pid} = GraphStore.Memory.start_link([])

# Use in tests
Arcana.ingest(text, graph_store: {:memory, pid: pid})

# Use with named process
{:ok, _} = GraphStore.Memory.start_link(name: :test_graph)
Arcana.ingest(text, graph_store: {:memory, name: :test_graph})

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a memory graph store.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

Starts a memory graph store.

Options

  • :name - Optional name for the GenServer process