Struct mz_expr::ResultSpec
source · pub struct ResultSpec<'a> { /* private fields */ }
Expand description
An approximation of the set of values an expression might have, including whether or not it might be null or an error value. This is generally an overapproximation, in the sense that ResultSpec::may_contain may return true even if the argument is not included in the set. (However, it should never return false when the value is included!)
Implementations§
source§impl<'a> ResultSpec<'a>
impl<'a> ResultSpec<'a>
sourcepub fn has_type(col: &ColumnType, fallible: bool) -> ResultSpec<'a>
pub fn has_type(col: &ColumnType, fallible: bool) -> ResultSpec<'a>
A spec that matches all values of a given type.
sourcepub fn value(value: Datum<'a>) -> ResultSpec<'a>
pub fn value(value: Datum<'a>) -> ResultSpec<'a>
A spec that only matches the given value.
sourcepub fn value_between(min: Datum<'a>, max: Datum<'a>) -> ResultSpec<'a>
pub fn value_between(min: Datum<'a>, max: Datum<'a>) -> ResultSpec<'a>
A spec that matches values between the given (non-null) min and max.
sourcepub fn value_all() -> ResultSpec<'a>
pub fn value_all() -> ResultSpec<'a>
A spec that matches any non-null value.
sourcepub fn map_spec(map: BTreeMap<Datum<'a>, ResultSpec<'a>>) -> ResultSpec<'a>
pub fn map_spec(map: BTreeMap<Datum<'a>, ResultSpec<'a>>) -> ResultSpec<'a>
A spec that matches Datum::Maps of the given type.
sourcepub fn union(self, other: ResultSpec<'a>) -> ResultSpec<'a>
pub fn union(self, other: ResultSpec<'a>) -> ResultSpec<'a>
Given two specs, returns a new spec that matches anything that either original spec would match.
sourcepub fn intersect(self, other: ResultSpec<'a>) -> ResultSpec<'a>
pub fn intersect(self, other: ResultSpec<'a>) -> ResultSpec<'a>
Given two specs, returns a new spec that only matches things that both original specs would match.
sourcepub fn may_contain(&self, value: Datum<'a>) -> bool
pub fn may_contain(&self, value: Datum<'a>) -> bool
Check if a particular value matches the spec.
Trait Implementations§
source§impl<'a> Clone for ResultSpec<'a>
impl<'a> Clone for ResultSpec<'a>
source§fn clone(&self) -> ResultSpec<'a>
fn clone(&self) -> ResultSpec<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for ResultSpec<'a>
impl<'a> Debug for ResultSpec<'a>
source§impl<'a> PartialEq for ResultSpec<'a>
impl<'a> PartialEq for ResultSpec<'a>
source§fn eq(&self, other: &ResultSpec<'a>) -> bool
fn eq(&self, other: &ResultSpec<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<'a> Eq for ResultSpec<'a>
impl<'a> StructuralEq for ResultSpec<'a>
impl<'a> StructuralPartialEq for ResultSpec<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ResultSpec<'a>
impl<'a> Send for ResultSpec<'a>
impl<'a> Sync for ResultSpec<'a>
impl<'a> Unpin for ResultSpec<'a>
impl<'a> UnwindSafe for ResultSpec<'a>
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.