pub enum ChangeEvent {
Upsert {
table: TableName,
key: RowKey,
},
Delete {
table: TableName,
key: RowKey,
},
}Expand description
What happened to a row, identified only by its table and primary key.
Events are deliberately thin: they name the row, not its contents. The
engine re-reads the current row — and resolves the document’s joins and
aggregates — at assembly time. This keeps every mechanism (WAL, polling, …)
identical from the engine’s point of view and avoids depending on a table’s
REPLICA IDENTITY to carry old or new values.
Note that the mechanism reports raw per-table changes. Mapping a change in a joined or junction table back to the parent documents that must be rebuilt is the document layer’s job — not something this layer knows.
There is no distinct “snapshot” variant: an initial backfill is a separate
finite stream of Upserts (see
ChangeCapture::snapshot), so the engine
knows it is seeding from which stream it is draining, not from the event.
Variants§
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more