Struct sea_query::foreign_key::TableForeignKey
source ยท pub struct TableForeignKey { /* private fields */ }
Expand description
Specification of a foreign key
Implementationsยง
sourceยงimpl TableForeignKey
impl TableForeignKey
sourcepub 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
sourcepub 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
sourcepub fn to_col<R>(&mut self, ref_column: R) -> &mut Selfwhere
R: IntoIden,
pub fn to_col<R>(&mut self, ref_column: R) -> &mut Selfwhere R: IntoIden,
Add referencing column
sourcepub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut Self
pub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut Self
Set on delete action
sourcepub 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_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ยง
sourceยงimpl Clone for TableForeignKey
impl Clone for TableForeignKey
sourceยงfn clone(&self) -> TableForeignKey
fn clone(&self) -> TableForeignKey
Returns a copy 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 TableForeignKey
impl Debug for TableForeignKey
sourceยงimpl Default for TableForeignKey
impl Default for TableForeignKey
sourceยงfn default() -> TableForeignKey
fn default() -> TableForeignKey
Returns the โdefault valueโ for a type. Read more