pub struct Trigger {
pub name: String,
pub sql: String,
pub table_name: String,
pub time: TriggerTime,
pub event: TriggerEvent,
pub for_each_row: bool,
pub when_clause: Option<Expr>,
pub commands: Vec<TriggerCmd>,
pub temporary: bool,
pub target_database_id: Option<usize>,
}Expand description
Trigger structure
Fields§
§name: String§sql: String§table_name: String§time: TriggerTime§event: TriggerEvent§for_each_row: bool§when_clause: Option<Expr>§commands: Vec<TriggerCmd>§temporary: bool§target_database_id: Option<usize>For temp triggers that target a table in a specific database.
None— the trigger was created without a db qualifier and targets a table in its own schema (or, if it’s a temp trigger and no temp shadow exists, the parent schema’s table).Some(MAIN_DB_ID | TEMP_DB_ID | <attached_id>)— resolved qualifier.Some(crate::INVALID_DB_ID)— the qualifier referenced an attached db name that could not be resolved at parse time (e.g. reloadingCREATE TEMP TRIGGER ... ON aux.xwhenauxis not attached). The trigger never fires against a real db, which is the correct fail-safe behaviour.
Implementations§
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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