pub enum QueryError {
Show 14 variants
PrimaryKeyConflict,
BrokenForeignKeyReference {
table: &'static str,
key: Value,
},
ForeignKeyConstraintViolation {
referencing_table: &'static str,
field: &'static str,
},
UnknownColumn(String),
MissingNonNullableField(&'static str),
TypeMismatch {
column: &'static str,
expected: &'static str,
found: &'static str,
},
TransactionNotFound,
InvalidQuery(String),
ConstraintViolation(String),
MemoryError(MemoryError),
TableNotFound(&'static str),
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.
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(&'static str)
Tried to insert a record missing non-nullable fields.
TypeMismatch
Tried to cast or compare values of incompatible types (e.g. Integer vs Text).
TransactionNotFound
The specified transaction was not found or has expired.
InvalidQuery(String)
Query contains syntactically or semantically invalid conditions.
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(&'static str)
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).