Skip to main content

Crate grafeo

Crate grafeo 

Source
Expand description

§Grafeo

A high-performance, pure-Rust, embeddable graph database.

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

FeatureLanguageNotes
gqlGQLISO standard, enabled by default
cypherCypherNeo4j-style queries
sparqlSPARQLFor RDF triple stores
gremlinGremlinApache TinkerPop traversals
graphqlGraphQLSchema-based queries

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: 'Alice', 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.
IndexDefinition
Index definition.
NodeId
Identifies a node in the graph.
Session
Your handle to the database - execute queries and manage transactions.

Enums§

CatalogError
Catalog-related errors.
IndexType
Type of index.
Value
A dynamically-typed property value.