pub enum ColumnType {
Bool,
Int,
Float,
Text,
Timestamp,
Unknown,
}Expand description
Coarse SQL type taxonomy used during validation and lowering.
Variants§
Bool
Boolean.
Int
Signed integer.
Float
Floating-point.
Text
UTF-8 text.
Timestamp
Timestamp (with or without timezone).
Unknown
Type couldn’t be inferred yet — treat as compatible with anything.
Implementations§
Source§impl ColumnType
impl ColumnType
Sourcepub const fn is_numeric(self) -> bool
pub const fn is_numeric(self) -> bool
True for Self::Int and Self::Float.
Sourcepub fn is_compatible_with(self, other: Self) -> bool
pub fn is_compatible_with(self, other: Self) -> bool
Whether two column types are interchangeable in a comparison or
arithmetic context. Unknown is compatible with everything;
numerics promote to each other.
Trait Implementations§
Source§impl Clone for ColumnType
impl Clone for ColumnType
Source§fn clone(&self) -> ColumnType
fn clone(&self) -> ColumnType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColumnType
Source§impl Debug for ColumnType
impl Debug for ColumnType
impl Eq for ColumnType
Source§impl Hash for ColumnType
impl Hash for ColumnType
Source§impl Ord for ColumnType
impl Ord for ColumnType
Source§fn cmp(&self, other: &ColumnType) -> Ordering
fn cmp(&self, other: &ColumnType) -> Ordering
1.21.0 (const: unstable) · 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 ColumnType
impl PartialEq for ColumnType
Source§fn eq(&self, other: &ColumnType) -> bool
fn eq(&self, other: &ColumnType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ColumnType
impl PartialOrd for ColumnType
impl StructuralPartialEq for ColumnType
Auto Trait Implementations§
impl Freeze for ColumnType
impl RefUnwindSafe for ColumnType
impl Send for ColumnType
impl Sync for ColumnType
impl Unpin for ColumnType
impl UnsafeUnpin for ColumnType
impl UnwindSafe for ColumnType
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.