#[non_exhaustive]pub enum SeedError {
CyclicForeignKeys {
tables: Vec<String>,
},
MissingParentRows {
child: String,
parent: String,
},
UnsafeResetSelection {
parent: String,
skipped_child: String,
},
ParameterLimitTooLow {
table: String,
required: usize,
limit: usize,
},
UnknownTable {
table: String,
known: Vec<String>,
},
AmbiguousTable {
table: String,
candidates: Vec<String>,
},
UnknownColumn {
table: String,
column: String,
known: Vec<String>,
},
NotRelated {
parent: String,
child: String,
},
DialectNotEnabled {
dialect: String,
},
NoLiteral {
reason: String,
},
InvalidValue {
table: String,
column: String,
reason: String,
},
}Expand description
Why SeedConfig could not build the statements
(returned by try_generate and reset_plan).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CyclicForeignKeys
The non-skipped tables have a foreign-key cycle, so there is no
parent-first order. A self-reference counts only when all of its
columns are NOT NULL.
MissingParentRows
A NOT NULL foreign key in child has no parent row to point at:
the seeded parent got zero rows, or the relation count is zero. (A
nullable foreign key is set to NULL instead.)
UnsafeResetSelection
reset_plan would delete a parent’s rows while a skipped table still
references it.
Fields
ParameterLimitTooLow
A single row needs more bind parameters than the limit (max_params,
or the dialect’s maximum).
Fields
UnknownTable
A *_by_name setting names a table the schema does not have.
AmbiguousTable
A *_by_name setting names a table that exists in several
namespaces; qualify it as schema.table.
UnknownColumn
A *_by_name setting names a column the table does not have.
Fields
NotRelated
relation_by_name was given a child with no foreign key to
parent.
DialectNotEnabled
Schema::from_snapshot was given a snapshot for a dialect whose
feature (sqlite, postgres or mysql) is off.
NoLiteral
A value has no SQL literal form, so the statement cannot be written
with its values inline (inline_sql, try_generate_script).
InvalidValue
A generated value cannot be stored in the column’s SQL type.
Trait Implementations§
impl Eq for SeedError
Source§impl Error for SeedError
impl Error for SeedError
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()
impl StructuralPartialEq for SeedError
Auto Trait Implementations§
impl Freeze for SeedError
impl RefUnwindSafe for SeedError
impl Send for SeedError
impl Sync for SeedError
impl Unpin for SeedError
impl UnsafeUnpin for SeedError
impl UnwindSafe for SeedError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<List> ListIncludes<Nil, ()> for List
impl<Mk> MarkerAggValidFor<()> for Mk
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more