Module models::types[][src]

Expand description

Types

RustPostgreSQLMySQLSQLite
boolBOOLEANBOOLEANBOOLEAN
i8SMALLINTTINYINTINTEGER
i16SMALLINTSMALLINTINTEGER
i32INTINTINTEGER
i64BIGINTBIGINTINTEGER
f32REALFLOATREAL
f64REALREALREAL
StringTEXTTEXTTEXT
VarChar<SIZE>VARCHAR(SIZE)VARCHAR(SIZE)TEXT
VarBinary<SIZE>BYTEAVARBINARY(SIZE)BLOB
Vec<u8>BYTEABLOBBLOB
[u8; SIZE]BYTEABLOB(SIZE)BLOB

chrono

Requires the chrono Cargo feature flag.

Rust typePostgresMySQLSQLite
chrono::DateTime<Utc>TIMESTAMPTZTIMESTAMPDATETIME
chrono::DateTime<Local>TIMESTAMPTZTIMESTAMPDATETIME
chrono::NaiveDateTimeTIMESTAMPDATETIMEDATETIME
chrono::NaiveDateDATEDATEDATETIME
chrono::NaiveTimeTIMETIMEDATETIME

Structs

Wrapper type that defaults to DATE.

Wrapper type that defaults to DATETIME.

PostgreSQL SERIAL type. It enables autoincrementing functionality. Example:

Wrapper type that defaults to TIMESTAMP.

Used for MySQL when to specify that the datatype should be a VARBINARY(N). The database will make sure the field does not go over the specified length.

Used for MySQL when to specify that the datatype should be a VARCHAR(N). The database will make sure the field does not go over the specified length.

Traits

Do not use this trait in your production code. Its intended use is for migration generation only. It will panic if used outside its intended API.