pub enum ScanMethod {
FullScan {
table: String,
},
PointQuery {
table: String,
column: String,
value: Value,
},
RangeQuery {
table: String,
column: String,
start: Value,
start_inclusive: bool,
end: Value,
end_inclusive: bool,
},
TextSearch {
table: String,
column: String,
query: String,
},
VectorSearch {
table: String,
column: String,
query_vector: ArcVec,
k: usize,
},
SpatialRange {
table: String,
column: String,
min_x: f64,
min_y: f64,
max_x: f64,
max_y: f64,
},
PrimaryKeyScan {
table: String,
ascending: bool,
limit: Option<usize>,
},
IndexIntersection {
table: String,
column1: String,
value1: Value,
column2: String,
value2: Value,
},
}Expand description
Scan method for data access
Variants§
FullScan
Full table scan
PointQuery
Point query using column index
RangeQuery
Range query using column index
§边界语义
start_inclusive: 下界是否包含(>= vs >)end_inclusive: 上界是否包含(<= vs <)
Fields
TextSearch
Text search using full-text index
VectorSearch
Vector KNN search
SpatialRange
Spatial range query
PrimaryKeyScan
Primary key index scan (ordered by primary key)
Used when:
- ORDER BY primary_key [ASC/DESC]
- Optional: LIMIT n
Benefits:
- No in-memory sorting needed
- Can early terminate with LIMIT
- O(k) instead of O(n log n) for sorting
IndexIntersection
Multi-index intersection: use two column indexes and intersect row IDs.
For WHERE col1 = v1 AND col2 = v2, look up both indexes and take
the intersection of matching row IDs, then batch-fetch only those rows.
Implementations§
Source§impl ScanMethod
impl ScanMethod
pub fn table_name(&self) -> &str
Trait Implementations§
Source§impl Clone for ScanMethod
impl Clone for ScanMethod
Source§fn clone(&self) -> ScanMethod
fn clone(&self) -> ScanMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScanMethod
impl RefUnwindSafe for ScanMethod
impl Send for ScanMethod
impl Sync for ScanMethod
impl Unpin for ScanMethod
impl UnsafeUnpin for ScanMethod
impl UnwindSafe for ScanMethod
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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