pub enum ReturnTarget {
New,
Old,
Null,
Expr(Expr),
}Variants§
New
RETURN NEW; — for BEFORE triggers, this is the row that
actually gets written (possibly with NEW.col mutations
applied). For AFTER triggers, the return value is ignored.
Old
RETURN OLD; — pass-through. For BEFORE DELETE this lets
the delete proceed; for BEFORE UPDATE / INSERT it’s
equivalent to dropping the write.
Null
RETURN NULL; — for BEFORE triggers, skips the write
entirely. For AFTER, the return value is ignored.
Expr(Expr)
RETURN <expr>; — non-row return shape; reserved for the
scalar UDF surface in v7.12.5+. Executor errors when used
inside a trigger function.
Trait Implementations§
Source§impl Clone for ReturnTarget
impl Clone for ReturnTarget
Source§fn clone(&self) -> ReturnTarget
fn clone(&self) -> ReturnTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReturnTarget
impl Debug for ReturnTarget
Source§impl PartialEq for ReturnTarget
impl PartialEq for ReturnTarget
Source§fn eq(&self, other: &ReturnTarget) -> bool
fn eq(&self, other: &ReturnTarget) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReturnTarget
Auto Trait Implementations§
impl Freeze for ReturnTarget
impl RefUnwindSafe for ReturnTarget
impl Send for ReturnTarget
impl Sync for ReturnTarget
impl Unpin for ReturnTarget
impl UnsafeUnpin for ReturnTarget
impl UnwindSafe for ReturnTarget
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