sqlx-named-bind 0.1.0

Named parameter binding for SQLx with HRTB pattern, avoiding self-referential issues
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Error types for sqlx-named-bind
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// Error during SQL template parsing
    #[error("Failed to parse SQL template: {0}")]
    Parse(#[from] regex::Error),

    /// Error from SQLx database operations
    #[error("Database error: {0}")]
    Database(#[from] sqlx::Error),

    /// Placeholder was referenced but not bound by the binder function
    #[error("Placeholder '{0}' was not bound by the binder function")]
    UnboundPlaceholder(String),
}

/// Result type alias for sqlx-named-bind operations
pub type Result<T> = std::result::Result<T, Error>;