pub enum RelationshipResolution {
Auto,
AlwaysAssociative,
AlwaysMerge,
}Expand description
How to resolve a relationship into tables/foreign keys.
Variants§
Auto
Decide automatically from cardinalities. This is the default.
(1,1) ↔ (1,1)→ merge tables(0..=1, 1) ↔ many→ FK on the many side, NULL if the many side has minimum 0(many) ↔ (many)→ associative table
AlwaysAssociative
Always emit an associative (junction) table, even for 1:1 / 1:N.
AlwaysMerge
Always merge the two tables. Only valid for 1:1; ignored otherwise.
Trait Implementations§
Source§impl Clone for RelationshipResolution
impl Clone for RelationshipResolution
Source§fn clone(&self) -> RelationshipResolution
fn clone(&self) -> RelationshipResolution
Returns a duplicate 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 RelationshipResolution
impl Debug for RelationshipResolution
Source§impl Default for RelationshipResolution
impl Default for RelationshipResolution
Source§fn default() -> RelationshipResolution
fn default() -> RelationshipResolution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RelationshipResolution
impl<'de> Deserialize<'de> for RelationshipResolution
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
Source§impl Hash for RelationshipResolution
impl Hash for RelationshipResolution
Source§impl PartialEq for RelationshipResolution
impl PartialEq for RelationshipResolution
Source§impl Serialize for RelationshipResolution
impl Serialize for RelationshipResolution
impl Copy for RelationshipResolution
impl Eq for RelationshipResolution
impl StructuralPartialEq for RelationshipResolution
Auto Trait Implementations§
impl Freeze for RelationshipResolution
impl RefUnwindSafe for RelationshipResolution
impl Send for RelationshipResolution
impl Sync for RelationshipResolution
impl Unpin for RelationshipResolution
impl UnsafeUnpin for RelationshipResolution
impl UnwindSafe for RelationshipResolution
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.