Struct sea_orm_migration::prelude::TableForeignKey
[−]pub struct TableForeignKey { /* private fields */ }
Expand description
Specification of a foreign key
Implementations
impl TableForeignKey
impl TableForeignKey
pub fn new() -> TableForeignKey
pub fn new() -> TableForeignKey
Construct a new foreign key
pub fn name(&mut self, name: &str) -> &mut TableForeignKey
pub fn name(&mut self, name: &str) -> &mut TableForeignKey
Set foreign key name
pub fn from_tbl<T>(&mut self, table: T) -> &mut TableForeignKey where
T: IntoIden,
pub fn from_tbl<T>(&mut self, table: T) -> &mut TableForeignKey where
T: IntoIden,
Set key table
pub fn to_tbl<R>(&mut self, ref_table: R) -> &mut TableForeignKey where
R: IntoIden,
pub fn to_tbl<R>(&mut self, ref_table: R) -> &mut TableForeignKey where
R: IntoIden,
Set referencing table
pub fn from_col<T>(&mut self, column: T) -> &mut TableForeignKey where
T: IntoIden,
pub fn from_col<T>(&mut self, column: T) -> &mut TableForeignKey where
T: IntoIden,
Add key column
pub fn to_col<R>(&mut self, ref_column: R) -> &mut TableForeignKey where
R: IntoIden,
pub fn to_col<R>(&mut self, ref_column: R) -> &mut TableForeignKey where
R: IntoIden,
Add referencing column
pub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut TableForeignKey
pub fn on_delete(&mut self, action: ForeignKeyAction) -> &mut TableForeignKey
Set on delete action
pub fn on_update(&mut self, action: ForeignKeyAction) -> &mut TableForeignKey
pub fn on_update(&mut self, action: ForeignKeyAction) -> &mut TableForeignKey
Set on update action
pub fn get_ref_table(&self) -> Option<String>
pub fn get_columns(&self) -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_ref_columns(&self) -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_on_delete(&self) -> Option<ForeignKeyAction>
pub fn get_on_update(&self) -> Option<ForeignKeyAction>
pub fn take(&mut self) -> TableForeignKey
Trait Implementations
impl Clone for TableForeignKey
impl Clone for TableForeignKey
fn clone(&self) -> TableForeignKey
fn clone(&self) -> TableForeignKey
Returns a copy of the value. Read more
1.0.0 · sourcefn 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 !RefUnwindSafe for TableForeignKey
impl Send for TableForeignKey
impl Sync for TableForeignKey
impl Unpin for TableForeignKey
impl !UnwindSafe for TableForeignKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more