pub struct TimestampTableConfig {
pub table_name: String,
pub created_at_column: String,
pub updated_at_column: String,
pub primary_key: Vec<String>,
pub columns: Vec<String>,
}Expand description
Per-table configuration for timestamp-based CDC polling.
Identifies the columns that the consumer reads to build the watermark predicate and to classify events as inserts vs updates.
Fields§
§table_name: StringName of the table in the external source database.
created_at_column: StringColumn that records when the row was first created.
Used together with Self::updated_at_column for the INSERT/UPDATE
heuristic: if created_at == updated_at the row is treated as a new
insert; otherwise it is treated as an update.
updated_at_column: StringColumn that records when the row was last modified.
This is the primary watermark column. The poll query filters
WHERE updated_at > watermark_ts (with composite-PK tie-breaking).
primary_key: Vec<String>Names of the primary key columns, in declaration order.
Must contain at least one entry. Used for:
- Watermark tie-breaking when multiple rows share the same
updated_at. - Setting
rhei_core::CdcEvent::row_idfrom the first PK column. - SQL tuple comparison in the poll predicate for composite PKs.
columns: Vec<String>Explicit list of columns to include in SELECT.
When empty the consumer issues SELECT * and all columns are included.
Provide an explicit list to reduce bandwidth or exclude columns
irrelevant to the OLAP workload.
Trait Implementations§
Source§impl Clone for TimestampTableConfig
impl Clone for TimestampTableConfig
Source§fn clone(&self) -> TimestampTableConfig
fn clone(&self) -> TimestampTableConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TimestampTableConfig
impl RefUnwindSafe for TimestampTableConfig
impl Send for TimestampTableConfig
impl Sync for TimestampTableConfig
impl Unpin for TimestampTableConfig
impl UnsafeUnpin for TimestampTableConfig
impl UnwindSafe for TimestampTableConfig
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