Enum proof_of_sql::base::database::LiteralValue
source · #[non_exhaustive]pub enum LiteralValue<S: Scalar> {
Boolean(bool),
SmallInt(i16),
Int(i32),
BigInt(i64),
VarChar((String, S)),
Int128(i128),
Decimal75(Precision, i8, S),
Scalar(S),
TimeStampTZ(PoSQLTimeUnit, PoSQLTimeZone, i64),
}
Expand description
Represents a literal value.
Note: The types here should correspond to native SQL database types.
See <https://ignite.apache.org/docs/latest/sql-reference/data-types>
for
a description of the native types used by Apache Ignite.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Boolean(bool)
Boolean literals
SmallInt(i16)
i16 literals
Int(i32)
i32 literals
BigInt(i64)
i64 literals
VarChar((String, S))
String literals
- the first element maps to the str value.
- the second element maps to the str hash (see crate::base::scalar::Scalar).
Int128(i128)
i128 literals
Decimal75(Precision, i8, S)
Decimal literals with a max width of 252 bits
- the backing store maps to the type crate::base::scalar::Curve25519Scalar
Scalar(S)
Scalar literals
TimeStampTZ(PoSQLTimeUnit, PoSQLTimeZone, i64)
TimeStamp defined over a unit (s, ms, ns, etc) and timezone with backing store mapped to i64, which is time units since unix epoch
Implementations§
source§impl<S: Scalar> LiteralValue<S>
impl<S: Scalar> LiteralValue<S>
sourcepub fn column_type(&self) -> ColumnType
pub fn column_type(&self) -> ColumnType
Provides the column type associated with the column
Trait Implementations§
source§impl<S: Clone + Scalar> Clone for LiteralValue<S>
impl<S: Clone + Scalar> Clone for LiteralValue<S>
source§fn clone(&self) -> LiteralValue<S>
fn clone(&self) -> LiteralValue<S>
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<'de, S> Deserialize<'de> for LiteralValue<S>where
S: Deserialize<'de> + Scalar,
impl<'de, S> Deserialize<'de> for LiteralValue<S>where
S: Deserialize<'de> + Scalar,
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<S> Serialize for LiteralValue<S>
impl<S> Serialize for LiteralValue<S>
impl<S: Eq + Scalar> Eq for LiteralValue<S>
impl<S: Scalar> StructuralPartialEq for LiteralValue<S>
Auto Trait Implementations§
impl<S> Freeze for LiteralValue<S>where
S: Freeze,
impl<S> RefUnwindSafe for LiteralValue<S>where
S: RefUnwindSafe,
impl<S> Send for LiteralValue<S>
impl<S> Sync for LiteralValue<S>
impl<S> Unpin for LiteralValue<S>where
S: Unpin,
impl<S> UnwindSafe for LiteralValue<S>where
S: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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
Compare self to
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>
Converts
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>
Converts
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