pub struct Entity;Expand description
Generated by sea-orm-macros
Implementations§
Trait Implementations§
Source§impl EntityLoaderTrait<Entity> for EntityLoader
impl EntityLoaderTrait<Entity> for EntityLoader
Source§fn filter_by_id<T>(self, values: T) -> Self
fn filter_by_id<T>(self, values: T) -> Self
Find a model by primary key
Source§fn order_by_id_asc(self) -> Self
fn order_by_id_asc(self) -> Self
Apply order by primary key to the query statement
Source§fn order_by_id_desc(self) -> Self
fn order_by_id_desc(self) -> Self
Apply order by primary key to the query statement
Source§fn order_by_id(self, order: Order) -> Self
fn order_by_id(self, order: Order) -> Self
Apply order by primary key to the query statement
Source§fn paginate<'db, C>(
self,
db: &'db C,
page_size: u64,
) -> EntityLoaderPaginator<'db, C, E, Self>where
C: ConnectionTrait,
fn paginate<'db, C>(
self,
db: &'db C,
page_size: u64,
) -> EntityLoaderPaginator<'db, C, E, Self>where
C: ConnectionTrait,
Paginate query.
Source§impl EntityName for Entity
impl EntityName for Entity
Source§fn schema_name(&self) -> Option<&str>
fn schema_name(&self) -> Option<&str>
Method to get the name for the schema, defaults to Option::None if not set
Source§fn table_name(&self) -> &'static str
fn table_name(&self) -> &'static str
Get the name of the table
Source§impl EntityTrait for Entity
impl EntityTrait for Entity
type Model = Model
type ModelEx = ModelEx
type ActiveModel = ActiveModel
type ActiveModelEx = ActiveModelEx
type Column = Column
type PrimaryKey = PrimaryKey
type Relation = Relation
Source§fn belongs_to<R>(related: R) -> RelationBuilder<Self, R>where
R: EntityTrait,
fn belongs_to<R>(related: R) -> RelationBuilder<Self, R>where
R: EntityTrait,
Construct a belongs to relation, where this table has a foreign key to
another table.
Source§fn has_one<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
fn has_one<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
Construct a has one relation
Source§fn has_many<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
fn has_many<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
Construct a has many relation
Source§fn has_many_via<R, T>(_: R, rel: T) -> RelationBuilder<Self, R>where
R: EntityTrait,
T: RelationTrait,
fn has_many_via<R, T>(_: R, rel: T) -> RelationBuilder<Self, R>where
R: EntityTrait,
T: RelationTrait,
Construct a has many relation, with the Relation provided.
This is for the case where
Related<Self> is not possible.Source§fn find_by_id<T>(values: T) -> Select<Self>
fn find_by_id<T>(values: T) -> Select<Self>
Find a model by primary key Read more
Source§fn primary_key_identity() -> Identity
fn primary_key_identity() -> Identity
Get primary key as Identity
Source§fn insert<A>(model: A) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
fn insert<A>(model: A) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
Insert a model into database Read more
Source§fn insert_many<A, I>(models: I) -> InsertMany<A>where
A: ActiveModelTrait<Entity = Self>,
I: IntoIterator<Item = A>,
fn insert_many<A, I>(models: I) -> InsertMany<A>where
A: ActiveModelTrait<Entity = Self>,
I: IntoIterator<Item = A>,
Insert many models into database Read more
Source§fn update<A>(model: A) -> UpdateOne<A>where
A: ActiveModelTrait<Entity = Self>,
fn update<A>(model: A) -> UpdateOne<A>where
A: ActiveModelTrait<Entity = Self>,
Update a model in database Read more
Source§fn update_many() -> UpdateMany<Self>
fn update_many() -> UpdateMany<Self>
Update many models in database Read more
Source§fn delete<A>(model: A) -> DeleteOne<Self>where
A: ActiveModelTrait<Entity = Self>,
fn delete<A>(model: A) -> DeleteOne<Self>where
A: ActiveModelTrait<Entity = Self>,
Delete a model from database Read more
Source§fn delete_many() -> DeleteMany<Self>
fn delete_many() -> DeleteMany<Self>
Delete many models from database Read more
Source§fn delete_by_id<T>(values: T) -> ValidatedDeleteOne<Self>
fn delete_by_id<T>(values: T) -> ValidatedDeleteOne<Self>
Delete a model based on primary key Read more
Source§impl Iden for Entity
impl Iden for Entity
Source§impl IdenStatic for Entity
impl IdenStatic for Entity
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
Source§impl Related<Entity> for Entity
Generated by sea-orm-macros
impl Related<Entity> for Entity
Generated by sea-orm-macros
Source§fn to() -> RelationDef
fn to() -> RelationDef
The RelationDef to the related Entity
Source§fn via() -> Option<RelationDef>
fn via() -> Option<RelationDef>
The RelationDef to the junction table, if any
Find related Entities
impl Copy for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
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<R> EntityLoaderWithParam for R
impl<R> EntityLoaderWithParam for R
Source§fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
Generated by sea-orm-macros
Source§impl<R> EntityLoaderWithParam for R
impl<R> EntityLoaderWithParam for R
Source§fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
Generated by sea-orm-macros
Source§impl<R> EntityLoaderWithParam for R
impl<R> EntityLoaderWithParam for R
Source§fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
Generated by sea-orm-macros
Source§impl<R> EntityLoaderWithParam for R
impl<R> EntityLoaderWithParam for R
Source§fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
Generated by sea-orm-macros
Source§impl<R> EntityLoaderWithParam for R
impl<R> EntityLoaderWithParam for R
Source§fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
fn into_with_param(self) -> (LoadTarget, Option<LoadTarget>)
Generated by sea-orm-macros
Source§impl<E> EntityOrSelect<E> for Ewhere
E: EntityTrait,
impl<E> EntityOrSelect<E> for Ewhere
E: EntityTrait,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoColumnRef for T
impl<T> IntoColumnRef for T
fn into_column_ref(self) -> ColumnRef
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoIdentity for Twhere
T: IdenStatic,
impl<T> IntoIdentity for Twhere
T: IdenStatic,
Source§fn into_identity(self) -> Identity
fn into_identity(self) -> Identity
Method to perform the conversion