pub struct Trigger {
pub qname: QualifiedName,
pub table: QualifiedName,
pub timing: TriggerTiming,
pub events: Vec<TriggerEvent>,
pub level: TriggerLevel,
pub when_clause: Option<NormalizedExpr>,
pub transition_tables: Vec<TransitionTable>,
pub function_qname: QualifiedName,
pub function_args: Vec<String>,
pub is_constraint: bool,
pub deferrable: Deferrable,
pub comment: Option<String>,
}Expand description
A Postgres trigger.
Fields§
§qname: QualifiedNameSchema-qualified trigger name. Schema mirrors the owning table’s schema.
table: QualifiedNameOwning table (or view, for INSTEAD OF triggers).
timing: TriggerTimingWhen the trigger fires relative to the event.
events: Vec<TriggerEvent>Events that fire this trigger.
level: TriggerLevelRow-level or statement-level.
when_clause: Option<NormalizedExpr>Optional WHEN (condition) predicate.
transition_tables: Vec<TransitionTable>Statement-level transition tables (REFERENCING NEW TABLE AS n).
function_qname: QualifiedNameQualified name of the trigger function.
function_args: Vec<String>Literal string arguments passed to the trigger function.
is_constraint: booltrue for CREATE CONSTRAINT TRIGGER.
deferrable: DeferrableDeferrability of constraint triggers.
comment: Option<String>Optional COMMENT ON TRIGGER text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Trigger
impl<'de> Deserialize<'de> for Trigger
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 Diff for Trigger
impl Diff for Trigger
Source§fn diff(&self, other: &Self) -> Vec<Difference>
fn diff(&self, other: &Self) -> Vec<Difference>
List the differences between
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
Convenience:
true iff self.diff(other).is_empty().impl Eq for Trigger
impl StructuralPartialEq for Trigger
Auto Trait Implementations§
impl Freeze for Trigger
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnsafeUnpin for Trigger
impl UnwindSafe for Trigger
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<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