pub struct DatabaseEventBuilder { /* private fields */ }Expand description
Builder for constructing a single DatabaseEvent.
Implementations§
Source§impl DatabaseEventBuilder
impl DatabaseEventBuilder
Sourcepub fn new(
operation: OperationType,
schema: impl Into<String>,
table: impl Into<String>,
) -> Self
pub fn new( operation: OperationType, schema: impl Into<String>, table: impl Into<String>, ) -> Self
Create a new builder for a DML operation.
Sourcepub fn insert(schema: impl Into<String>, table: impl Into<String>) -> Self
pub fn insert(schema: impl Into<String>, table: impl Into<String>) -> Self
Create a builder for an INSERT event.
Sourcepub fn update(schema: impl Into<String>, table: impl Into<String>) -> Self
pub fn update(schema: impl Into<String>, table: impl Into<String>) -> Self
Create a builder for an UPDATE event.
Sourcepub fn delete(schema: impl Into<String>, table: impl Into<String>) -> Self
pub fn delete(schema: impl Into<String>, table: impl Into<String>) -> Self
Create a builder for a DELETE event.
Sourcepub fn snapshot_row(schema: impl Into<String>, table: impl Into<String>) -> Self
pub fn snapshot_row(schema: impl Into<String>, table: impl Into<String>) -> Self
Create a builder for a snapshot row.
Sourcepub fn ddl(sql: impl Into<String>, object_type: impl Into<String>) -> Self
pub fn ddl(sql: impl Into<String>, object_type: impl Into<String>) -> Self
Create a builder for a DDL event.
Sourcepub fn timestamp_us(self, ts: u64) -> Self
pub fn timestamp_us(self, ts: u64) -> Self
Set the timestamp in microseconds.
Sourcepub fn timestamp(self, ts: SystemTime) -> Self
pub fn timestamp(self, ts: SystemTime) -> Self
Set the timestamp from SystemTime.
Sourcepub fn transaction_id(self, xid: u64) -> Self
pub fn transaction_id(self, xid: u64) -> Self
Set the transaction ID.
Sourcepub fn relation_meta(self, meta: RelationMeta) -> Self
pub fn relation_meta(self, meta: RelationMeta) -> Self
Set relation metadata.
Sourcepub fn build(self) -> DatabaseEvent
pub fn build(self) -> DatabaseEvent
Build the event.
Auto Trait Implementations§
impl Freeze for DatabaseEventBuilder
impl RefUnwindSafe for DatabaseEventBuilder
impl Send for DatabaseEventBuilder
impl Sync for DatabaseEventBuilder
impl Unpin for DatabaseEventBuilder
impl UnsafeUnpin for DatabaseEventBuilder
impl UnwindSafe for DatabaseEventBuilder
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