pub struct GraphMutation {
pub vertices: Vec<VertexSet>,
pub edges: Vec<EdgeSet>,
pub deletes: Vec<VertexDelete>,
pub edge_deletes: Vec<EdgeSet>,
}Expand description
Everything one sync round wants to apply to the graph.
Sinks apply this in three phases, in order:
- all
vertices(upserts), then - all
edges(upserts) — so edges can reference nodes created above, and - all
deletes— last, but with a per-key net-effect rule: a delete whose(label, id)was also upserted this round is suppressed (the upsert wins). This is what makes an in-place UPDATE safe: a changelog UPDATE emits UPDATE_BEFORE(id) + UPDATE_AFTER(id), and treating the BEFORE row as a blind delete would destroy the node the AFTER row just rewrote. A true delete (no matching upsert) still removes the node. Seeupserted_vertex_keys/surviving_delete_idsinsink.rs.
Fields§
§vertices: Vec<VertexSet>§edges: Vec<EdgeSet>§deletes: Vec<VertexDelete>Nodes to remove (DETACH DELETE). Empty for append-only rounds; carries
the DELETE rows of a changelog round (UPDATE_BEFORE is dropped, not
deleted). Defaulting to empty keeps every existing producer of
GraphMutation source-compatible.
edge_deletes: Vec<EdgeSet>Relationships to remove: the changelog DELETE rows of an edge step,
in EdgeSet shape (src, dst, and the edge_key_props that tell
parallel edges apart). Applied in phase 3 with the vertex deletes and by
the same rule — an edge also upserted this round survives — and a row
whose src or dst is null (an equality delete that carries only the
row’s key) cannot name its edge and is skipped, counted in the log.
Implementations§
Source§impl GraphMutation
impl GraphMutation
Trait Implementations§
Source§impl Clone for GraphMutation
impl Clone for GraphMutation
Source§impl Debug for GraphMutation
impl Debug for GraphMutation
Auto Trait Implementations§
impl !RefUnwindSafe for GraphMutation
impl !UnwindSafe for GraphMutation
impl Freeze for GraphMutation
impl Send for GraphMutation
impl Sync for GraphMutation
impl Unpin for GraphMutation
impl UnsafeUnpin for GraphMutation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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