Skip to main content

prax_sqlite/
lib.rs

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