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