pub struct OptimizedEagerLoader { /* private fields */ }Expand description
Optimized eager loader for relationship loading with advanced optimization strategies
Implementations§
Source§impl OptimizedEagerLoader
impl OptimizedEagerLoader
Sourcepub fn with_config(config: EagerLoadConfig, batch_loader: BatchLoader) -> Self
pub fn with_config(config: EagerLoadConfig, batch_loader: BatchLoader) -> Self
Create an optimized eager loader with custom configuration
Sourcepub async fn load_with_relationships(
&mut self,
root_table: &str,
root_ids: Vec<JsonValue>,
relationships: &str,
connection: &PgPool,
) -> OrmResult<EagerLoadResult>
pub async fn load_with_relationships( &mut self, root_table: &str, root_ids: Vec<JsonValue>, relationships: &str, connection: &PgPool, ) -> OrmResult<EagerLoadResult>
Load relationships eagerly with optimization
Sourcepub async fn load_with_strategy(
&mut self,
root_table: &str,
root_ids: Vec<JsonValue>,
relationships: &str,
strategy: OptimizationStrategy,
connection: &PgPool,
) -> OrmResult<EagerLoadResult>
pub async fn load_with_strategy( &mut self, root_table: &str, root_ids: Vec<JsonValue>, relationships: &str, strategy: OptimizationStrategy, connection: &PgPool, ) -> OrmResult<EagerLoadResult>
Load with a specific optimization strategy
Sourcepub fn config(&self) -> &EagerLoadConfig
pub fn config(&self) -> &EagerLoadConfig
Get loader configuration
Sourcepub fn update_config(&mut self, config: EagerLoadConfig)
pub fn update_config(&mut self, config: EagerLoadConfig)
Update configuration
Sourcepub async fn clear_caches(&self)
pub async fn clear_caches(&self)
Clear all caches
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptimizedEagerLoader
impl !RefUnwindSafe for OptimizedEagerLoader
impl Send for OptimizedEagerLoader
impl Sync for OptimizedEagerLoader
impl Unpin for OptimizedEagerLoader
impl !UnwindSafe for OptimizedEagerLoader
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> 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