pub struct EntityLoader { /* private fields */ }Expand description
Generated by sea-orm-macros
Implementations§
Source§impl EntityLoader
impl EntityLoader
Sourcepub async fn one<C: ConnectionTrait>(
self,
db: &C,
) -> Result<Option<ModelEx>, DbErr>
pub async fn one<C: ConnectionTrait>( self, db: &C, ) -> Result<Option<ModelEx>, DbErr>
Generated by sea-orm-macros
Sourcepub async fn all<C: ConnectionTrait>(
self,
db: &C,
) -> Result<Vec<ModelEx>, DbErr>
pub async fn all<C: ConnectionTrait>( self, db: &C, ) -> Result<Vec<ModelEx>, DbErr>
Generated by sea-orm-macros
Sourcepub fn with<T: EntityLoaderWithParam>(self, param: T) -> Self
pub fn with<T: EntityLoaderWithParam>(self, param: T) -> Self
Generated by sea-orm-macros
Sourcepub async fn load<C: ConnectionTrait>(
models: Vec<ModelEx>,
with: &EntityLoaderWith,
nest: &EntityLoaderNest,
db: &C,
) -> Result<Vec<ModelEx>, DbErr>
pub async fn load<C: ConnectionTrait>( models: Vec<ModelEx>, with: &EntityLoaderWith, nest: &EntityLoaderNest, db: &C, ) -> Result<Vec<ModelEx>, DbErr>
Generated by sea-orm-macros
Sourcepub async fn load_nest<C: ConnectionTrait>(
models: Vec<Option<ModelEx>>,
with: &EntityLoaderWith,
db: &C,
) -> Result<Vec<Option<ModelEx>>, DbErr>
pub async fn load_nest<C: ConnectionTrait>( models: Vec<Option<ModelEx>>, with: &EntityLoaderWith, db: &C, ) -> Result<Vec<Option<ModelEx>>, DbErr>
Generated by sea-orm-macros
Sourcepub async fn load_nest_nest<C: ConnectionTrait>(
models: Vec<Vec<ModelEx>>,
with: &EntityLoaderWith,
db: &C,
) -> Result<Vec<Vec<ModelEx>>, DbErr>
pub async fn load_nest_nest<C: ConnectionTrait>( models: Vec<Vec<ModelEx>>, with: &EntityLoaderWith, db: &C, ) -> Result<Vec<Vec<ModelEx>>, DbErr>
Generated by sea-orm-macros
Trait Implementations§
Source§impl Clone for EntityLoader
impl Clone for EntityLoader
Source§fn clone(&self) -> EntityLoader
fn clone(&self) -> EntityLoader
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 EntityLoader
impl Debug for EntityLoader
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 QueryFilter for EntityLoader
impl QueryFilter for EntityLoader
type QueryStatement = <Select<Entity> as QueryFilter>::QueryStatement
Source§fn query(&mut self) -> &mut Self::QueryStatement
fn query(&mut self) -> &mut Self::QueryStatement
Add the query to perform a FILTER on
Source§fn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
fn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
Add an AND WHERE expression Read more
Source§fn filter_mut<F>(&mut self, filter: F)where
F: IntoCondition,
fn filter_mut<F>(&mut self, filter: F)where
F: IntoCondition,
Like
Self::filter, but without consuming selfSource§fn belongs_to<M>(self, model: &M) -> Selfwhere
M: ModelTrait,
fn belongs_to<M>(self, model: &M) -> Selfwhere
M: ModelTrait,
Apply a where condition using the model’s primary key Read more
Source§fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Selfwhere
M: ModelTrait,
fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Selfwhere
M: ModelTrait,
Like
belongs_to, but via a table alias Read moreSource§impl QueryOrder for EntityLoader
impl QueryOrder for EntityLoader
type QueryStatement = <Select<Entity> as QueryOrder>::QueryStatement
Source§fn query(&mut self) -> &mut Self::QueryStatement
fn query(&mut self) -> &mut Self::QueryStatement
Add the query to perform an ORDER BY operation
Source§fn order_by<C>(self, col: C, ord: Order) -> Selfwhere
C: IntoSimpleExpr,
fn order_by<C>(self, col: C, ord: Order) -> Selfwhere
C: IntoSimpleExpr,
Add an order_by expression Read more
Source§fn order_by_asc<C>(self, col: C) -> Selfwhere
C: IntoSimpleExpr,
fn order_by_asc<C>(self, col: C) -> Selfwhere
C: IntoSimpleExpr,
Add an order_by expression (ascending) Read more
Source§fn order_by_desc<C>(self, col: C) -> Selfwhere
C: IntoSimpleExpr,
fn order_by_desc<C>(self, col: C) -> Selfwhere
C: IntoSimpleExpr,
Add an order_by expression (descending) Read more
Source§fn order_by_with_nulls<C>(self, col: C, ord: Order, nulls: NullOrdering) -> Selfwhere
C: IntoSimpleExpr,
fn order_by_with_nulls<C>(self, col: C, ord: Order, nulls: NullOrdering) -> Selfwhere
C: IntoSimpleExpr,
Add an order_by expression with nulls ordering option Read more
Auto Trait Implementations§
impl Freeze for EntityLoader
impl RefUnwindSafe for EntityLoader
impl Send for EntityLoader
impl Sync for EntityLoader
impl Unpin for EntityLoader
impl UnwindSafe for EntityLoader
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<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> 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 more