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
//! GraphLite SDK - High-level ergonomic Rust API for GraphLite
//!
//! This crate provides a high-level, developer-friendly SDK on top of GraphLite's core API.
//! It offers ergonomic patterns, type safety, connection management, query builders, and
//! transaction support - everything needed to build robust graph-based applications in Rust.
//!
//! # Quick Start
//!
//! ```no_run
//! use graphlite_sdk::{GraphLite, Error};
//!
//! # fn main() -> Result<(), Error> {
//! // Open database
//! let db = GraphLite::open("./mydb")?;
//!
//! // Create session and execute query
//! let session = db.create_session("admin")?;
//! let result = db.query("MATCH (p:Person) RETURN p.name", &session)?;
//!
//! // Process results
//! for row in result.rows() {
//! println!("Name: {:?}", row.get("p.name"));
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # Features
//!
//! - **Connection Management** - Simple connection API with automatic session handling
//! - **Query Builder** - Fluent API for building type-safe GQL queries
//! - **Transaction Support** - ACID transactions with automatic rollback
//! - **Typed Results** - Deserialize query results into Rust structs
//! - **Connection Pooling** - Efficient concurrent access (future)
//! - **Async Support** - Full tokio integration (future)
//!
//! # Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────┐
//! │ Application Code (Your Rust App) │
//! └─────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────────────────────┐
//! │ GraphLite SDK (this crate) │
//! │ - GraphLite (main API) │
//! │ - Session (session management) │
//! │ - QueryBuilder (fluent queries) │
//! │ - Transaction (ACID support) │
//! │ - TypedResult (deserialization) │
//! └─────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────────────────────┐
//! │ GraphLite Core (graphlite crate) │
//! │ - QueryCoordinator │
//! │ - Storage Engine │
//! │ - Catalog Manager │
//! └─────────────────────────────────────────┘
//! ```
//!
//! # Module Organization
//!
//! - [`connection`] - Database connection and session management
//! - [`query`] - Query builder and execution
//! - [`transaction`] - Transaction support
//! - [`result`] - Result handling and deserialization
//! - [`error`] - Error types and handling
// Re-export core types for convenience
pub use ;
// SDK modules
// Re-export main types for convenience
pub use ;
pub use ;
pub use QueryBuilder;
pub use TypedResult;
pub use Transaction;