pub struct MergePlan {
pub into_id: Uuid,
pub from_id: Uuid,
pub rewires: Vec<PlanPredicate>,
pub lifecycle: Vec<PlanStatement>,
}Expand description
Write plan for a merge op (deduplicate two entities). Rewires and
lifecycle writes are split into separate fields precisely so a guard is
never ambiguous between them: the edge rewire is predicate-based
(ADR-099 D1 rule 1) and may touch zero or many rows depending on earlier
in-file writes, so it is never guarded; the from/into entity
lifecycle write assumes both rows exist, so it always is.
Fields§
§into_id: Uuid§from_id: Uuid§rewires: Vec<PlanPredicate>Predicate-based edge-rewire statement(s)
(UPDATE graph_edges SET source_id = :into WHERE source_id = :from-
shaped), evaluated inside the transaction so they structurally see
any earlier op’s edge writes in the same file (ADR-099 acceptance
criteria: “merge rewires see earlier in-file writes”). Never
guarded — a rewire touching zero rows is a legitimate outcome.
lifecycle: Vec<PlanStatement>The from entity’s soft-delete/tombstone DML (and any other
lifecycle write prepare assumed a target row exists for). Always
guarded — prepare validated into/from both exist.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MergePlan
impl RefUnwindSafe for MergePlan
impl Send for MergePlan
impl Sync for MergePlan
impl Unpin for MergePlan
impl UnsafeUnpin for MergePlan
impl UnwindSafe for MergePlan
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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