Enum kip_sql::types::LogicalType
source · pub enum LogicalType {
}
Expand description
Sqlrs type conversion: sqlparser::ast::DataType -> LogicalType -> arrow::datatypes::DataType
Variants§
Invalid
SqlNull
Boolean
Tinyint
UTinyint
Smallint
USmallint
Integer
UInteger
Bigint
UBigint
Float
Double
Varchar(Option<u32>)
Date
DateTime
Decimal(Option<u8>, Option<u8>)
Implementations§
source§impl LogicalType
impl LogicalType
pub fn type_trans<T: 'static>() -> Option<LogicalType>
pub fn raw_len(&self) -> Option<usize>
pub fn numeric() -> Vec<LogicalType>
pub fn is_numeric(&self) -> bool
pub fn is_signed_numeric(&self) -> bool
pub fn is_unsigned_numeric(&self) -> bool
pub fn is_floating_point_numeric(&self) -> bool
pub fn max_logical_type( left: &LogicalType, right: &LogicalType ) -> Result<LogicalType, TypeError>
pub fn can_implicit_cast(from: &LogicalType, to: &LogicalType) -> bool
Trait Implementations§
source§impl AsRef<str> for LogicalType
impl AsRef<str> for LogicalType
source§impl Clone for LogicalType
impl Clone for LogicalType
source§fn clone(&self) -> LogicalType
fn clone(&self) -> LogicalType
Returns a copy 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 Ord for LogicalType
impl Ord for LogicalType
source§fn cmp(&self, other: &LogicalType) -> Ordering
fn cmp(&self, other: &LogicalType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LogicalType
impl PartialEq for LogicalType
source§fn eq(&self, other: &LogicalType) -> bool
fn eq(&self, other: &LogicalType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LogicalType
impl PartialOrd for LogicalType
source§fn partial_cmp(&self, other: &LogicalType) -> Option<Ordering>
fn partial_cmp(&self, other: &LogicalType) -> Option<Ordering>
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 moresource§impl Serialize for LogicalType
impl Serialize for LogicalType
source§impl TryFrom<DataType> for LogicalType
impl TryFrom<DataType> for LogicalType
sqlparser datatype to logical type
impl Copy for LogicalType
impl Eq for LogicalType
impl StructuralEq for LogicalType
impl StructuralPartialEq for LogicalType
Auto Trait Implementations§
impl RefUnwindSafe for LogicalType
impl Send for LogicalType
impl Sync for LogicalType
impl Unpin 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
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.