pub struct ForeignKey {
pub name: Option<String>,
pub columns: Vec<ColumnId>,
pub column_names: Vec<String>,
pub referenced_table: String,
pub referenced_columns: Vec<String>,
pub referenced_table_id: Option<TableId>,
}Expand description
Foreign key constraint definition
Fields§
§name: Option<String>Constraint name (optional)
columns: Vec<ColumnId>Column IDs in this table that form the FK
column_names: Vec<String>Column names in this table (before resolution)
referenced_table: StringReferenced table name
referenced_columns: Vec<String>Referenced column names
referenced_table_id: Option<TableId>Resolved referenced table ID (set after schema is complete)
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 · 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 From<&ForeignKey> for FkInfo
impl From<&ForeignKey> for FkInfo
Source§fn from(fk: &ForeignKey) -> Self
fn from(fk: &ForeignKey) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ForeignKey
impl RefUnwindSafe for ForeignKey
impl Send for ForeignKey
impl Sync for ForeignKey
impl Unpin 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