sqlw-backend 0.1.0

Database executor implementations for sqlw
Documentation
#![warn(missing_docs)]

//! Database executor implementations for sqlw.
//!
//! Provides async database connections with a unified interface.
//!
//! # Features
//!
//! - `sqlite` - Rusqlite support via `tokio-rusqlite`
//! - `turso` - Turso/libSQL support (default)
//! - `postgres` - PostgreSQL support via `bb8` connection pool with `tokio-postgres`
//! - `mysql` - MySQL support via `mysql_async`
//!
//! # Module Layout
//!
//! Each backend module is self-contained:
//! - `postgres` contains both `PostgresExecutor` and `PostgresRowRef`
//! - `mysql` contains both `MySqlExecutor` and `MySqlRowRef`
//! - `sqlite` contains both `SqliteExecutor` and `SqliteRowRef`
//! - `turso` contains both `TursoExecutor` and `TursoRowRef`
//!
//! # Example
//!
//! ```ignore
//! use sqlw::{QueryExecutor, query_qmark as query};
//! use sqlw_backend::turso::TursoExecutor;
//!
//! let executor = TursoExecutor::new(|| async {
//!     turso::Builder::new_local("file.db").build().await?
//!         .connect()
//! }).await?;
//!
//! let users: Vec<User> = executor.query_list(query).await?;
//! ```

#[cfg(feature = "sqlite")]
pub mod sqlite;

#[cfg(feature = "turso")]
pub mod turso;

#[cfg(feature = "postgres")]
pub mod postgres;

#[cfg(feature = "mysql")]
pub mod mysql;

pub mod error;