pub enum SchemaError {
Show 18 variants
DuplicateTable(TableName),
DuplicateView(ViewName),
DuplicateColumn {
table: TableName,
column: ColumnName,
},
DuplicateConstraint {
table: TableName,
constraint: ConstraintName,
},
DuplicateIndex {
table: TableName,
index: IndexName,
},
DanglingDomain(DomainId),
DanglingColumn {
table: TableName,
column: ColumnName,
},
DanglingTable(TableName),
DanglingView(ViewName),
EmptyKey(ConstraintName),
NullablePrimaryKey(ColumnName),
DefaultAndGenerated(ColumnName),
GeneratedCycle(ColumnName),
InvalidDefault(ColumnName),
InvalidGenerated(ColumnName),
ForeignKeyArity(ConstraintName),
ForeignKeyDomain {
constraint: ConstraintName,
index: usize,
},
ViewCycle(ViewName),
}Expand description
A schema refusal, reported before codec/provider dispatch.
Variants§
DuplicateTable(TableName)
A table name repeats.
DuplicateView(ViewName)
A view name repeats.
DuplicateColumn
A column repeats in one table.
DuplicateConstraint
A constraint repeats in one table.
DuplicateIndex
An index repeats in one table.
DanglingDomain(DomainId)
A domain id is absent from the catalog.
DanglingColumn
A column reference is absent or crosses constraint scope.
DanglingTable(TableName)
A table reference is absent.
DanglingView(ViewName)
A view reference is absent.
EmptyKey(ConstraintName)
A key has no columns.
NullablePrimaryKey(ColumnName)
Primary-key columns cannot be nullable.
DefaultAndGenerated(ColumnName)
A column declares both default and generation.
GeneratedCycle(ColumnName)
A generated column directly depends on itself.
InvalidDefault(ColumnName)
A default is rejected by its domain Shape.
InvalidGenerated(ColumnName)
A generated expression is rejected by its domain Shape.
ForeignKeyArity(ConstraintName)
Foreign key sides have different arity.
ForeignKeyDomain
Foreign key domains differ at an offset.
ViewCycle(ViewName)
View dependencies contain a cycle.
Trait Implementations§
Source§impl Clone for SchemaError
impl Clone for SchemaError
Source§fn clone(&self) -> SchemaError
fn clone(&self) -> SchemaError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaError
impl Debug for SchemaError
Source§impl Display for SchemaError
impl Display for SchemaError
impl Eq for SchemaError
Source§impl Error for SchemaError
impl Error for SchemaError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SchemaError
impl PartialEq for SchemaError
impl StructuralPartialEq for SchemaError
Auto Trait Implementations§
impl Freeze for SchemaError
impl RefUnwindSafe for SchemaError
impl Send for SchemaError
impl Sync for SchemaError
impl Unpin for SchemaError
impl UnsafeUnpin for SchemaError
impl UnwindSafe for SchemaError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more