Enum barrel::types::BaseType [−][src]
pub enum BaseType {
Show 20 variants
Text,
Varchar(usize),
Char(usize),
Primary,
Integer,
Serial,
Float,
Double,
UUID,
Boolean,
Json,
Date,
Time,
DateTime,
Binary,
Foreign(Option<String>, String, WrapVec<String>, ReferentialAction, ReferentialAction),
Custom(&'static str),
Array(Box<BaseType>),
Index(Vec<String>),
Constraint(Constraint, Vec<String>),
}
Expand description
Core type enum, describing the basic type
Variants
A string blob, stored in the heap with a pointer in the row
Varchar(usize)
Variable-length string that (hopefully) is stored to the row
Tuple Fields of Varchar
0: usize
Char(usize)
Fixed-length string that is stored to the row
Tuple Fields of Char
0: usize
Primary key (utility for incrementing integer – postgres supports this, we just mirror it)
Simple integer
An integer that as a default value of the next biggest number
Floating point number
Like Float but ~ ~ d o u b l e p r e c i s i o n ~ ~
A unique identifier type
True or False
Json encoded data
Date
Date
Date and time
Foreign(Option<String>, String, WrapVec<String>, ReferentialAction, ReferentialAction)
Foreign key to other table
Tuple Fields of Foreign
Custom(&'static str)
I have no idea what you are – but I like it
Tuple Fields of Custom
0: &'static str
Any of the above, but many of them
Indexing over multiple columns
Indexing over multiple columns
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BaseType
impl UnwindSafe for BaseType
Blanket Implementations
Mutably borrows from an owned value. Read more