Skip to main content

geode_client/
lib.rs

1//! Geode Rust Client Library
2//!
3//! A high-performance async Rust client for Geode graph database with full GQL support via QUIC+TLS.
4//!
5//! # Features
6//!
7//! - 🚀 Fully async using tokio with type safety
8//! - 🔒 QUIC + TLS 1.3 for secure, high-performance networking
9//! - 📝 Full GQL (ISO/IEC 39075:2024) support
10//! - 🏗️ Query builders for programmatic query construction
11//! - 🔐 Authentication & RBAC with RLS policies
12//! - 🏊 Connection pooling for concurrent workloads
13//! - 📊 Rich type system with Decimal, temporal types
14//!
15//! # Example
16//!
17//! ```no_run
18//! use geode_client::{Client, Result};
19//!
20//! #[tokio::main]
21//! async fn main() -> Result<()> {
22//!     // Create QUIC client
23//!     let client = Client::new("127.0.0.1", 3141)
24//!         .skip_verify(true);
25//!
26//!     // Connect via QUIC
27//!     let mut conn = client.connect().await?;
28//!
29//!     // Execute query
30//!     let (page, _) = conn.query("RETURN 1 AS x").await?;
31//!     println!("Result: {:?}", page);
32//!
33//!     // Close connection
34//!     conn.close()?;
35//!
36//!     Ok(())
37//! }
38//! ```
39
40pub mod auth;
41pub mod client;
42pub mod error;
43pub mod pool;
44pub mod query_builder;
45pub mod types;
46pub mod validate;
47
48// Re-export main types
49pub use auth::{AuthClient, Permission, RLSPolicy, Role, SessionInfo, User};
50pub use client::{
51    Client, Column, Connection, Page, PlanOperation, PreparedStatement, QueryPlan, QueryProfile,
52    Savepoint,
53};
54pub use error::{Error, Result};
55pub use pool::ConnectionPool;
56pub use query_builder::{EdgeDirection, PatternBuilder, PredicateBuilder, QueryBuilder};
57pub use types::{Range, Value, ValueKind};
58
59/// Library version
60pub const VERSION: &str = env!("CARGO_PKG_VERSION");