pub enum IndexKey {
Int(i64),
Text(String),
Bool(bool),
Uuid([u8; 16]),
}Expand description
Key type accepted by secondary indices. Float / NULL / Vector values
can’t participate in a B-tree index — f64 is only PartialOrd, NULL
has SQL-three-valued semantics, and Vector belongs to the (future) HNSW
path. Index lookups on those columns fall back to full scan.
Variants§
Int(i64)
Text(String)
Bool(bool)
Uuid([u8; 16])
v7.17.0 — Value::Uuid index key. Comparison is byte-wise
(RFC 4122 byte order) so PRIMARY KEY UUID lookups land on
the same fast-path as Int / Text.
Implementations§
Source§impl IndexKey
impl IndexKey
Sourcepub fn from_i64(n: i64) -> Self
pub fn from_i64(n: i64) -> Self
v7.37.43 (INSUBQ B-4) — inline-friendly BigInt fast path.
try_count_star_pk_in_subquery_fast (and any other hot loop
probing an integer PK) already holds an i64; this builds the
IndexKey without going through the generic from_value
dispatch tree.
pub fn from_value(v: &Value<'_>) -> Option<Self>
Trait Implementations§
impl Eq for IndexKey
Source§impl Ord for IndexKey
impl Ord for IndexKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for IndexKey
impl PartialOrd for IndexKey
impl StructuralPartialEq for IndexKey
Auto Trait Implementations§
impl Freeze for IndexKey
impl RefUnwindSafe for IndexKey
impl Send for IndexKey
impl Sync for IndexKey
impl Unpin for IndexKey
impl UnsafeUnpin for IndexKey
impl UnwindSafe for IndexKey
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