pub struct CanonicalRowHashSet { /* private fields */ }Expand description
Collision-safe in-memory set for positional SQL rows.
Probes consume borrowed values and stream their canonical representation
directly into the hash function. Only the first distinct row is copied
into the contiguous key arena; repeated build rows and every lookup avoid
both a positional Vec<Value> allocation and value cloning. Hash matches
always verify the complete SQL Value equality domain.
Implementations§
Source§impl CanonicalRowHashSet
impl CanonicalRowHashSet
pub fn new() -> Self
Sourcepub fn with_sql_types(types: Vec<Option<ColumnType>>) -> Self
pub fn with_sql_types(types: Vec<Option<ColumnType>>) -> Self
Retain the selected key types for every insertion, hash probe and collision comparison.
Sourcepub fn insert_borrowed(&mut self, values: &[&Value]) -> ExecResult<bool>
pub fn insert_borrowed(&mut self, values: &[&Value]) -> ExecResult<bool>
Insert a positional key assembled from borrowed values.
Returns true only when this is the first SQL-equal key.
pub fn insert_borrowed_with_catalog( &mut self, values: &[&Value], catalog: Option<&dyn SQLValueCatalog>, ) -> ExecResult<bool>
Sourcepub fn insert_values(&mut self, values: &[Value]) -> ExecResult<bool>
pub fn insert_values(&mut self, values: &[Value]) -> ExecResult<bool>
Insert an already positional key without an intermediate borrowed-row carrier. Values are copied only for a previously unseen key.
pub fn insert_values_with_catalog( &mut self, values: &[Value], catalog: Option<&dyn SQLValueCatalog>, ) -> ExecResult<bool>
Sourcepub fn contains_borrowed(&self, values: &[&Value]) -> ExecResult<bool>
pub fn contains_borrowed(&self, values: &[&Value]) -> ExecResult<bool>
Probe with a composite row of borrowed values without allocating or copying the key.
pub fn contains_borrowed_with_catalog( &self, values: &[&Value], catalog: Option<&dyn SQLValueCatalog>, ) -> ExecResult<bool>
Sourcepub fn contains_values(&self, values: &[Value]) -> ExecResult<bool>
pub fn contains_values(&self, values: &[Value]) -> ExecResult<bool>
Probe with an already positional value slice.
pub fn contains_values_with_catalog( &self, values: &[Value], catalog: Option<&dyn SQLValueCatalog>, ) -> ExecResult<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CanonicalRowHashSet
impl RefUnwindSafe for CanonicalRowHashSet
impl Send for CanonicalRowHashSet
impl Sync for CanonicalRowHashSet
impl Unpin for CanonicalRowHashSet
impl UnsafeUnpin for CanonicalRowHashSet
impl UnwindSafe for CanonicalRowHashSet
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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