sqlx_named_bind/
error.rs

1/// Error types for sqlx-named-bind
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4    /// Error during SQL template parsing
5    #[error("Failed to parse SQL template: {0}")]
6    Parse(#[from] regex::Error),
7
8    /// Error from SQLx database operations
9    #[error("Database error: {0}")]
10    Database(#[from] sqlx::Error),
11
12    /// Placeholder was referenced but not bound by the binder function
13    #[error("Placeholder '{0}' was not bound by the binder function")]
14    UnboundPlaceholder(String),
15}
16
17/// Result type alias for sqlx-named-bind operations
18pub type Result<T> = std::result::Result<T, Error>;