pub struct ForeignKey {
pub columns: Vec<Identifier>,
pub referenced_table: QualifiedName,
pub referenced_columns: Vec<Identifier>,
pub on_update: ReferentialAction,
pub on_delete: ReferentialAction,
pub match_type: FkMatchType,
}Expand description
FOREIGN KEY ... REFERENCES ... definition.
Fields§
§columns: Vec<Identifier>Local columns; order matches referenced_columns.
referenced_table: QualifiedNameReferenced table.
referenced_columns: Vec<Identifier>Referenced columns; order matches columns.
on_update: ReferentialActionAction on update.
on_delete: ReferentialActionAction on delete.
match_type: FkMatchTypeMatch type.
Trait Implementations§
Source§impl Clone for ForeignKey
impl Clone for ForeignKey
Source§fn clone(&self) -> ForeignKey
fn clone(&self) -> ForeignKey
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 ForeignKey
impl Debug for ForeignKey
Source§impl<'de> Deserialize<'de> for ForeignKey
impl<'de> Deserialize<'de> for ForeignKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Diff for ForeignKey
impl Diff for ForeignKey
Source§fn diff(&self, other: &Self) -> Vec<Difference>
fn diff(&self, other: &Self) -> Vec<Difference>
List the differences between
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
Convenience:
true iff self.diff(other).is_empty().Source§impl PartialEq for ForeignKey
impl PartialEq for ForeignKey
Source§fn eq(&self, other: &ForeignKey) -> bool
fn eq(&self, other: &ForeignKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ForeignKey
impl Serialize for ForeignKey
impl Eq for ForeignKey
impl StructuralPartialEq for ForeignKey
Auto Trait Implementations§
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more