#[non_exhaustive]pub enum ExecError {
Build(Error),
Decode {
column: String,
source: Error,
},
MissingColumn {
column: String,
available: Vec<String>,
},
RowNotFound,
TooManyRows,
UnsupportedValue {
type_name: &'static str,
family: Family,
},
Driver(Box<dyn Error + Send + Sync>),
Other(String),
}Expand description
Everything that can go wrong while executing a statement.
Build failures wrap keelson_core::Error; decode failures additionally
carry the column they happened in, because “which column” is the question a
failing read always raises first. Driver failures are boxed rather than
enumerated: their shapes belong to the backend crates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Build(Error)
The query failed to build. Nothing was sent to the database.
Decode
A column’s value could not be read as the requested Rust type.
column is the column name, or #N for positional access.
Fields
source: ErrorWhy the value would not convert — usually
TypeMismatch.
MissingColumn
A column name was asked of a result set that has no such column.
Fields
RowNotFound
fetch_one got zero rows.
TooManyRows
fetch_one or fetch_optional got more than one row.
sqlx silently takes the first; here “one” means one, so extras are an error rather than a hidden data bug.
UnsupportedValue
A Value this backend has no binding for —
an unknown CustomValue, or a variant the
engine cannot represent (e.g. u64::MAX where only signed 64-bit
parameters exist). Refused loudly at bind time; never stringified and
hoped for.
Driver(Box<dyn Error + Send + Sync>)
The driver reported a failure — connection, protocol, server error.
Other(String)
A failure with no shared shape.
Implementations§
Trait Implementations§
Source§impl Error for ExecError
impl Error for ExecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()