pub struct PartialRowUpdate {
pub total_columns: u16,
pub column_mask: Vec<u8>,
pub values: Vec<Option<Vec<u8>>>,
}Expand description
A partial row update containing only changed columns
Used for selective column updates to reduce bandwidth when only a few columns change in a wide table.
Fields§
§total_columns: u16Total number of columns in the full row (for bitmap sizing)
column_mask: Vec<u8>Bitmap indicating which columns are present (1 bit per column)
Bit 0 = column 0, Bit 1 = column 1, etc.
A set bit means the column value is included in values
values: Vec<Option<Vec<u8>>>Values for columns with set bits in column_mask, in column order None = NULL, Some(bytes) = value data
Implementations§
Source§impl PartialRowUpdate
impl PartialRowUpdate
Sourcepub fn new(
total_columns: u16,
present_columns: &[u16],
values: Vec<Option<Vec<u8>>>,
) -> Self
pub fn new( total_columns: u16, present_columns: &[u16], values: Vec<Option<Vec<u8>>>, ) -> Self
Create a new partial row update
§Arguments
total_columns- Total number of columns in the full rowpresent_columns- Indices of columns that are present in this updatevalues- Values for the present columns, in same order as present_columns
Sourcepub fn is_column_present(&self, col_idx: u16) -> bool
pub fn is_column_present(&self, col_idx: u16) -> bool
Check if a column is present in this update
Sourcepub fn present_column_count(&self) -> usize
pub fn present_column_count(&self) -> usize
Get the number of present columns
Trait Implementations§
Source§impl Clone for PartialRowUpdate
impl Clone for PartialRowUpdate
Source§fn clone(&self) -> PartialRowUpdate
fn clone(&self) -> PartialRowUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialRowUpdate
impl Debug for PartialRowUpdate
Source§impl PartialEq for PartialRowUpdate
impl PartialEq for PartialRowUpdate
Source§fn eq(&self, other: &PartialRowUpdate) -> bool
fn eq(&self, other: &PartialRowUpdate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PartialRowUpdate
Auto Trait Implementations§
impl Freeze for PartialRowUpdate
impl RefUnwindSafe for PartialRowUpdate
impl Send for PartialRowUpdate
impl Sync for PartialRowUpdate
impl Unpin for PartialRowUpdate
impl UnsafeUnpin for PartialRowUpdate
impl UnwindSafe for PartialRowUpdate
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 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>
Wrap the input message
T in a tonic::Request