1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! # 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
//!
//! ```rust
//! 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")?;
//! # Ok::<(), grafeo::Error>(())
//! ```
//!
//! ## Performance Features
//!
//! Enable platform-optimized memory allocators for 10-20% faster allocations:
//!
//! - `jemalloc` - Linux/macOS (x86_64, aarch64)
//! - `mimalloc-allocator` - Windows
// Platform-optimized memory allocators (enabled via features)
// jemalloc: Linux/macOS x86_64/aarch64 - better multi-threaded performance
// mimalloc: Windows - optimized for Windows, better than MSVC allocator
static GLOBAL: Jemalloc = Jemalloc;
static GLOBAL: MiMalloc = MiMalloc;
// Re-export the main database API
pub use ;
// Re-export submodules for qualified access (e.g. grafeo::auth::Identity)
pub use admin;
pub use auth;
pub use cdc;
pub use database;
pub use memory_usage;
pub use session;
// Re-export query results
pub use QueryResult;
// Re-export MemoryUsage, ProjectionSpec at top level for convenience
pub use MemoryUsage;
pub use ProjectionSpec;
// Re-export core types - you'll need these for working with IDs and values
pub use ;
// Re-export error types so users don't need to depend on grafeo-common directly
pub use ;