pub struct PlanExecutor { /* private fields */ }Expand description
Executes optimized query plans with parallel processing
Implementations§
Source§impl PlanExecutor
impl PlanExecutor
Sourcepub fn new(batch_loader: BatchLoader) -> Self
pub fn new(batch_loader: BatchLoader) -> Self
Create a new plan executor
Sourcepub fn with_config(
batch_loader: BatchLoader,
max_parallel_tasks: usize,
query_timeout: Duration,
) -> Self
pub fn with_config( batch_loader: BatchLoader, max_parallel_tasks: usize, query_timeout: Duration, ) -> Self
Create a plan executor with custom configuration
Sourcepub async fn execute_plan(
&self,
plan: &QueryPlan,
connection: &PgPool,
) -> OrmResult<ExecutionResult>
pub async fn execute_plan( &self, plan: &QueryPlan, connection: &PgPool, ) -> OrmResult<ExecutionResult>
Execute a query plan with optimized parallel processing
Sourcepub fn get_stats(&self) -> ExecutorStats
pub fn get_stats(&self) -> ExecutorStats
Get executor statistics
Sourcepub fn set_max_parallel_tasks(&mut self, max_tasks: usize)
pub fn set_max_parallel_tasks(&mut self, max_tasks: usize)
Update executor configuration
pub fn set_query_timeout(&mut self, timeout: Duration)
Auto Trait Implementations§
impl !RefUnwindSafe for PlanExecutor
impl !UnwindSafe for PlanExecutor
impl Freeze for PlanExecutor
impl Send for PlanExecutor
impl Sync for PlanExecutor
impl Unpin for PlanExecutor
impl UnsafeUnpin for PlanExecutor
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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