prax_sqlite/lib.rs
1//! SQLite database driver for Prax ORM.
2//!
3//! This crate provides SQLite support for the Prax ORM, using `tokio-rusqlite`
4//! for asynchronous database operations.
5//!
6//! # Features
7//!
8//! - Async/await support via `tokio-rusqlite`
9//! - Connection pooling
10//! - Type-safe query building
11//! - Transaction support
12//! - In-memory and file-based databases
13//!
14//! # Example
15//!
16//! ```rust,ignore
17//! use prax_sqlite::{SqlitePool, SqliteConfig};
18//!
19//! #[tokio::main]
20//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
21//! let config = SqliteConfig::from_url("sqlite://./mydb.db")?;
22//! let pool = SqlitePool::new(config).await?;
23//!
24//! // Use the pool...
25//! Ok(())
26//! }
27//! ```
28//!
29//! See [`SqliteEngine`]'s doc block for 0.7 breaking changes.
30
31pub mod config;
32pub mod connection;
33pub mod engine;
34pub mod error;
35pub mod pool;
36pub mod raw;
37pub mod row;
38pub mod row_ref;
39pub mod types;
40
41#[cfg(feature = "vector")]
42pub mod vector;
43
44pub use config::{DatabasePath, JournalMode, SqliteConfig, SynchronousMode};
45pub use connection::SqliteConnection;
46pub use engine::SqliteEngine;
47pub use error::{SqliteError, SqliteResult};
48pub use pool::{PoolConfig, SqlitePool, SqlitePoolBuilder};
49pub use raw::{SqliteJsonRow, SqliteRawEngine};
50pub use row::FromSqliteRow;