Expand description
§Grafeo
A high-performance, embeddable graph database with a Rust core and no required C dependencies. Optional allocators (jemalloc/mimalloc) and TLS use C libraries for performance.
If you’re new here, start with GrafeoDB - that’s your entry point for
creating databases and running queries. Grafeo uses GQL (the ISO standard)
by default, but you can enable other query languages through feature flags.
§Query Languages
| Feature | Language | Notes |
|---|---|---|
gql | GQL | ISO standard, enabled by default |
cypher | Cypher | Neo4j-style queries |
sparql | SPARQL | For RDF triple stores |
gremlin | Gremlin | Apache TinkerPop traversals |
graphql | GraphQL | Schema-based queries |
sql-pgq | SQL/PGQ | SQL:2023 GRAPH_TABLE |
Use the full feature to enable everything.
§Quick Start
use grafeo::GrafeoDB;
// Create an in-memory database
let db = GrafeoDB::new_in_memory();
let mut session = db.session();
// Add a person
session.execute("INSERT (:Person {name: 'Alix', age: 30})")?;
// Find them
let result = session.execute("MATCH (p:Person) RETURN p.name")?;§Performance Features
Enable platform-optimized memory allocators for 10-20% faster allocations:
jemalloc- Linux/macOS (x86_64, aarch64)mimalloc-allocator- Windows
Structs§
- Catalog
- The database’s schema dictionary - maps names to compact internal IDs.
- Config
- Database configuration.
- EdgeId
- Identifies an edge (relationship) in the graph.
- GrafeoDB
- Your handle to a Grafeo database.
- Index
Definition - Index definition.
- NodeId
- Identifies a node in the graph.
- Session
- Your handle to the database - execute queries and manage transactions.
Enums§
- Catalog
Error - Catalog-related errors.
- Config
Error - Errors from
Config::validate(). - Durability
Mode - WAL durability mode controlling the trade-off between safety and speed.
- Graph
Model - The graph data model for a database.
- Index
Type - Type of index.
- Value
- A dynamically-typed property value.
Constants§
- VERSION
- The version of the grafeo-engine crate (from Cargo.toml).
Traits§
- Graph
Store - Read-only graph operations used by the query engine.
- Graph
Store Mut - Write operations for graph mutation.