pub enum CachedPlan {
PkPointLookup(PkPointLookupPlan),
SimpleFastPath(SimpleFastPathPlan),
PkDelete(PkDeletePlan),
Standard,
}Expand description
Cached execution plan for a prepared statement
Variants§
PkPointLookup(PkPointLookupPlan)
Simple primary key point lookup SELECT [cols] FROM table WHERE pk_col = ? [AND pk_col2 = ? …]
SimpleFastPath(SimpleFastPathPlan)
Simple fast-path eligible query Caches the result of is_simple_point_query() check to avoid recomputing it on every execution.
PkDelete(PkDeletePlan)
Simple primary key DELETE DELETE FROM table WHERE pk_col = ? [AND pk_col2 = ? …]
Standard
Query doesn’t match any fast-path pattern Fall back to standard execution
Implementations§
Source§impl CachedPlan
impl CachedPlan
Sourcepub fn is_fast_path(&self) -> bool
pub fn is_fast_path(&self) -> bool
Check if this is a cacheable fast-path plan
Trait Implementations§
Source§impl Clone for CachedPlan
impl Clone for CachedPlan
Source§fn clone(&self) -> CachedPlan
fn clone(&self) -> CachedPlan
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 moreAuto Trait Implementations§
impl Freeze for CachedPlan
impl RefUnwindSafe for CachedPlan
impl Send for CachedPlan
impl Sync for CachedPlan
impl Unpin for CachedPlan
impl UnwindSafe for CachedPlan
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> 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