spg_sqlx/types/mod.rs
1//! v7.16.0 — `Type` + `Encode` + `Decode` for the basic scalar
2//! surface. mailrs's most-used columns are INT / BIGINT / TEXT /
3//! BOOLEAN / BYTEA / TIMESTAMPTZ / JSONB — this module ships
4//! the first five; the date/time + JSON families land in
5//! follow-up commits.
6
7mod array;
8mod bool;
9mod bytes;
10#[cfg(feature = "chrono")]
11mod chrono;
12pub(crate) mod decimal;
13mod float;
14mod int;
15#[cfg(feature = "json")]
16mod json;
17mod text;
18pub(crate) mod uuid;
19pub(crate) mod vector;
20
21// `Option<T>` binds → SQL NULL when None. sqlx-core's Encode-for-Option
22// is a per-driver macro, NOT a blanket impl — every Database driver has
23// to invoke it itself (sqlx-postgres does the same in its lib.rs).
24// Without this every `.bind(Option<...>)` resolves to the Postgres
25// driver and fails the executor type-check (mailrs embed round-12).
26use crate::database::Spg;
27sqlx_core::impl_encode_for_option!(Spg);