Skip to main content

Crate graphdblite

Crate graphdblite 

Source
Expand description

Embedded graph database with a Cypher query interface, backed by SQLite.

Single-file, zero-config, multi-process safe (WAL mode). The Cypher pipeline (parser, planner, executor) is internal; downstream consumers reach the database through Database (stateful API) and the WriteTxGuard / ReadTxGuard RAII wrappers.

§Quick start

use graphdblite::Database;

let mut db = Database::open_memory().unwrap();
db.execute("CREATE (:Person {name: 'Alice'})").unwrap();
let rows = db.execute("MATCH (p:Person) RETURN p.name AS name").unwrap();
assert_eq!(rows.len(), 1);

Structs§

Config
Configuration for opening a database.
Database
An embedded graph database backed by SQLite.
Edge
An edge in the graph.
Node
A node in the graph.
NodeId
Unique identifier for a node in the graph.
PathValue
A path through the graph: a sequence of nodes linked by edges.
ReadTxGuard
RAII guard for a read transaction. Returned by crate::Database::read_tx.
Record
A single result record — a row of named values produced by the executor.
Span
A source-text span (zero-indexed byte offsets, 1-indexed line/column).
WriteTxGuard
RAII guard for a write transaction. Returned by crate::Database::write_tx.

Enums§

Direction
Direction for edge traversal.
ErrorCode
Structured openCypher error code.
GraphError
All errors returned by graphdblite.
QueryError
Errors raised while processing a Cypher query.
QueryPhase
Phase of query processing at which an error was raised.
SyncMode
SQLite synchronous PRAGMA mode.
Value
Dynamic property value stored on nodes and edges.

Type Aliases§

Properties
Property map for nodes and edges.
Result
Convenience alias: Result<T, GraphError>.