pub enum DataType {
Show 50 variants
TinyInt,
SmallInt,
Int,
BigInt,
Float,
Double,
Decimal {
precision: Option<u32>,
scale: Option<u32>,
},
Numeric {
precision: Option<u32>,
scale: Option<u32>,
},
Real,
Varchar(Option<u32>),
Char(Option<u32>),
Text,
String,
Binary(Option<u32>),
Varbinary(Option<u32>),
Boolean,
Date,
Time {
precision: Option<u32>,
},
Timestamp {
precision: Option<u32>,
with_tz: bool,
},
Interval,
DateTime,
Blob,
Bytea,
Bytes,
Json,
Jsonb,
Uuid,
Array(Option<Box<DataType>>),
Map {
key: Box<DataType>,
value: Box<DataType>,
},
Struct(Vec<(String, DataType)>),
Tuple(Vec<DataType>),
Null,
Unknown(String),
Variant,
Object,
Xml,
Inet,
Cidr,
Macaddr,
Bit(Option<u32>),
Money,
Serial,
BigSerial,
SmallSerial,
Regclass,
Regtype,
Hstore,
Geography,
Geometry,
Super,
}Expand description
SQL data types. Significantly expanded to match sqlglot’s DataType.Type enum.
Variants§
TinyInt
SmallInt
Int
BigInt
Float
Double
Decimal
Numeric
Real
Varchar(Option<u32>)
Char(Option<u32>)
Text
String
Binary(Option<u32>)
Varbinary(Option<u32>)
Boolean
Date
Time
Timestamp
Interval
DateTime
Blob
Bytea
Bytes
Json
Jsonb
Uuid
Array(Option<Box<DataType>>)
Map
Struct(Vec<(String, DataType)>)
Tuple(Vec<DataType>)
Null
Unknown(String)
Variant
Object
Xml
Inet
Cidr
Macaddr
Bit(Option<u32>)
Money
Serial
BigSerial
SmallSerial
Regclass
Regtype
Hstore
Geography
Geometry
Super
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataType
impl<'de> Deserialize<'de> for DataType
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
impl Eq for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations§
impl Freeze for DataType
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnsafeUnpin for DataType
impl UnwindSafe for DataType
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