pub enum DeleteBehavior {
Restrict,
Cascade,
Break,
}Expand description
Defines the behavior for delete operations regarding foreign key constraints.
Variants§
Restrict
Delete only the records matching the filter. If there are foreign key constraints that would be violated, the operation will fail.
Cascade
Cascade delete to related records. Any records that reference the deleted records via foreign keys will also be deleted.
Break
Break the foreign key references. If there are foreign key constraints, the references will be broken. Don’t use this option unless you are sure what you’re doing!
Trait Implementations§
Source§impl CandidType for DeleteBehavior
impl CandidType for DeleteBehavior
Source§impl Clone for DeleteBehavior
impl Clone for DeleteBehavior
Source§fn clone(&self) -> DeleteBehavior
fn clone(&self) -> DeleteBehavior
Returns a duplicate of the value. Read more
1.0.0 · 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 DeleteBehavior
impl Debug for DeleteBehavior
Source§impl<'de> Deserialize<'de> for DeleteBehavior
impl<'de> Deserialize<'de> for DeleteBehavior
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeleteBehavior, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeleteBehavior, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DeleteBehavior
impl PartialEq for DeleteBehavior
Source§impl Serialize for DeleteBehavior
impl Serialize for DeleteBehavior
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for DeleteBehavior
impl Eq for DeleteBehavior
impl StructuralPartialEq for DeleteBehavior
Auto Trait Implementations§
impl Freeze for DeleteBehavior
impl RefUnwindSafe for DeleteBehavior
impl Send for DeleteBehavior
impl Sync for DeleteBehavior
impl Unpin for DeleteBehavior
impl UnwindSafe for DeleteBehavior
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