pub struct ForeignKeyMetadata {
pub name: &'static str,
pub columns: &'static [&'static str],
pub referenced_schema: &'static str,
pub referenced_table: &'static str,
pub referenced_columns: &'static [&'static str],
pub on_delete: ReferentialAction,
pub on_update: ReferentialAction,
}Expand description
Foreign key metadata attached to an entity.
Fields§
§name: &'static str§columns: &'static [&'static str]§referenced_schema: &'static str§referenced_table: &'static str§referenced_columns: &'static [&'static str]§on_delete: ReferentialAction§on_update: ReferentialActionImplementations§
Source§impl ForeignKeyMetadata
impl ForeignKeyMetadata
pub const fn new( name: &'static str, columns: &'static [&'static str], referenced_schema: &'static str, referenced_table: &'static str, referenced_columns: &'static [&'static str], on_delete: ReferentialAction, on_update: ReferentialAction, ) -> Self
pub fn references_table(&self, schema: &str, table: &str) -> bool
pub fn includes_column(&self, column_name: &str) -> bool
Trait Implementations§
Source§impl Clone for ForeignKeyMetadata
impl Clone for ForeignKeyMetadata
Source§fn clone(&self) -> ForeignKeyMetadata
fn clone(&self) -> ForeignKeyMetadata
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 ForeignKeyMetadata
impl Debug for ForeignKeyMetadata
Source§impl PartialEq for ForeignKeyMetadata
impl PartialEq for ForeignKeyMetadata
Source§fn eq(&self, other: &ForeignKeyMetadata) -> bool
fn eq(&self, other: &ForeignKeyMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ForeignKeyMetadata
impl Eq for ForeignKeyMetadata
impl StructuralPartialEq for ForeignKeyMetadata
Auto Trait Implementations§
impl Freeze for ForeignKeyMetadata
impl RefUnwindSafe for ForeignKeyMetadata
impl Send for ForeignKeyMetadata
impl Sync for ForeignKeyMetadata
impl Unpin for ForeignKeyMetadata
impl UnsafeUnpin for ForeignKeyMetadata
impl UnwindSafe for ForeignKeyMetadata
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