Struct sea_orm::entity::RelationBuilder
source · [−]pub struct RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,{ /* private fields */ }
Expand description
Defines a helper to build a relation
Implementations
sourceimpl<E, R> RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
impl<E, R> RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
sourcepub fn from<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<E>,
pub fn from<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<E>,
Build a relationship from an Entity
sourcepub fn to<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<R>,
pub fn to<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<R>,
Build a relationship to an Entity
sourcepub fn on_delete(self, action: ForeignKeyAction) -> Self
pub fn on_delete(self, action: ForeignKeyAction) -> Self
An operation to perform on a foreign key when a delete operation occurs
sourcepub fn on_update(self, action: ForeignKeyAction) -> Self
pub fn on_update(self, action: ForeignKeyAction) -> Self
An operation to perform on a foreign key when an update operation occurs
Trait Implementations
sourceimpl<E, R> Debug for RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
impl<E, R> Debug for RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
sourceimpl<E, R> From<RelationBuilder<E, R>> for RelationDefwhere
E: EntityTrait,
R: EntityTrait,
impl<E, R> From<RelationBuilder<E, R>> for RelationDefwhere
E: EntityTrait,
R: EntityTrait,
sourcefn from(b: RelationBuilder<E, R>) -> Self
fn from(b: RelationBuilder<E, R>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<E, R> !RefUnwindSafe for RelationBuilder<E, R>
impl<E, R> Send for RelationBuilder<E, R>
impl<E, R> Sync for RelationBuilder<E, R>
impl<E, R> Unpin for RelationBuilder<E, R>where
E: Unpin,
R: Unpin,
impl<E, R> !UnwindSafe for RelationBuilder<E, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more