pub type LinkDef = RelationDef;Expand description
Same as RelationDef
Aliased Typeยง
pub struct LinkDef {
pub rel_type: RelationType,
pub from_tbl: TableRef,
pub to_tbl: TableRef,
pub from_col: Identity,
pub to_col: Identity,
pub is_owner: bool,
pub skip_fk: bool,
pub on_delete: Option<ForeignKeyAction>,
pub on_update: Option<ForeignKeyAction>,
pub on_condition: Option<Arc<dyn Fn(DynIden, DynIden) -> Condition>>,
pub fk_name: Option<String>,
pub condition_type: ConditionType,
}Fieldsยง
ยงrel_type: RelationTypeThe type of relationship defined in RelationType
from_tbl: TableRefReference from another Entity
to_tbl: TableRefReference to another Entity
from_col: IdentityReference to from a Column
to_col: IdentityReference to another column
is_owner: boolDefines the owner of the Relation
skip_fk: boolSpecifies if the foreign key should be skipped
on_delete: Option<ForeignKeyAction>Defines an operation to be performed on a Foreign Key when a
DELETE Operation is performed
on_update: Option<ForeignKeyAction>Defines an operation to be performed on a Foreign Key when a
UPDATE Operation is performed
on_condition: Option<Arc<dyn Fn(DynIden, DynIden) -> Condition>>Custom join ON condition
fk_name: Option<String>The name of foreign key constraint
condition_type: ConditionTypeCondition type of join on expression