pub enum Value {
Show 26 variants
Null,
Boolean(bool),
TinyInt(i8),
SmallInt(i16),
Int(i32),
BigInt(i64),
HugeInt(i128),
UTinyInt(u8),
USmallInt(u16),
UInt(u32),
UBigInt(u64),
Float(f32),
Double(f64),
Decimal(Decimal),
Timestamp(TimeUnit, i64),
Text(String),
Blob(Vec<u8>),
Date32(i32),
Time64(TimeUnit, i64),
Interval {
months: i32,
days: i32,
nanos: i64,
},
List(Vec<Value>),
Enum(String),
Struct(OrderedMap<String, Value>),
Array(Vec<Value>),
Map(OrderedMap<Value, Value>),
Union(Box<Value>),
}
Expand description
Owning dynamic type value. Value’s type is typically dictated by DuckDB (not by the caller).
See ValueRef
for a non-owning dynamic type
value.
Variants§
Null
The value is a NULL
value.
Boolean(bool)
The value is a boolean.
TinyInt(i8)
The value is a signed tiny integer.
SmallInt(i16)
The value is a signed small integer.
Int(i32)
The value is a signed integer.
BigInt(i64)
The value is a signed big integer.
HugeInt(i128)
The value is a signed huge integer.
UTinyInt(u8)
The value is a unsigned tiny integer.
USmallInt(u16)
The value is a unsigned small integer.
UInt(u32)
The value is a unsigned integer.
UBigInt(u64)
The value is a unsigned big integer.
Float(f32)
The value is a f32.
Double(f64)
The value is a f64.
Decimal(Decimal)
The value is a Decimal.
Timestamp(TimeUnit, i64)
The value is a timestamp.
Text(String)
The value is a text string.
Blob(Vec<u8>)
The value is a blob of data
Date32(i32)
The value is a date32
Time64(TimeUnit, i64)
The value is a time64
Interval
The value is an interval (month, day, nano)
List(Vec<Value>)
The value is a list
Enum(String)
The value is an enum
Struct(OrderedMap<String, Value>)
The value is a struct
Array(Vec<Value>)
The value is an array
Map(OrderedMap<Value, Value>)
The value is a map
Union(Box<Value>)
The value is a union
Implementations§
Trait Implementations§
source§impl FromSql for Value
impl FromSql for Value
source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl PartialEq for Value
impl PartialEq for Value
source§impl ToSql for Value
impl ToSql for Value
source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)