pub enum EventType {
Show 19 variants
Insert {
schema: Arc<str>,
table: Arc<str>,
relation_oid: u32,
data: RowData,
},
Update {
schema: Arc<str>,
table: Arc<str>,
relation_oid: u32,
old_data: Option<RowData>,
new_data: RowData,
replica_identity: ReplicaIdentity,
key_columns: Vec<Arc<str>>,
},
Delete {
schema: Arc<str>,
table: Arc<str>,
relation_oid: u32,
old_data: RowData,
replica_identity: ReplicaIdentity,
key_columns: Vec<Arc<str>>,
},
Truncate(Vec<Arc<str>>),
Begin {
transaction_id: u32,
final_lsn: Lsn,
commit_timestamp: DateTime<Utc>,
},
Commit {
commit_timestamp: DateTime<Utc>,
commit_lsn: Lsn,
end_lsn: Lsn,
},
StreamStart {
transaction_id: u32,
first_segment: bool,
},
StreamStop,
StreamCommit {
transaction_id: u32,
commit_lsn: Lsn,
end_lsn: Lsn,
commit_timestamp: DateTime<Utc>,
},
StreamAbort {
transaction_id: u32,
subtransaction_xid: u32,
abort_lsn: Option<Lsn>,
abort_timestamp: Option<DateTime<Utc>>,
},
Relation {
relation_id: u32,
namespace: Arc<str>,
relation_name: Arc<str>,
replica_identity: ReplicaIdentity,
columns: Vec<RelationColumn>,
},
Type {
type_id: u32,
namespace: Arc<str>,
type_name: Arc<str>,
},
Origin {
origin_lsn: Lsn,
origin_name: Arc<str>,
},
Message {
flags: u8,
message_lsn: Lsn,
prefix: Arc<str>,
content: Bytes,
},
BeginPrepare {
transaction_id: u32,
prepare_lsn: Lsn,
end_lsn: Lsn,
prepare_timestamp: DateTime<Utc>,
gid: Arc<str>,
},
Prepare {
flags: u8,
transaction_id: u32,
prepare_lsn: Lsn,
end_lsn: Lsn,
prepare_timestamp: DateTime<Utc>,
gid: Arc<str>,
},
CommitPrepared {
flags: u8,
transaction_id: u32,
commit_lsn: Lsn,
end_lsn: Lsn,
commit_timestamp: DateTime<Utc>,
gid: Arc<str>,
},
RollbackPrepared {
flags: u8,
transaction_id: u32,
prepare_end_lsn: Lsn,
rollback_end_lsn: Lsn,
prepare_timestamp: DateTime<Utc>,
rollback_timestamp: DateTime<Utc>,
gid: Arc<str>,
},
StreamPrepare {
flags: u8,
transaction_id: u32,
prepare_lsn: Lsn,
end_lsn: Lsn,
prepare_timestamp: DateTime<Utc>,
gid: Arc<str>,
},
}Expand description
Represents the type of change event from PostgreSQL logical replication
Variants§
Insert
Update
Fields
§
replica_identity: ReplicaIdentityDelete
Fields
§
replica_identity: ReplicaIdentityTruncate(Vec<Arc<str>>)
Begin
Commit
StreamStart
Streaming transaction start (protocol v2+)
StreamStop
Streaming transaction stop (end of current segment)
StreamCommit
Streaming transaction commit (final commit of streamed transaction)
StreamAbort
Streaming transaction abort
Fields
Relation
Relation (schema) definition — emitted on schema changes
Type
Custom type definition
Origin
Replication origin information
Message
Logical decoding message (application-defined)
Fields
BeginPrepare
Begin of a two-phase transaction prepare (protocol v3+)
Fields
Prepare
Two-phase transaction prepared (protocol v3+)
Fields
CommitPrepared
Two-phase transaction committed (protocol v3+)
Fields
RollbackPrepared
Two-phase transaction rolled back (protocol v3+)
Fields
StreamPrepare
Streaming two-phase transaction prepare (protocol v3+)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EventType
Source§impl Serialize for EventType
impl Serialize for EventType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl !Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnsafeUnpin for EventType
impl UnwindSafe for EventType
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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