#[non_exhaustive]pub enum SqlType {
Show 16 variants
SmallInt,
Integer,
BigInt,
Real,
Double,
Decimal,
Bool,
Text,
Binary,
Date,
Time,
Timestamp,
Duration,
Uuid,
Json,
IpAddr,
}Expand description
Portable column type family. Backends map it to concrete DDL.
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.
SmallInt
16-bit integer.
Integer
32-bit integer.
BigInt
64-bit integer.
Real
32-bit float.
Double
64-bit float.
Decimal
Exact decimal; precision comes from FieldMeta::max_digits/decimal_places.
Bool
Boolean.
Text
Text; VARCHAR(n) when FieldMeta::max_length is set, else TEXT.
Binary
Binary data.
Date
Calendar date.
Time
Time of day.
Timestamp
UTC timestamp.
Duration
Duration stored as 64-bit microseconds.
Uuid
UUID.
Json
JSON document (jsonb on PostgreSQL).
IpAddr
IP address stored as text.
Trait Implementations§
impl Copy for SqlType
impl Eq for SqlType
impl StructuralPartialEq for SqlType
Auto Trait Implementations§
impl Freeze for SqlType
impl RefUnwindSafe for SqlType
impl Send for SqlType
impl Sync for SqlType
impl Unpin for SqlType
impl UnsafeUnpin for SqlType
impl UnwindSafe for SqlType
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.