pub struct ForeignKeyConstraint {
pub name: Option<Ident>,
pub index_name: Option<Ident>,
pub columns: Vec<Ident>,
pub foreign_table: ObjectName,
pub referred_columns: Vec<Ident>,
pub on_delete: Option<ReferentialAction>,
pub on_update: Option<ReferentialAction>,
pub match_kind: Option<ConstraintReferenceMatchKind>,
pub characteristics: Option<ConstraintCharacteristics>,
}Expand description
A referential integrity constraint ([ CONSTRAINT <name> ] FOREIGN KEY (<columns>) REFERENCES <foreign_table> (<referred_columns>) [ MATCH { FULL | PARTIAL | SIMPLE } ] { [ON DELETE <referential_action>] [ON UPDATE <referential_action>] | [ON UPDATE <referential_action>] [ON DELETE <referential_action>] }).
Fields§
§name: Option<Ident>§index_name: Option<Ident>MySQL-specific field https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign-keys.html
columns: Vec<Ident>§foreign_table: ObjectName§referred_columns: Vec<Ident>§on_delete: Option<ReferentialAction>§on_update: Option<ReferentialAction>§match_kind: Option<ConstraintReferenceMatchKind>§characteristics: Option<ConstraintCharacteristics>Trait Implementations§
Source§impl Clone for ForeignKeyConstraint
impl Clone for ForeignKeyConstraint
Source§fn clone(&self) -> ForeignKeyConstraint
fn clone(&self) -> ForeignKeyConstraint
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 moreSource§impl Debug for ForeignKeyConstraint
impl Debug for ForeignKeyConstraint
Source§impl<'de> Deserialize<'de> for ForeignKeyConstraint
impl<'de> Deserialize<'de> for ForeignKeyConstraint
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 Display for ForeignKeyConstraint
impl Display for ForeignKeyConstraint
Source§impl From<ForeignKeyConstraint> for ColumnOption
impl From<ForeignKeyConstraint> for ColumnOption
Source§fn from(fk: ForeignKeyConstraint) -> Self
fn from(fk: ForeignKeyConstraint) -> Self
Converts to this type from the input type.
Source§impl From<ForeignKeyConstraint> for TableConstraint
impl From<ForeignKeyConstraint> for TableConstraint
Source§fn from(constraint: ForeignKeyConstraint) -> Self
fn from(constraint: ForeignKeyConstraint) -> Self
Converts to this type from the input type.
Source§impl Hash for ForeignKeyConstraint
impl Hash for ForeignKeyConstraint
Source§impl Ord for ForeignKeyConstraint
impl Ord for ForeignKeyConstraint
Source§fn cmp(&self, other: &ForeignKeyConstraint) -> Ordering
fn cmp(&self, other: &ForeignKeyConstraint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ForeignKeyConstraint
impl PartialEq for ForeignKeyConstraint
Source§impl PartialOrd for ForeignKeyConstraint
impl PartialOrd for ForeignKeyConstraint
Source§impl Serialize for ForeignKeyConstraint
impl Serialize for ForeignKeyConstraint
Source§impl Spanned for ForeignKeyConstraint
impl Spanned for ForeignKeyConstraint
Source§impl Visit for ForeignKeyConstraint
impl Visit for ForeignKeyConstraint
Source§impl VisitMut for ForeignKeyConstraint
impl VisitMut for ForeignKeyConstraint
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
impl Eq for ForeignKeyConstraint
impl StructuralPartialEq for ForeignKeyConstraint
Auto Trait Implementations§
impl Freeze for ForeignKeyConstraint
impl RefUnwindSafe for ForeignKeyConstraint
impl Send for ForeignKeyConstraint
impl Sync for ForeignKeyConstraint
impl Unpin for ForeignKeyConstraint
impl UnwindSafe for ForeignKeyConstraint
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