Skip to main content

RangeComparisonValue

Enum RangeComparisonValue 

Source
pub enum RangeComparisonValue {
    Range(Produced<CanonicalRange>),
    Multirange(Produced<CanonicalMultirange>),
    DeclaredRange(Produced<CanonicalRange<u32>>),
    DeclaredMultirange(Produced<CanonicalMultirange<u32>>),
}
Expand description

Admitted range bounds shared by comparison and exact SQL equality-key consumers. Parsing and normalization retain the caller’s reservations until this value is released.

Variants§

Implementations§

Source§

impl RangeComparisonValue

Source

pub fn bounds(&self) -> Option<RangeBoundValues<'_>>

Source

pub fn member_count(&self) -> Option<usize>

Source

pub fn member_value_with_control( &self, index: usize, catalog: Option<&dyn SQLValueCatalog>, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Value>>, SQLError>

Copy one normalized member through its native carrier encoder. No type input, comparison or canonical function executes.

Source§

impl RangeComparisonValue

Source

pub fn declared_physical_oid( value: &Value, catalog: Option<&dyn SQLValueCatalog>, ) -> Result<Option<u32>>

Declared ranges carry an unambiguous physical SQL identity. Native text carriers still require their selected field type, so ordinary text does not acquire range comparison or key semantics from another operand.

Source

pub fn from_declared_with_control( value: &Value, oid: u32, catalog: Option<&dyn SQLValueCatalog>, control: &ProductionControl<'_>, ) -> Result<Option<Self>>

Resolve an already selected field type through the existing builtin or statement catalog. Text and unrelated SQL types keep their original interpretation.

Source

pub fn from_type_with_control( value: &Value, ty: &ColumnType, catalog: Option<&dyn SQLValueCatalog>, control: &ProductionControl<'_>, ) -> Result<Option<Self>>

Observe an admitted value under an already selected type without resolving its identity again. Unrelated types and SQL NULL retain their ordinary consumer semantics.

Source

pub fn cmp_with_control( &self, other: &Self, control: &ProductionControl<'_>, ) -> Result<Ordering>

Compare values with the same selected range identity; NULL placement remains with the containing SQL operation.

Source

pub fn cmp_with_catalog_and_control( &self, other: &Self, catalog: Option<&dyn SQLValueCatalog>, control: &ProductionControl<'_>, ) -> Result<Ordering>

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
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.