pub struct PkPointLookupPlan {
pub table_name: String,
pub pk_columns: Vec<String>,
pub param_to_pk_col: Vec<(usize, usize)>,
pub projection: ProjectionPlan,
/* private fields */
}Expand description
Cached plan for primary key point lookup queries
Fields§
§table_name: StringTable name (normalized to uppercase for case-insensitive matching)
pk_columns: Vec<String>Primary key column names in order
param_to_pk_col: Vec<(usize, usize)>Mapping from parameter index (0-based) to PK column index
e.g., for WHERE pk1 = ? AND pk2 = ?, this would be [(0, 0), (1, 1)]
projection: ProjectionPlanProjection type
Implementations§
Source§impl PkPointLookupPlan
impl PkPointLookupPlan
Sourcepub fn get_or_resolve<F>(&self, resolver: F) -> Option<&ResolvedProjection>
pub fn get_or_resolve<F>(&self, resolver: F) -> Option<&ResolvedProjection>
Get or initialize the resolved projection for this plan
The resolver function is called only on the first invocation and takes the projection plan to resolve column names to indices.
Sourcepub fn is_resolved(&self) -> bool
pub fn is_resolved(&self) -> bool
Check if projection has been resolved
Trait Implementations§
Source§impl Clone for PkPointLookupPlan
impl Clone for PkPointLookupPlan
Source§fn clone(&self) -> PkPointLookupPlan
fn clone(&self) -> PkPointLookupPlan
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 PkPointLookupPlan
impl RefUnwindSafe for PkPointLookupPlan
impl Send for PkPointLookupPlan
impl Sync for PkPointLookupPlan
impl Unpin for PkPointLookupPlan
impl UnwindSafe for PkPointLookupPlan
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