Enum psl::datamodel_connector::RelationMode
source · #[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
§type Output = BitFlags<RelationMode>
type Output = BitFlags<RelationMode>
The resulting type after applying the
&
operator.source§fn bitand(self, other: RelationMode) -> <RelationMode as BitAnd>::Output
fn bitand(self, other: RelationMode) -> <RelationMode as BitAnd>::Output
Performs the
&
operation. Read moresource§impl BitFlag for RelationMode
impl BitFlag for RelationMode
source§impl BitOr for RelationMode
impl BitOr for RelationMode
§type Output = BitFlags<RelationMode>
type Output = BitFlags<RelationMode>
The resulting type after applying the
|
operator.source§fn bitor(self, other: RelationMode) -> <RelationMode as BitOr>::Output
fn bitor(self, other: RelationMode) -> <RelationMode as BitOr>::Output
Performs the
|
operation. Read moresource§impl BitXor for RelationMode
impl BitXor for RelationMode
§type Output = BitFlags<RelationMode>
type Output = BitFlags<RelationMode>
The resulting type after applying the
^
operator.source§fn bitxor(self, other: RelationMode) -> <RelationMode as BitXor>::Output
fn bitxor(self, other: RelationMode) -> <RelationMode as BitXor>::Output
Performs the
^
operation. Read moresource§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§fn default() -> RelationMode
fn default() -> RelationMode
Returns the “default value” for a type. Read more
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 ==
.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