Conversions between Rust and standard SQL types.
Rust type | SQL type(s) |
bool | BOOLEAN |
i16 | SMALLINT |
i32 | INT |
i64 | BIGINT |
f32 | FLOAT |
f64 | DOUBLE |
&str , String | VARCHAR, CHAR, TEXT |
In addition, Option<T>
is supported where T
implements Type
. An Option<T>
represents
a potentially NULL
value from SQL.