sqlw-backend 0.1.0

Database executor implementations for sqlw
Documentation
//! Database operation error types.

/// Database operation error.
#[derive(Debug, thiserror::Error)]
pub enum DBError {
    /// Connection-related error (failed to connect, pool exhausted, etc.)
    #[error("connection error: {0}")]
    Connection(#[source] Box<dyn std::error::Error + Send + Sync>),

    /// Runtime execution related error
    #[error("query error: {0}")]
    Execution(#[source] Box<dyn std::error::Error + Send + Sync>),

    /// Row mapping error (failed to deserialize row into struct)
    #[error("mapping error: {0}")]
    Mapping(#[from] sqlw::RowError),

    /// Transaction error (commit/rollback failed, nested transaction issue)
    #[error("transaction error: {0}")]
    Transaction(#[source] Box<dyn std::error::Error + Send + Sync>),
}