pub struct SelectiveColumnConfig {
pub enabled: bool,
pub pk_columns: Vec<usize>,
pub min_changed_columns: usize,
pub max_changed_columns_ratio: f64,
}Expand description
Configuration for selective column updates
This config controls when selective column updates (0xF7 messages) are used instead of full row updates. Selective updates only send changed columns plus primary key columns, reducing bandwidth for wide tables with few changes.
Fields§
§enabled: boolEnable selective column updates
pk_columns: Vec<usize>Column indices that are primary key columns (always included) This is per-subscription and not configurable via config file
min_changed_columns: usizeMinimum columns that must change to use selective update If fewer columns change, send full row instead
max_changed_columns_ratio: f64Maximum ratio of changed columns before falling back to full row E.g., 0.5 means if >50% of columns changed, send full row instead
Implementations§
Source§impl SelectiveColumnConfig
impl SelectiveColumnConfig
Sourcepub fn with_pk_columns(&self, pk_columns: Vec<usize>) -> Self
pub fn with_pk_columns(&self, pk_columns: Vec<usize>) -> Self
Create a copy of this config with the specified pk_columns
Useful for creating subscription-specific configs from a server-level template.
Trait Implementations§
Source§impl Clone for SelectiveColumnConfig
impl Clone for SelectiveColumnConfig
Source§fn clone(&self) -> SelectiveColumnConfig
fn clone(&self) -> SelectiveColumnConfig
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 SelectiveColumnConfig
impl Debug for SelectiveColumnConfig
Source§impl Default for SelectiveColumnConfig
impl Default for SelectiveColumnConfig
Source§impl<'de> Deserialize<'de> for SelectiveColumnConfig
impl<'de> Deserialize<'de> for SelectiveColumnConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SelectiveColumnConfig
impl RefUnwindSafe for SelectiveColumnConfig
impl Send for SelectiveColumnConfig
impl Sync for SelectiveColumnConfig
impl Unpin for SelectiveColumnConfig
impl UnsafeUnpin for SelectiveColumnConfig
impl UnwindSafe for SelectiveColumnConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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