pub enum TriggerOutcome {
Proceed,
SkipRow,
}Expand description
Outcome of firing a trigger (or set of triggers) for a row.
RAISE(IGNORE) inside a trigger body asks SQLite to abandon the current
row’s DML operation without raising an error and continue with the rest of
the statement. The trigger firing functions translate the internal
ExecutorError::RaiseIgnore signal into TriggerOutcome::SkipRow so the
DML caller can drop that row; every other (real) error still propagates via
Err. RAISE(ABORT|FAIL|ROLLBACK, ..) are not represented here — they are
genuine aborts and propagate as ExecutorError::Raise.
Marked #[must_use] (#5418): the trigger-firing helpers return this so the
DML caller can drop the current row on TriggerOutcome::SkipRow. A call
site that writes fire(..)?; and discards the value would silently swallow
a RAISE(IGNORE) and apply the row anyway. The attribute turns every such
drop into a compile-time warning so new call sites must decide explicitly
what to do with SkipRow.
Variants§
Proceed
Triggers completed normally; the DML operation should proceed.
SkipRow
A RAISE(IGNORE) fired; the current row should be skipped, and the
surrounding statement should continue with the next row.
Trait Implementations§
Source§impl Clone for TriggerOutcome
impl Clone for TriggerOutcome
Source§fn clone(&self) -> TriggerOutcome
fn clone(&self) -> TriggerOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TriggerOutcome
Source§impl Debug for TriggerOutcome
impl Debug for TriggerOutcome
impl Eq for TriggerOutcome
Source§impl PartialEq for TriggerOutcome
impl PartialEq for TriggerOutcome
impl StructuralPartialEq for TriggerOutcome
Auto Trait Implementations§
impl Freeze for TriggerOutcome
impl RefUnwindSafe for TriggerOutcome
impl Send for TriggerOutcome
impl Sync for TriggerOutcome
impl Unpin for TriggerOutcome
impl UnsafeUnpin for TriggerOutcome
impl UnwindSafe for TriggerOutcome
Blanket Implementations§
impl<T> Allocation for T
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
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,
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
key and return true if they are equal.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> ⓘ
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> ⓘ
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