Expand description

Conversions between Rust and SQLite types.

Types

Rust typeSQLite type(s)
boolBOOLEAN
i8INTEGER
i16INTEGER
i32INTEGER
i64BIGINT, INT8
u8INTEGER
u16INTEGER
u32INTEGER
u64BIGINT, INT8
f32REAL
f64REAL
&str, StringTEXT
&[u8], Vec<u8>BLOB

chrono

Requires the chrono Cargo feature flag.

Rust typeSqlite type(s)
chrono::NaiveDateTimeDATETIME
chrono::DateTime<Utc>DATETIME
chrono::DateTime<Local>DATETIME

uuid

Requires the uuid Cargo feature flag.

Rust typeSqlite type(s)
uuid::UuidBLOB, TEXT
uuid::adapter::HyphenatedTEXT

Nullable

In addition, Option<T> is supported where T implements Type. An Option<T> represents a potentially NULL value from SQLite.