pub struct ScanRange {
pub eq_conds: Vec<Datum>,
pub range: (Bound<Vec<Datum>>, Bound<Vec<Datum>>),
}Fields§
§eq_conds: Vec<Datum>§range: (Bound<Vec<Datum>>, Bound<Vec<Datum>>)Implementations§
Source§impl ScanRange
impl ScanRange
pub fn to_protobuf(&self) -> PbScanRange
pub fn is_full_table_scan(&self) -> bool
pub fn has_eq_conds(&self) -> bool
pub fn two_side_bound(&self) -> bool
pub fn try_compute_vnode( &self, table_distribution: &TableDistribution, ) -> Option<VirtualNode>
pub const fn full_table_scan() -> Self
pub fn convert_to_range(&self) -> (Bound<Vec<Datum>>, Bound<Vec<Datum>>)
Sourcepub fn is_overlap(
left: &ScanRange,
right: &ScanRange,
order_types: &[OrderType],
) -> bool
pub fn is_overlap( left: &ScanRange, right: &ScanRange, order_types: &[OrderType], ) -> bool
Returns whether the two ranges may contain a common row.
order_types are the pk order types with descending ones reversed, i.e. the order in which
the range bounds are compared.
Sourcepub fn cmp_start(
left: &ScanRange,
right: &ScanRange,
order_types: &[OrderType],
) -> Ordering
pub fn cmp_start( left: &ScanRange, right: &ScanRange, order_types: &[OrderType], ) -> Ordering
Compares where the two ranges start. See Self::is_overlap for order_types.
Sourcepub fn union(self, other: ScanRange, order_types: &[OrderType]) -> ScanRange
pub fn union(self, other: ScanRange, order_types: &[OrderType]) -> ScanRange
Returns a range covering two overlapping ranges. It is exact if one range contains the other
or both have the same eq_conds. Otherwise, it is widened to the whole common prefix of
their eq_conds. See Self::is_overlap for order_types.
Sourcefn start_cut(&self, order_types: &[OrderType]) -> (Vec<Datum>, bool)
fn start_cut(&self, order_types: &[OrderType]) -> (Vec<Datum>, bool)
Where the range starts in pk order. See Cut.
Sourcefn end_cut(&self, order_types: &[OrderType]) -> (Vec<Datum>, bool)
fn end_cut(&self, order_types: &[OrderType]) -> (Vec<Datum>, bool)
Where the range ends in pk order. See Cut.
Sourcefn skipped_nulls_are_largest(&self, order_types: &[OrderType]) -> Option<bool>
fn skipped_nulls_are_largest(&self, order_types: &[OrderType]) -> Option<bool>
When only one side of the range is bounded, storage skips the NULLs of the first range
column (see PkScanRange::convert_to_range_bounds). Returns whether those NULLs sort after
the other values, or None if no NULLs are skipped.
Trait Implementations§
impl Eq for ScanRange
impl StructuralPartialEq for ScanRange
Auto Trait Implementations§
impl Freeze for ScanRange
impl RefUnwindSafe for ScanRange
impl Send for ScanRange
impl Sync for ScanRange
impl Unpin for ScanRange
impl UnsafeUnpin for ScanRange
impl UnwindSafe for ScanRange
Blanket Implementations§
impl<T> Allocation for T
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
impl<T> Key for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> LruKey for T
impl<T> LruValue for T
Source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
Source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level.Source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n.Source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to
MetricLevel::Debug and relabel_num set to 1.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SameOrElseExt for Twhere
T: Eq,
impl<T> SameOrElseExt for Twhere
T: Eq,
Source§fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
self and other are equal, if so, return self, otherwise return the result of f().