pub struct RowDamageVector {
pub changed: Vec<(String, Value, Value)>,
pub added: Vec<(String, Value)>,
pub removed: Vec<(String, Value)>,
}Expand description
Damage-vector for a row update: the minimal diff between the pre-mutation and post-mutation field state. Downstream consumers (secondary-index maintainer, CDC emitter, eventually the pager’s in-place update path) work off this struct so they only touch columns that actually changed.
Future work (Fase 5): the pager can decide whether changed fits
in the existing cell’s slotted footprint and patch bytes in place
instead of rewriting the whole row.
Fields§
§changed: Vec<(String, Value, Value)>Columns present in both old and new whose value differs.
(column, old_value, new_value).
added: Vec<(String, Value)>Columns present in new but not in old.
removed: Vec<(String, Value)>Columns present in old but not in new.
Implementations§
Source§impl RowDamageVector
impl RowDamageVector
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when no columns changed, were added, or were removed. Callers can short-circuit index/CDC/in-place work when this holds.
Sourcepub fn touched_columns(&self) -> Vec<&str>
pub fn touched_columns(&self) -> Vec<&str>
Names of every column the update touched. Equivalent to the
current modified_columns list carried on AppliedEntityMutation
but computed from the ground truth of old/new rather than
from what the SQL executor thinks it wrote.
Trait Implementations§
Source§impl Clone for RowDamageVector
impl Clone for RowDamageVector
Source§fn clone(&self) -> RowDamageVector
fn clone(&self) -> RowDamageVector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RowDamageVector
impl Debug for RowDamageVector
Source§impl Default for RowDamageVector
impl Default for RowDamageVector
Source§fn default() -> RowDamageVector
fn default() -> RowDamageVector
Source§impl PartialEq for RowDamageVector
impl PartialEq for RowDamageVector
Source§fn eq(&self, other: &RowDamageVector) -> bool
fn eq(&self, other: &RowDamageVector) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RowDamageVector
Auto Trait Implementations§
impl Freeze for RowDamageVector
impl RefUnwindSafe for RowDamageVector
impl Send for RowDamageVector
impl Sync for RowDamageVector
impl Unpin for RowDamageVector
impl UnsafeUnpin for RowDamageVector
impl UnwindSafe for RowDamageVector
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request