prax_cassandra/lib.rs
1// QueryError is intentionally large; see prax-query/src/lib.rs.
2#![allow(clippy::result_large_err)]
3
4//! # prax-cassandra
5//!
6//! Apache Cassandra driver for Prax ORM using cdrs-tokio.
7//!
8//! Provides async CRUD, prepared statements, batches, lightweight transactions,
9//! paging, virtual tables (Cassandra 4.0+), and UDF/UDA management.
10//!
11//! ## Example
12//!
13//! ```rust,no_run
14//! use prax_cassandra::{CassandraConfig, CassandraPool};
15//!
16//! #[tokio::main]
17//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
18//! let config = CassandraConfig::builder()
19//! .known_nodes(["127.0.0.1:9042".to_string()])
20//! .default_keyspace("myapp")
21//! .build();
22//!
23//! let pool = CassandraPool::connect(config).await?;
24//! // ... use pool ...
25//! Ok(())
26//! }
27//! ```
28//!
29//! ## Migration Support
30//!
31//! Schema migrations use `prax_migrate::CqlDialect`, which works identically
32//! for Cassandra and ScyllaDB since both use CQL.
33
34pub mod auth;
35pub mod config;
36pub mod connection;
37pub mod engine;
38pub mod error;
39pub mod pool;
40pub mod row;
41pub mod row_ref;
42pub mod types;
43pub mod udf;
44pub mod virtual_tables;
45
46pub use auth::{PlainSasl, SaslMechanism};
47pub use config::{
48 CassandraAuth, CassandraConfig, CassandraConfigBuilder, Consistency, RetryPolicyKind, TlsConfig,
49};
50pub use connection::CassandraConnection;
51pub use engine::{BatchBuilder, CassandraEngine, QueryResult};
52pub use error::{CassandraError, CassandraResult};
53pub use pool::CassandraPool;
54pub use row::{FromRow, Row};
55pub use udf::{UdaDefinition, UdfDefinition, UdfLanguage};
56pub use virtual_tables::{ClusterInfo, PeerInfo, VirtualTables};