Struct TableForeignKey
pub struct TableForeignKey { /* private fields */ }Expand description
Specification of a foreign key
Implementations§
§impl TableForeignKey
impl TableForeignKey
pub fn new() -> Self
pub fn new() -> Self
Construct a new foreign key
pub fn from_tbl<T>(&mut self, table: T) -> &mut Selfwhere
T: IntoTableRef,
pub fn from_tbl<T>(&mut self, table: T) -> &mut Selfwhere
T: IntoTableRef,
Set key table
pub fn to_tbl<R>(&mut self, ref_table: R) -> &mut Selfwhere
R: IntoTableRef,
pub fn to_tbl<R>(&mut self, ref_table: R) -> &mut Selfwhere
R: IntoTableRef,
Set referencing table
pub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut Self
pub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut Self
Set on delete action
pub fn on_update(&mut self, action: ForeignKeyAction) -> &mut Self
pub fn on_update(&mut self, action: ForeignKeyAction) -> &mut Self
Set on update action
pub fn get_name(&self) -> Option<&str>
pub fn get_table(&self) -> Option<&TableRef>
pub fn get_ref_table(&self) -> Option<&TableRef>
pub fn get_columns(&self) -> Vec<String>
pub fn get_ref_columns(&self) -> Vec<String>
pub fn get_on_delete(&self) -> Option<ForeignKeyAction>
pub fn get_on_update(&self) -> Option<ForeignKeyAction>
pub fn take(&mut self) -> Self
Trait Implementations§
§impl Clone for TableForeignKey
impl Clone for TableForeignKey
§fn clone(&self) -> TableForeignKey
fn clone(&self) -> TableForeignKey
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 more§impl Debug for TableForeignKey
impl Debug for TableForeignKey
§impl Default for TableForeignKey
impl Default for TableForeignKey
§fn default() -> TableForeignKey
fn default() -> TableForeignKey
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TableForeignKey
impl RefUnwindSafe for TableForeignKey
impl Send for TableForeignKey
impl Sync for TableForeignKey
impl Unpin for TableForeignKey
impl UnwindSafe for TableForeignKey
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