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
//! GraphQLite - SQLite extension for graph queries using Cypher
//!
//! This crate provides Rust bindings for GraphQLite, allowing you to use
//! Cypher graph queries in SQLite databases.
//!
//! # High-Level Graph API
//!
//! The [`Graph`] struct provides an ergonomic interface for common graph operations:
//!
//! ```no_run
//! use graphqlite::Graph;
//!
//! let g = Graph::open(":memory:")?;
//!
//! // Add nodes
//! g.upsert_node("alice", [("name", "Alice"), ("age", "30")], "Person")?;
//! g.upsert_node("bob", [("name", "Bob"), ("age", "25")], "Person")?;
//!
//! // Add edge
//! g.upsert_edge("alice", "bob", [("since", "2020")], "KNOWS")?;
//!
//! // Query
//! println!("{:?}", g.stats()?);
//! println!("{:?}", g.get_neighbors("alice")?);
//!
//! // Graph algorithms
//! let ranks = g.pagerank(0.85, 20)?;
//! let communities = g.community_detection(10)?;
//! # Ok::<(), graphqlite::Error>(())
//! ```
//!
//! # Low-Level Cypher API
//!
//! The [`Connection`] struct provides direct Cypher query access:
//!
//! ```no_run
//! use graphqlite::Connection;
//!
//! let conn = Connection::open(":memory:")?;
//!
//! // Create nodes
//! conn.cypher("CREATE (n:Person {name: 'Alice', age: 30})")?;
//!
//! // Query the graph
//! let results = conn.cypher("MATCH (n:Person) RETURN n.name, n.age")?;
//! for row in &results {
//! println!("{}: {}", row.get::<String>("n.name")?, row.get::<i64>("n.age")?);
//! }
//! # Ok::<(), graphqlite::Error>(())
//! ```
pub use Connection;
pub use CypherQuery;
pub use Error;
pub use ;
pub use ;
pub use ;
pub use ;
// Algorithm result types
pub use ;
/// Result type for GraphQLite operations.
pub type Result<T> = Result;