pub enum PlanError {
UnbreakableCycle(Vec<String>),
UnexpectedCycleAfterFkExtraction(Vec<String>),
UnexpectedDropCycle(Vec<String>),
Internal(String),
BodyCycle {
nodes: Vec<NodeId>,
},
AstResolution(String),
DependentViewsBlocked {
views: Vec<QualifiedName>,
},
}Expand description
Errors raised by the plan-ordering phase.
Variants§
UnbreakableCycle(Vec<String>)
A dependency cycle remained after the planner attempted to break it by extracting FK constraints. Carries the rendered node identifiers participating in the cycle.
UnexpectedCycleAfterFkExtraction(Vec<String>)
After FK extraction the modify-graph topo sort still cycled. This indicates a non-FK cycle that the planner cannot resolve and is almost certainly a bug in upstream phases.
UnexpectedDropCycle(Vec<String>)
The drop-graph topo sort cycled. Drops never have legitimate cycles; this indicates a corrupt target catalog.
Internal(String)
An internal invariant was violated.
BodyCycle
Body-derived cycle in the dependency graph.
FK cycles between tables are auto-extracted into deferred FK adds
(UnbreakableCycle is a different error). Body-derived cycles —
view A queries view B that queries view A — have no general
mechanical fix and surface here. User must edit source to break
the cycle.
AstResolution(String)
An AST resolution error escalated to plan time (e.g., a sub-spec resolver runs after the initial parse pass).
DependentViewsBlocked
The view_drop_create_dependents policy is false and at least one
change would force dependent views to be dropped and recreated. Carries
the names of the blocked views.
Resolution: either enable view_drop_create_dependents in the planner
policy, or modify the migration to explicitly DROP + CREATE the listed
views.
Fields
views: Vec<QualifiedName>Views that would need to be recreated.
Trait Implementations§
impl Eq for PlanError
Source§impl Error for PlanError
impl Error for PlanError
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 PlanError
Auto Trait Implementations§
impl Freeze for PlanError
impl RefUnwindSafe for PlanError
impl Send for PlanError
impl Sync for PlanError
impl Unpin for PlanError
impl UnsafeUnpin for PlanError
impl UnwindSafe for PlanError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more