pub enum ReferentialAction {
Cascade,
SetNull,
Restrict,
NoAction,
SetDefault,
}Expand description
A foreign key’s referential action — SQL’s own five words, no synonyms.
Lives here (rather than in the table model) so a dialect can answer
DdlRenderer::supports_foreign_key_action about a specific action
without depending on the modeling crate.
Variants§
Cascade
Also delete or update the referencing rows
SetNull
Set the referencing columns to NULL
Restrict
Reject the delete or update; some engines defer the check
NoAction
Reject the delete or update (the SQL default)
SetDefault
Set the referencing columns to their default values
Implementations§
Trait Implementations§
Source§impl Clone for ReferentialAction
impl Clone for ReferentialAction
Source§fn clone(&self) -> ReferentialAction
fn clone(&self) -> ReferentialAction
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 moreimpl Copy for ReferentialAction
Source§impl Debug for ReferentialAction
impl Debug for ReferentialAction
Source§impl Display for ReferentialAction
impl Display for ReferentialAction
impl Eq for ReferentialAction
Source§impl Hash for ReferentialAction
impl Hash for ReferentialAction
Source§impl PartialEq for ReferentialAction
impl PartialEq for ReferentialAction
impl StructuralPartialEq for ReferentialAction
Auto Trait Implementations§
impl Freeze for ReferentialAction
impl RefUnwindSafe for ReferentialAction
impl Send for ReferentialAction
impl Sync for ReferentialAction
impl Unpin for ReferentialAction
impl UnsafeUnpin for ReferentialAction
impl UnwindSafe for ReferentialAction
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