pub enum LogicalType {
Show 35 variants
Any,
Bool,
Int8,
Int16,
Int32,
Int64,
Int128,
UInt8,
UInt16,
UInt32,
UInt64,
Float,
Double,
Date,
Timestamp,
TimestampSec,
TimestampMs,
TimestampNs,
TimestampTz,
Interval,
Decimal {
precision: u8,
scale: u8,
},
InternalId,
Serial,
String,
Blob,
Uuid,
Node,
Rel,
RecursiveRel,
List(Box<LogicalType>),
Array {
element: Box<LogicalType>,
size: u64,
},
Struct(Vec<(SmolStr, LogicalType)>),
Map {
key: Box<LogicalType>,
value: Box<LogicalType>,
},
Union(Vec<(SmolStr, LogicalType)>),
Pointer,
}Expand description
Logical data type representing user-facing type semantics.
Multiple logical types may share the same PhysicalType
(e.g., Date/Timestamp/TimestampNs all use Int64 physically).
Variants§
Any
Bool
Int8
Int16
Int32
Int64
Int128
UInt8
UInt16
UInt32
UInt64
Float
Double
Date
Timestamp
TimestampSec
TimestampMs
TimestampNs
TimestampTz
Interval
Decimal
InternalId
Serial
String
Blob
Uuid
Node
Rel
RecursiveRel
List(Box<LogicalType>)
Array
Struct(Vec<(SmolStr, LogicalType)>)
Map
Union(Vec<(SmolStr, LogicalType)>)
Pointer
Implementations§
Source§impl LogicalType
impl LogicalType
Sourcepub fn physical_type(&self) -> PhysicalType
pub fn physical_type(&self) -> PhysicalType
Returns the physical storage type for this logical type.
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Whether this is a numeric type (integer or floating-point).
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Whether this is an integer type (signed or unsigned).
Sourcepub fn is_temporal(&self) -> bool
pub fn is_temporal(&self) -> bool
Whether this is a temporal type.
Trait Implementations§
Source§impl Clone for LogicalType
impl Clone for LogicalType
Source§fn clone(&self) -> LogicalType
fn clone(&self) -> LogicalType
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 LogicalType
impl Debug for LogicalType
Source§impl<'de> Deserialize<'de> for LogicalType
impl<'de> Deserialize<'de> for LogicalType
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
Source§impl Display for LogicalType
impl Display for LogicalType
Source§impl Hash for LogicalType
impl Hash for LogicalType
Source§impl PartialEq for LogicalType
impl PartialEq for LogicalType
Source§impl Serialize for LogicalType
impl Serialize for LogicalType
impl Eq for LogicalType
impl StructuralPartialEq for LogicalType
Auto Trait Implementations§
impl Freeze for LogicalType
impl RefUnwindSafe for LogicalType
impl Send for LogicalType
impl Sync for LogicalType
impl Unpin for LogicalType
impl UnsafeUnpin for LogicalType
impl UnwindSafe for LogicalType
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