pub enum ColumnType {
}Expand description
A column type as the schema builder thinks of it, before any database has had an opinion.
Logical rather than literal: Timestamp is timestamptz on PostgreSQL,
datetime(6) on MySQL and datetime2 on SQL Server, and a migration should
not have to know that.
Variants§
Id
The conventional auto-incrementing primary key.
UuidId
A UUID primary key, defaulted by the database.
SmallInteger
Integer
BigInteger
Float
Approximate; for money use ColumnType::Decimal.
Decimal
Boolean
String
Text
Json
Uuid
Date
Time
Timestamp
Binary
Raw(String)
An escape hatch for a type the framework does not model.
Trait Implementations§
Source§impl Clone for ColumnType
impl Clone for ColumnType
Source§fn clone(&self) -> ColumnType
fn clone(&self) -> ColumnType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ColumnType
impl Debug for ColumnType
Source§impl PartialEq for ColumnType
impl PartialEq 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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more