sqlx_utils/types/
mod.rs

1use crate::mod_def;
2
3mod_def! {!export
4    pub(crate) mod query;
5    pub(crate) mod pool;
6    pub(crate) mod db;
7}
8
9macro_rules! db_type {
10    ($vis:vis type $ident:ident = [$any_ty:ty, $pg_ty:ty, $mysql_ty:ty, $sqlite_ty:ty]) => {
11        #[cfg(feature = "any")]
12        $vis type $ident = $any_ty;
13
14        #[cfg(all(feature = "postgres", not(any(feature = "sqlite", feature = "mysql", feature = "any"))))]
15        $vis type $ident = $pg_ty;
16
17        #[cfg(all(feature = "mysql", not(any(feature = "sqlite", feature = "any", feature = "postgres"))))]
18        $vis type $ident = $mysql_ty;
19
20        #[cfg(all(feature = "sqlite", not(any(feature = "any", feature = "mysql", feature = "postgres"))))]
21        $vis type $ident = $sqlite_ty;
22    };
23}
24pub(crate) use db_type;