pub struct ForeignKey {
pub name: String,
pub columns: Vec<String>,
pub references_table: String,
pub references_columns: Vec<String>,
pub on_delete: Option<ReferentialAction>,
pub on_update: Option<ReferentialAction>,
}Fields§
§name: String§columns: Vec<String>§references_table: String§references_columns: Vec<String>§on_delete: Option<ReferentialAction>§on_update: Option<ReferentialAction>Implementations§
Source§impl ForeignKey
impl ForeignKey
pub fn new( name: impl Into<String>, columns: &[&str], references_table: impl Into<String>, references_columns: &[&str], on_delete: Option<ReferentialAction>, on_update: Option<ReferentialAction>, ) -> TableConstraint
pub fn name_of(entity: &str, naming: &StatementNaming, parts: &[&str]) -> String
Trait Implementations§
Source§impl Clone for ForeignKey
impl Clone for ForeignKey
Source§impl Debug for ForeignKey
impl Debug for ForeignKey
impl Eq for ForeignKey
Source§impl PartialEq for ForeignKey
impl PartialEq for ForeignKey
impl StructuralPartialEq for ForeignKey
Auto Trait Implementations§
impl Forget for ForeignKey
impl Freeze for ForeignKey
impl RefUnwindSafe for ForeignKey
impl Send for ForeignKey
impl Sync for ForeignKey
impl Unpin for ForeignKey
impl UnsafeUnpin for ForeignKey
impl UnwindSafe for ForeignKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.