cdbc_sqlite/types/mod.rs
1//! Conversions between Rust and **SQLite** types.
2//!
3//! # Types
4//!
5//! | Rust type | SQLite type(s) |
6//! |---------------------------------------|------------------------------------------------------|
7//! | `bool` | BOOLEAN |
8//! | `i8` | INTEGER |
9//! | `i16` | INTEGER |
10//! | `i32` | INTEGER |
11//! | `i64` | BIGINT, INT8 |
12//! | `u8` | INTEGER |
13//! | `u16` | INTEGER |
14//! | `u32` | INTEGER |
15//! | `u64` | BIGINT, INT8 |
16//! | `f32` | REAL |
17//! | `f64` | REAL |
18//! | `&str`, [`String`] | TEXT |
19//! | `&[u8]`, `Vec<u8>` | BLOB |
20//!
21//! ### [`chrono`](https://crates.io/crates/chrono)
22//!
23//! Requires the `chrono` Cargo feature flag.
24//!
25//! | Rust type | Sqlite type(s) |
26//! |---------------------------------------|------------------------------------------------------|
27//! | `chrono::NaiveDateTime` | DATETIME |
28//! | `chrono::DateTime<Utc>` | DATETIME |
29//! | `chrono::DateTime<Local>` | DATETIME |
30//!
31//! ### [`uuid`](https://crates.io/crates/uuid)
32//!
33//! Requires the `uuid` Cargo feature flag.
34//!
35//! | Rust type | Sqlite type(s) |
36//! |---------------------------------------|------------------------------------------------------|
37//! | `uuid::Uuid` | BLOB, TEXT |
38//! | `uuid::adapter::Hyphenated` | TEXT |
39//!
40//! # Nullable
41//!
42//! In addition, `Option<T>` is supported where `T` implements `Type`. An `Option<T>` represents
43//! a potentially `NULL` value from SQLite.
44//!
45
46mod bool;
47mod bytes;
48#[cfg(feature = "chrono")]
49mod chrono;
50mod float;
51mod int;
52#[cfg(feature = "json")]
53mod json;
54mod str;
55mod uint;
56#[cfg(feature = "uuid")]
57mod uuid;
58
59mod time;