Skip to main content

Crate minigdb

Crate minigdb 

Source
Expand description

§minigdb

A property-graph database engine backed by RocksDB.

§Module layout

ModuleRole
typesCore data types: Value, Node, Edge, IDs, errors
graphGraph struct — all read/write graph operations
storageStorageManager — persistent open/close/checkpoint
transaction[Operation] enum used for WAL replay and buffered transactions
[query]GQL parser, AST, and tree-walking executor
algorithmsGraph algorithms invokable via CALL GQL syntax
serverAsync TCP + HTTP server with auth (feature server)
[python]PyO3 Python bindings (feature python)

§Quick start

use std::path::Path;
use minigdb::{query, StorageManager};

let mut txn_id = 0u64;
let (_sm, mut graph) = StorageManager::open(Path::new("my_graph")).unwrap();
query("INSERT (:Person {name: \"Alice\"})", &mut graph, &mut txn_id).unwrap();
let rows = query("MATCH (n:Person) RETURN n.name", &mut graph, &mut txn_id).unwrap();
println!("{:?}", rows);

Re-exports§

pub use graph::Graph;
pub use query::query;
pub use query::query_capturing;
pub use query::query_capturing_with_params;
pub use query::Row;
pub use storage::StorageManager;
pub use types::DbError;
pub use types::Edge;
pub use types::EdgeId;
pub use types::Node;
pub use types::NodeId;
pub use types::Properties;
pub use types::Value;

Modules§

algorithms
Graph algorithm library for minigdb.
csv_import
CSV bulk import for nodes and edges.
graph
Graph — the in-memory/RocksDB property graph and its full read/write API.
query
GQL query pipeline: parse → AST → execute.
server
Async TCP server for minigdb — protocol v2.
storage
Persistence layer — StorageManager wraps a RocksDB-backed Graph and provides open/checkpoint/commit helpers.
transaction
Explicit write transaction — stages Operations in memory and applies them atomically on commit (or discards them on rollback).
types
Core data types shared across all modules.