pub enum TypedValue {
Show 29 variants
Null,
Bool(bool),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
Int128(i128),
UInt8(u8),
UInt16(u16),
UInt32(u32),
UInt64(u64),
Float(f32),
Double(f64),
Date(i64),
Timestamp(i64),
TimestampSec(i64),
TimestampMs(i64),
TimestampNs(i64),
TimestampTz(i64),
Interval(Interval),
String(SmolStr),
Blob(Vec<u8>),
Uuid(SmolStr),
InternalId(InternalId),
Serial(i64),
List(Vec<TypedValue>),
Array(Vec<TypedValue>),
Struct(Vec<(SmolStr, TypedValue)>),
Map(Vec<(TypedValue, TypedValue)>),
}Expand description
A typed value used during parsing, binding, and planning.
This is the ergonomic representation. The storage-optimized 32-byte
untagged Value union for the executor is introduced in Phase 3
when the storage layer and vectorized execution need it.
Variants§
Null
Bool(bool)
Int8(i8)
Int16(i16)
Int32(i32)
Int64(i64)
Int128(i128)
UInt8(u8)
UInt16(u16)
UInt32(u32)
UInt64(u64)
Float(f32)
Double(f64)
Date(i64)
Timestamp(i64)
TimestampSec(i64)
TimestampMs(i64)
TimestampNs(i64)
TimestampTz(i64)
Interval(Interval)
String(SmolStr)
Blob(Vec<u8>)
Uuid(SmolStr)
InternalId(InternalId)
Serial(i64)
List(Vec<TypedValue>)
Array(Vec<TypedValue>)
Struct(Vec<(SmolStr, TypedValue)>)
Map(Vec<(TypedValue, TypedValue)>)
Implementations§
Source§impl TypedValue
impl TypedValue
Sourcepub fn logical_type(&self) -> LogicalType
pub fn logical_type(&self) -> LogicalType
Infer the LogicalType from the runtime value.
pub fn is_null(&self) -> bool
Sourcepub fn as_i64(&self) -> Option<i64>
pub fn as_i64(&self) -> Option<i64>
Try to extract an i64 (works for all integer types that fit).
Sourcepub fn as_internal_id(&self) -> Option<InternalId>
pub fn as_internal_id(&self) -> Option<InternalId>
Try to extract an InternalId.
Trait Implementations§
Source§impl Clone for TypedValue
impl Clone for TypedValue
Source§fn clone(&self) -> TypedValue
fn clone(&self) -> TypedValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedValue
impl Debug for TypedValue
Source§impl Display for TypedValue
impl Display for TypedValue
Source§impl From<TypedValue> for Value
impl From<TypedValue> for Value
Source§fn from(v: TypedValue) -> Self
fn from(v: TypedValue) -> Self
Converts to this type from the input type.
Source§impl From<Value> for TypedValue
impl From<Value> for TypedValue
Source§impl Hash for TypedValue
impl Hash for TypedValue
Source§impl PartialEq for TypedValue
impl PartialEq for TypedValue
impl Eq for TypedValue
Auto Trait Implementations§
impl Freeze for TypedValue
impl RefUnwindSafe for TypedValue
impl Send for TypedValue
impl Sync for TypedValue
impl Unpin for TypedValue
impl UnsafeUnpin for TypedValue
impl UnwindSafe for TypedValue
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