pub enum DeclaredForeignKey {
Column(usize),
Table(usize),
}Expand description
A foreign key of a declaration, by the catalog row it publishes.
Variants§
Implementations§
Source§impl DeclaredForeignKey
impl DeclaredForeignKey
Sourcepub fn by_catalog_identity(
columns: &[ColumnDef],
constraints: &TableConstraintSet,
identity: ConstraintCatalogIdentity,
) -> Option<Self>
pub fn by_catalog_identity( columns: &[ColumnDef], constraints: &TableConstraintSet, identity: ConstraintCatalogIdentity, ) -> Option<Self>
The foreign key of the declaration whose catalog row is identity.
Sourcepub fn by_family(
columns: &[ColumnDef],
constraints: &TableConstraintSet,
object_id: [u8; 16],
) -> Option<Self>
pub fn by_family( columns: &[ColumnDef], constraints: &TableConstraintSet, object_id: [u8; 16], ) -> Option<Self>
The foreign key of the declaration that belongs to the family object_id.
Sourcepub fn foreign_key(
self,
columns: &[ColumnDef],
constraints: &TableConstraintSet,
) -> Option<ForeignKey>
pub fn foreign_key( self, columns: &[ColumnDef], constraints: &TableConstraintSet, ) -> Option<ForeignKey>
The foreign key with its stored targets, as a table-level declaration.
pub fn validated( self, columns: &[ColumnDef], constraints: &TableConstraintSet, ) -> bool
pub fn set_validated( self, columns: &mut [ColumnDef], constraints: &mut TableConstraintSet, validated: bool, )
Sourcepub fn alter(
self,
columns: &mut [ColumnDef],
constraints: &mut TableConstraintSet,
enforceability: Option<bool>,
deferrability: Option<(bool, bool)>,
) -> bool
pub fn alter( self, columns: &mut [ColumnDef], constraints: &mut TableConstraintSet, enforceability: Option<bool>, deferrability: Option<(bool, bool)>, ) -> bool
Apply an ALTER CONSTRAINT enforceability and deferrability change. A foreign key that stops being enforced is no longer valid, and one that becomes enforced is not valid until its rows are validated; reports whether it became enforced.
pub fn set_family( self, columns: &mut [ColumnDef], constraints: &mut TableConstraintSet, object_id: [u8; 16], )
Trait Implementations§
Source§impl Clone for DeclaredForeignKey
impl Clone for DeclaredForeignKey
impl Copy for DeclaredForeignKey
Source§impl Debug for DeclaredForeignKey
impl Debug for DeclaredForeignKey
impl Eq for DeclaredForeignKey
Source§impl PartialEq for DeclaredForeignKey
impl PartialEq for DeclaredForeignKey
impl StructuralPartialEq for DeclaredForeignKey
Auto Trait Implementations§
impl Freeze for DeclaredForeignKey
impl RefUnwindSafe for DeclaredForeignKey
impl Send for DeclaredForeignKey
impl Sync for DeclaredForeignKey
impl Unpin for DeclaredForeignKey
impl UnsafeUnpin for DeclaredForeignKey
impl UnwindSafe for DeclaredForeignKey
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> 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