Rust API¶
Grafeo is written in Rust and provides a native Rust API.
Quick Start¶
use grafeo::GrafeoDB;
fn main() -> Result<(), grafeo_common::utils::error::Error> {
let db = GrafeoDB::new_in_memory();
let mut session = db.session();
session.execute("INSERT (:Person {name: 'Alix'})")?;
let result = session.execute("MATCH (p:Person) RETURN p.name")?;
for row in result.rows {
println!("{:?}", row);
}
Ok(())
}
Sections¶
-
Creating and configuring databases.
-
CRUD operations on nodes and edges.
-
Session management and transactions.