pub enum Type {
Show 41 variants
Int8,
Int16,
Int32,
Int64,
Int128,
Int256,
UInt8,
UInt16,
UInt32,
UInt64,
UInt128,
UInt256,
Float32,
Float64,
Decimal32(usize),
Decimal64(usize),
Decimal128(usize),
Decimal256(usize),
String,
FixedSizedString(usize),
Binary,
FixedSizedBinary(usize),
Uuid,
Date,
Date32,
DateTime(Tz),
DateTime64(usize, Tz),
Ipv4,
Ipv6,
Point,
Ring,
Polygon,
MultiPolygon,
Nullable(Box<Type>),
Enum8(Vec<(String, i8)>),
Enum16(Vec<(String, i16)>),
LowCardinality(Box<Type>),
Array(Box<Type>),
Tuple(Vec<Type>),
Map(Box<Type>, Box<Type>),
Object,
}Expand description
A raw ClickHouse type.
Variants§
Int8
Int16
Int32
Int64
Int128
Int256
UInt8
UInt16
UInt32
UInt64
UInt128
UInt256
Float32
Float64
Decimal32(usize)
Decimal64(usize)
Decimal128(usize)
Decimal256(usize)
String
FixedSizedString(usize)
Binary
FixedSizedBinary(usize)
Uuid
Date
Date32
DateTime(Tz)
DateTime64(usize, Tz)
Ipv4
Ipv6
Point
Ring
Polygon
MultiPolygon
Nullable(Box<Type>)
Enum8(Vec<(String, i8)>)
Enum16(Vec<(String, i16)>)
LowCardinality(Box<Type>)
Array(Box<Type>)
Tuple(Vec<Type>)
Map(Box<Type>, Box<Type>)
Object
Implementations§
Source§impl Type
impl Type
Sourcepub fn unwrap_array(&self) -> Result<&Type>
pub fn unwrap_array(&self) -> Result<&Type>
§Errors
Errors if the type is not an array
pub fn unarray(&self) -> Option<&Type>
pub fn unmap(&self) -> Option<(&Type, &Type)>
Sourcepub fn unwrap_tuple(&self) -> Result<&[Type]>
pub fn unwrap_tuple(&self) -> Result<&[Type]>
§Errors
Errors if the type is not a tuple
pub fn untuple(&self) -> Option<&[Type]>
pub fn unnull(&self) -> Option<&Type>
pub fn strip_null(&self) -> &Type
pub fn is_nullable(&self) -> bool
pub fn strip_low_cardinality(&self) -> &Type
pub fn into_nullable(self) -> Type
pub fn default_value(&self) -> Value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.