Enum rusqlite::Error
[−]
[src]
pub enum Error {
SqliteFailure(Error, Option<String>),
SqliteSingleThreadedMode,
FromSqlConversionFailure(usize, Type, Box<Error + Send + Sync>),
IntegralValueOutOfRange(c_int, i64),
Utf8Error(Utf8Error),
NulError(NulError),
InvalidParameterName(String),
InvalidPath(PathBuf),
ExecuteReturnedResults,
QueryReturnedNoRows,
InvalidColumnIndex(c_int),
InvalidColumnName(String),
InvalidColumnType(c_int, Type),
StatementChangedRows(c_int),
}Enum listing possible errors from rusqlite.
Variants
SqliteFailure(Error, Option<String>)An error from an underlying SQLite call.
SqliteSingleThreadedModeError reported when attempting to open a connection when SQLite was configured to allow single-threaded use only.
FromSqlConversionFailure(usize, Type, Box<Error + Send + Sync>)Error when the value of a particular column is requested, but it cannot be converted to the requested Rust type.
IntegralValueOutOfRange(c_int, i64)Error when SQLite gives us an integral value outside the range of the requested type (e.g.,
trying to get the value 1000 into a u8). The associated c_int is the column index, and
the associated i64 is the value returned by SQLite.
Utf8Error(Utf8Error)Error converting a string to UTF-8.
NulError(NulError)Error converting a string to a C-compatible string because it contained an embedded nul.
InvalidParameterName(String)Error when using SQL named parameters and passing a parameter name not present in the SQL.
InvalidPath(PathBuf)Error converting a file path to a string.
ExecuteReturnedResultsError returned when an execute call returns rows.
QueryReturnedNoRowsError when a query that was expected to return at least one row (e.g., for query_row)
did not return any.
InvalidColumnIndex(c_int)Error when the value of a particular column is requested, but the index is out of range for the statement.
InvalidColumnName(String)Error when the value of a named column is requested, but no column matches the name for the statement.
InvalidColumnType(c_int, Type)Error when the value of a particular column is requested, but the type of the result in that column cannot be converted to the requested Rust type.
StatementChangedRows(c_int)Error when a query that was expected to insert one row did not insert any or insert many.