pub struct RelationDef {
pub field_name: String,
pub kind: RelationKind,
pub target_table: String,
pub join_columns: Vec<JoinColumn>,
pub through: Option<ThroughDef>,
}Expand description
A complete relation definition between two tables.
Fields§
§field_name: StringThe field name used in result structs (e.g. “posts”, “author”).
kind: RelationKindWhether this is a one-to-one/many-to-one or one-to-many relation.
target_table: StringThe target table name.
join_columns: Vec<JoinColumn>The join column pairs (local column -> foreign column).
through: Option<ThroughDef>For many-to-many: the junction table configuration.
Trait Implementations§
Source§impl Clone for RelationDef
impl Clone for RelationDef
Source§fn clone(&self) -> RelationDef
fn clone(&self) -> RelationDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RelationDef
impl Debug for RelationDef
impl Eq for RelationDef
Source§impl PartialEq for RelationDef
impl PartialEq for RelationDef
impl StructuralPartialEq for RelationDef
Auto Trait Implementations§
impl Freeze for RelationDef
impl RefUnwindSafe for RelationDef
impl Send for RelationDef
impl Sync for RelationDef
impl Unpin for RelationDef
impl UnsafeUnpin for RelationDef
impl UnwindSafe for RelationDef
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