pub enum QueryError {
Show 15 variants
PrimaryKeyConflict,
UniqueConstraintViolation {
field: String,
},
BrokenForeignKeyReference {
table: String,
key: Value,
},
ForeignKeyConstraintViolation {
referencing_table: String,
field: String,
},
UnknownColumn(String),
MissingNonNullableField(String),
TransactionNotFound,
InvalidQuery(String),
JoinInsideTypedSelect,
ConstraintViolation(String),
MemoryError(MemoryError),
TableNotFound(String),
RecordNotFound,
SerializationError(String),
Internal(String),
}Expand description
An enum representing possible errors that can occur during query operations.
Variants§
PrimaryKeyConflict
The specified primary key value already exists in the table.
UniqueConstraintViolation
A unique constraint was violated (e.g., UNIQUE index, CHECK constraint, etc.)
BrokenForeignKeyReference
A foreign key references a non-existent record in another table.
ForeignKeyConstraintViolation
Tried to delete or update a record that is referenced by another table’s foreign key.
UnknownColumn(String)
Tried to reference a column that does not exist in the table schema.
MissingNonNullableField(String)
Tried to insert a record missing non-nullable fields.
TransactionNotFound
The specified transaction was not found or has expired.
InvalidQuery(String)
Query contains syntactically or semantically invalid conditions.
JoinInsideTypedSelect
Join inside a typed select operation
ConstraintViolation(String)
Generic constraint violation (e.g., UNIQUE, CHECK, etc.)
MemoryError(MemoryError)
The memory allocator or memory manager failed to allocate or access stable memory.
TableNotFound(String)
The table or schema was not found.
RecordNotFound
The record identified by the given key or filter does not exist.
SerializationError(String)
Any low-level IO or serialization/deserialization issue.
Internal(String)
Generic catch-all error (for internal, unexpected conditions).
Trait Implementations§
Source§impl Debug for QueryError
impl Debug for QueryError
Source§impl<'de> Deserialize<'de> for QueryError
impl<'de> Deserialize<'de> for QueryError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for QueryError
impl Display for QueryError
Source§impl Error for QueryError
impl Error for QueryError
1.30.0 · 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()