pub struct ForeignKeyOptions {
pub on_delete: Option<String>,
pub on_update: Option<String>,
}Expand description
外键选项构建器(Phinx 风格链式配置)
Fields§
§on_delete: Option<String>§on_update: Option<String>Implementations§
Source§impl ForeignKeyOptions
impl ForeignKeyOptions
Sourcepub fn on_delete_cascade(self) -> Self
pub fn on_delete_cascade(self) -> Self
ON DELETE CASCADE
Sourcepub fn on_delete_set_null(self) -> Self
pub fn on_delete_set_null(self) -> Self
ON DELETE SET NULL
Sourcepub fn on_delete_restrict(self) -> Self
pub fn on_delete_restrict(self) -> Self
ON DELETE RESTRICT
Sourcepub fn on_delete_no_action(self) -> Self
pub fn on_delete_no_action(self) -> Self
ON DELETE NO ACTION
Sourcepub fn on_update_cascade(self) -> Self
pub fn on_update_cascade(self) -> Self
ON UPDATE CASCADE
Trait Implementations§
Source§impl Clone for ForeignKeyOptions
impl Clone for ForeignKeyOptions
Source§fn clone(&self) -> ForeignKeyOptions
fn clone(&self) -> ForeignKeyOptions
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 ForeignKeyOptions
impl Debug for ForeignKeyOptions
Source§impl Default for ForeignKeyOptions
impl Default for ForeignKeyOptions
Source§fn default() -> ForeignKeyOptions
fn default() -> ForeignKeyOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ForeignKeyOptions
impl RefUnwindSafe for ForeignKeyOptions
impl Send for ForeignKeyOptions
impl Sync for ForeignKeyOptions
impl Unpin for ForeignKeyOptions
impl UnsafeUnpin for ForeignKeyOptions
impl UnwindSafe for ForeignKeyOptions
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