Skip to main content

Held

Struct Held 

Source
pub struct Held { /* private fields */ }
Expand description

A literal with the one row column a comparison reads it through already built.

The comparison loops read both sides through a slice, so the constant side is turned into a one row column and read at position zero. That column is what carries a string’s four byte prefix, which is the thing the string comparison resolves almost every row from, and building it costs a couple of allocations. Doing that once for the query rather than once per chunk is what this is.

It matters least where a chunk is full and most where it is not. A second conjunct handed the eleven rows the first one kept pays the same setup as one handed two thousand, so on a selective filter the setup was a real part of the call rather than a rounding error on it.

Implementations§

Source§

impl Held

Source

pub fn of(ty: &LogicalType, value: &Value) -> Option<Self>

The one row column for value read as ty, or None for a type with no column layout.

A nested type answers None and the comparison does what it always did, which is decide per chunk and fall through to the row at a time path if it has to.

Trait Implementations§

Source§

impl Debug for Held

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Held

§

impl RefUnwindSafe for Held

§

impl Send for Held

§

impl Sync for Held

§

impl Unpin for Held

§

impl UnsafeUnpin for Held

§

impl UnwindSafe for Held

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.