pub struct ForeignKey {Show 17 fields
pub referenced_index: Option<[u8; 16]>,
pub referenced_key: Option<String>,
pub name: Option<String>,
pub object_id: Option<[u8; 16]>,
pub catalog_identity: Option<ConstraintCatalogIdentity>,
pub local_columns: Vec<String>,
pub ref_table: String,
pub ref_columns: Vec<String>,
pub on_update: ForeignKeyAction,
pub on_delete: ForeignKeyAction,
pub on_delete_set_columns: Vec<String>,
pub match_type: ForeignKeyMatch,
pub enforced: bool,
pub validated: bool,
pub deferrable: bool,
pub initially_deferred: bool,
pub period: bool,
}Expand description
Table-level foreign key. Compilation preserves an omitted referenced column list as empty; validation fills it from the primary key before publication.
Fields§
§referenced_index: Option<[u8; 16]>Incarnation of the selected unique index, retained across index and constraint renames.
referenced_key: Option<String>Name of the selected unique index in the referenced relation namespace.
name: Option<String>§object_id: Option<[u8; 16]>Logical foreign-key identity shared by a partition family for enforcement and deferred events.
catalog_identity: Option<ConstraintCatalogIdentity>Independent catalog row lifetime and OID, preserved through renames and distinct in each partition.
local_columns: Vec<String>§ref_table: String§ref_columns: Vec<String>§on_update: ForeignKeyAction§on_delete: ForeignKeyAction§on_delete_set_columns: Vec<String>Optional column subset for ON DELETE SET NULL (...) and
ON DELETE SET DEFAULT (...). Empty means every local FK
column participates.
match_type: ForeignKeyMatch§enforced: bool§validated: bool§deferrable: bool§initially_deferred: bool§period: boolThe final local and referenced columns use PostgreSQL PERIOD coverage.
Trait Implementations§
Source§impl Clone for ForeignKey
impl Clone for ForeignKey
Source§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
impl Eq for ForeignKey
Source§impl PartialEq for ForeignKey
impl PartialEq for ForeignKey
Source§impl Serialize for ForeignKey
impl Serialize 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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