pub enum FkAction {
Restrict,
Cascade,
SetNull,
SetDefault,
NoAction,
}Expand description
v7.6.0 — Referential action for ON DELETE / ON UPDATE.
Variants§
Restrict
Reject the parent mutation if any child row references it. SQL spec default; SPG default when no clause is given.
Cascade
Recursively propagate the parent’s delete / update to the child rows. Same TX.
SetNull
Set the child FK column(s) to NULL. Requires the FK columns to be NULL-able.
SetDefault
Set the child FK column(s) to their declared DEFAULT. Requires the child column(s) to have DEFAULT.
NoAction
SQL spec NO ACTION (deferred check). SPG treats this as
Restrict because the single-writer model has no deferred
constraint window; the keyword is accepted for compatibility.
Trait Implementations§
impl Copy for FkAction
impl Eq for FkAction
impl StructuralPartialEq for FkAction
Auto Trait Implementations§
impl Freeze for FkAction
impl RefUnwindSafe for FkAction
impl Send for FkAction
impl Sync for FkAction
impl Unpin for FkAction
impl UnsafeUnpin for FkAction
impl UnwindSafe for FkAction
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