In-memory
memory://<ns> opens a namespace backed by
object_store::memory::InMemory. Nothing touches disk or any bucket.
The graph lives in the heap of the process that opened the client and
disappears when the process exits.
When to use it
- The 30-second taste. Try a query without setting up credentials or a bucket. See Your first query.
- Notebooks and exploration. Spin up, query, throw away.
- CI fixtures. Deterministic graphs that compile fresh on every test run.
Don’t use it for anything that needs to survive a process restart.
URI shape
memory://<namespace><namespace> is the unique identifier within the in-memory store. Two
clients in the same process pointed at the same memory://demo see
the same graph; two clients in different processes do not.
Examples
import namidb
client = namidb.Client("memory://demo")client.cypher("CREATE (a:Person {name: 'Alice'})")print(client.cypher("MATCH (p:Person) RETURN p.name").rows())# CLI: same effect when --store is omitted.namidb run "CREATE (a:Person {name: 'Alice'})"namidb run --store "memory://demo" "MATCH (p:Person) RETURN p.name"use std::sync::Arc;use namidb::core::id::NamespaceId;use namidb::storage::{NamespacePaths, WriterSession};use object_store::{memory::InMemory, ObjectStore};
let store: Arc<dyn ObjectStore> = Arc::new(InMemory::new());let paths = NamespacePaths::new("tenants", NamespaceId::new("demo")?);let mut writer = WriterSession::open(store, paths).await?;Lifetime
memory:// namespaces:
- Live in the heap of the process that opened the first client.
- Are not shared across processes.
- Are dropped when the last client referencing them is dropped (in practice: when your process exits).
- Don’t pay any I/O cost — useful when you want to measure pure engine work without the bucket on the critical path.
What’s next
- Local filesystem — when you need persistence.
- MinIO — when you want a local S3-compatible bucket.
- Your first query — the 30-second
taste built on top of
memory://.