Enum proof_of_sql::base::database::ColumnType
source · pub enum ColumnType {
Boolean,
SmallInt,
Int,
BigInt,
Int128,
VarChar,
Decimal75(Precision, i8),
TimestampTZ(PoSQLTimeUnit, PoSQLTimeZone),
Scalar,
}
Expand description
Represents the supported data types of a column in an in-memory, column-oriented database.
See <https://ignite.apache.org/docs/latest/sql-reference/data-types>
for
a description of the native types used by Apache Ignite.
Variants§
Boolean
Mapped to bool
SmallInt
Mapped to i16
Int
Mapped to i32
BigInt
Mapped to i64
Int128
Mapped to i128
VarChar
Mapped to String
Decimal75(Precision, i8)
Mapped to i256
TimestampTZ(PoSQLTimeUnit, PoSQLTimeZone)
Mapped to i64
Scalar
Mapped to Curve25519Scalar
Implementations§
source§impl ColumnType
impl ColumnType
sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true if this column is numeric and false otherwise
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if this column is an integer and false otherwise
sourcepub fn max_integer_type(&self, other: &Self) -> Option<Self>
pub fn max_integer_type(&self, other: &Self) -> Option<Self>
Returns the larger integer type of two ColumnTypes if they are both integers.
If either of the columns is not an integer, return None.
sourcepub fn precision_value(&self) -> Option<u8>
pub fn precision_value(&self) -> Option<u8>
Returns the precision of a ColumnType if it is converted to a decimal wrapped in Some(). If it can not be converted to a decimal, return None.
Trait Implementations§
source§impl Clone for ColumnType
impl Clone for ColumnType
source§fn clone(&self) -> ColumnType
fn clone(&self) -> ColumnType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ColumnType
impl Debug for ColumnType
source§impl<'de> Deserialize<'de> for ColumnType
impl<'de> Deserialize<'de> for ColumnType
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>,
source§impl Display for ColumnType
impl Display for ColumnType
Display the column type as a str name (in all caps)
source§impl From<&ColumnType> for DataType
impl From<&ColumnType> for DataType
Convert ColumnType values to some arrow DataType
source§fn from(column_type: &ColumnType) -> Self
fn from(column_type: &ColumnType) -> Self
source§impl Hash for ColumnType
impl Hash for ColumnType
source§impl PartialEq for ColumnType
impl PartialEq for ColumnType
source§fn eq(&self, other: &ColumnType) -> bool
fn eq(&self, other: &ColumnType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ColumnType
impl Serialize for ColumnType
source§impl TryFrom<DataType> for ColumnType
impl TryFrom<DataType> for ColumnType
Convert arrow DataType values to some ColumnType
impl Copy for ColumnType
impl Eq 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 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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
)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§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
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more