Enum partiql_value::Value
source · pub enum Value {
Null,
Missing,
Boolean(bool),
Integer(i64),
Real(OrderedFloat<f64>),
Decimal(Box<Decimal>),
String(Box<String>),
Blob(Box<Vec<u8>>),
DateTime(Box<DateTime>),
List(Box<List>),
Bag(Box<Bag>),
Tuple(Box<Tuple>),
}
Variants§
Null
Missing
Boolean(bool)
Integer(i64)
Real(OrderedFloat<f64>)
Decimal(Box<Decimal>)
String(Box<String>)
Blob(Box<Vec<u8>>)
DateTime(Box<DateTime>)
List(Box<List>)
Bag(Box<Bag>)
Tuple(Box<Tuple>)
Implementations§
source§impl Value
impl Value
pub fn is_tuple(&self) -> bool
pub fn is_list(&self) -> bool
pub fn is_bag(&self) -> bool
pub fn is_sequence(&self) -> bool
sourcepub fn is_number(&self) -> bool
pub fn is_number(&self) -> bool
Returns true if and only if Value is an integer, real, or decimal
sourcepub fn is_present(&self) -> bool
pub fn is_present(&self) -> bool
Returns true if Value is neither null nor missing
pub fn is_ordered(&self) -> bool
pub fn coerce_into_tuple(self) -> Tuple ⓘ
pub fn coerce_to_tuple(&self) -> Tuple ⓘ
pub fn as_tuple_ref(&self) -> Cow<'_, Tuple>
pub fn as_bindings(&self) -> BindingIter<'_> ⓘ
pub fn into_bindings(self) -> BindingIntoIter ⓘ
pub fn coerce_into_bag(self) -> Bag
pub fn as_bag_ref(&self) -> Cow<'_, Bag>
pub fn coerce_into_list(self) -> List
pub fn as_list_ref(&self) -> Cow<'_, List>
pub fn iter(&self) -> ValueIter<'_> ⓘ
pub fn sequence_iter(&self) -> Option<ValueIter<'_>>
Trait Implementations§
source§impl AddAssign<&Value> for Value
impl AddAssign<&Value> for Value
source§fn add_assign(&mut self, rhs: &Value)
fn add_assign(&mut self, rhs: &Value)
Performs the
+=
operation. Read moresource§impl Comparable for Value
impl Comparable for Value
source§fn is_comparable_to(&self, rhs: &Self) -> bool
fn is_comparable_to(&self, rhs: &Self) -> bool
Returns true if and only if self
is comparable to rhs
source§impl Extend<Value> for Bag
impl Extend<Value> for Bag
source§fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<Value> for List
impl Extend<Value> for List
source§fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl From<Decimal> for Value
impl From<Decimal> for Value
source§fn from(d: RustDecimal) -> Self
fn from(d: RustDecimal) -> Self
Converts to this type from the input type.
source§impl IntoIterator for Value
impl IntoIterator for Value
source§impl NullableOrd for Value
impl NullableOrd for Value
source§impl Ord for Value
impl Ord for Value
Implementation of spec’s order-by less-than
assuming nulls first.
TODO: more tests for Ord on Value
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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