#[repr(u8)]pub enum RelationMode {
ForeignKeys = 1,
Prisma = 2,
}
Expand description
Defines the part of the stack where referential actions are handled.
Variants§
ForeignKeys = 1
Enforced in the database. Needs support from the underlying database server.
Prisma = 2
Enforced in Prisma. Slower, but for databases that do not support foreign keys.
Implementations§
source§impl RelationMode
impl RelationMode
pub fn allowed_emulated_referential_actions_default( ) -> BitFlags<ReferentialAction>
pub fn is_prisma(&self) -> bool
sourcepub fn uses_foreign_keys(&self) -> bool
pub fn uses_foreign_keys(&self) -> bool
True, if integrity is in database foreign keys
Trait Implementations§
source§impl BitAnd for RelationMode
impl BitAnd for RelationMode
source§impl BitFlag for RelationMode
impl BitFlag for RelationMode
source§impl BitOr for RelationMode
impl BitOr for RelationMode
source§impl BitXor for RelationMode
impl BitXor for RelationMode
source§impl Clone for RelationMode
impl Clone for RelationMode
source§fn clone(&self) -> RelationMode
fn clone(&self) -> RelationMode
Returns a copy 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 RelationMode
impl Debug for RelationMode
source§impl Default for RelationMode
impl Default for RelationMode
source§impl Display for RelationMode
impl Display for RelationMode
source§impl Not for RelationMode
impl Not for RelationMode
source§impl PartialEq for RelationMode
impl PartialEq for RelationMode
source§fn eq(&self, other: &RelationMode) -> bool
fn eq(&self, other: &RelationMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RawBitFlags for RelationMode
impl RawBitFlags for RelationMode
source§const EMPTY: Self::Numeric = {transmute(0x00): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
const EMPTY: Self::Numeric = {transmute(0x00): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
A value with no bits set.
source§const DEFAULT: Self::Numeric = {transmute(0x00): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
const DEFAULT: Self::Numeric = {transmute(0x00): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
The value used by the Default implementation. Equivalent to EMPTY, unless
customized.
source§const ALL_BITS: Self::Numeric = {transmute(0x03): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
const ALL_BITS: Self::Numeric = {transmute(0x03): <datamodel_connector::relation_mode::RelationMode as enumflags2::_internal::RawBitFlags>::Numeric}
A value with all flag bits set.
source§const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<RelationMode>"
const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<RelationMode>"
The name of the type for debug formatting purposes. Read more
impl Copy for RelationMode
impl StructuralPartialEq for RelationMode
Auto Trait Implementations§
impl RefUnwindSafe for RelationMode
impl Send for RelationMode
impl Sync for RelationMode
impl Unpin for RelationMode
impl UnwindSafe for RelationMode
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