pub enum NormalizedType {
Show 21 variants
Int,
BigInt,
SmallInt,
Float,
Double,
Decimal {
precision: Option<i32>,
scale: Option<i32>,
},
String,
Text,
Char {
length: Option<i32>,
},
VarChar {
length: Option<i32>,
},
Bytes,
Boolean,
DateTime,
Date,
Time,
Timestamp,
Json,
Uuid,
Array(Box<NormalizedType>),
Enum(String),
Unknown(String),
}Expand description
Normalized type for cross-database compatibility.
Variants§
Int
Integer types.
BigInt
SmallInt
Float
Floating point.
Double
Decimal
Fixed precision.
String
String types.
Text
Char
VarChar
Bytes
Binary.
Boolean
Boolean.
DateTime
Date/time.
Date
Time
Timestamp
Json
JSON.
Uuid
UUID.
Array(Box<NormalizedType>)
Array of type.
Enum(String)
Enum reference.
Unknown(String)
Unknown/unsupported.
Implementations§
Source§impl NormalizedType
impl NormalizedType
Sourcepub fn to_prax_type(&self) -> String
pub fn to_prax_type(&self) -> String
Convert to Prax schema type string.
Trait Implementations§
Source§impl Clone for NormalizedType
impl Clone for NormalizedType
Source§fn clone(&self) -> NormalizedType
fn clone(&self) -> NormalizedType
Returns a duplicate 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 NormalizedType
impl Debug for NormalizedType
Source§impl Default for NormalizedType
impl Default for NormalizedType
Source§impl<'de> Deserialize<'de> for NormalizedType
impl<'de> Deserialize<'de> for NormalizedType
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 PartialEq for NormalizedType
impl PartialEq for NormalizedType
Source§impl Serialize for NormalizedType
impl Serialize for NormalizedType
impl Eq for NormalizedType
impl StructuralPartialEq for NormalizedType
Auto Trait Implementations§
impl Freeze for NormalizedType
impl RefUnwindSafe for NormalizedType
impl Send for NormalizedType
impl Sync for NormalizedType
impl Unpin for NormalizedType
impl UnwindSafe for NormalizedType
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