pub struct DatabaseEvent {Show 13 fields
pub event_id: Option<String>,
pub timestamp_us: u64,
pub operation: OperationType,
pub schema: String,
pub table: String,
pub position: u64,
pub transaction_id: u64,
pub new_row: Option<Row>,
pub old_row: Option<Row>,
pub columns: Vec<String>,
pub relation_meta: Option<RelationMeta>,
pub ddl_sql: Option<String>,
pub ddl_object_type: Option<String>,
}Expand description
A single database event.
Fields§
§event_id: Option<String>Unique event identifier (UUID v4).
timestamp_us: u64Event timestamp (Unix timestamp in microseconds).
operation: OperationTypeOperation type.
schema: StringSchema name.
table: StringTable name.
position: u64Replication position (PostgreSQL LSN as u64).
transaction_id: u64Transaction ID.
new_row: Option<Row>New row data (for INSERT, UPDATE, SnapshotRow).
old_row: Option<Row>Old row data (for UPDATE with REPLICA IDENTITY FULL, DELETE).
columns: Vec<String>Column names in order.
relation_meta: Option<RelationMeta>Relation metadata (sent once per table per stream).
ddl_sql: Option<String>DDL SQL statement (when operation == Ddl). Contains the full CREATE/ALTER/DROP statement.
ddl_object_type: Option<String>DDL object type for filtering/logging. e.g., “extension”, “table”, “index”, “constraint”, “function”, “trigger”
Implementations§
Source§impl DatabaseEvent
impl DatabaseEvent
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Get the fully qualified table name.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Estimate the size of this event in bytes.
Trait Implementations§
Source§impl Clone for DatabaseEvent
impl Clone for DatabaseEvent
Source§fn clone(&self) -> DatabaseEvent
fn clone(&self) -> DatabaseEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 DatabaseEvent
impl Debug for DatabaseEvent
Source§impl<'de> Deserialize<'de> for DatabaseEvent
impl<'de> Deserialize<'de> for DatabaseEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DatabaseEvent
impl PartialEq for DatabaseEvent
Source§impl Serialize for DatabaseEvent
impl Serialize for DatabaseEvent
impl StructuralPartialEq for DatabaseEvent
Auto Trait Implementations§
impl Freeze for DatabaseEvent
impl RefUnwindSafe for DatabaseEvent
impl Send for DatabaseEvent
impl Sync for DatabaseEvent
impl Unpin for DatabaseEvent
impl UnsafeUnpin for DatabaseEvent
impl UnwindSafe for DatabaseEvent
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
Mutably borrows from an owned value. Read more