1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
macro_rules! impl_any_type {
($ty:ty) => {
impl crate::types::Type<crate::any::Any> for $ty {
fn type_info() -> crate::any::AnyTypeInfo {
unimplemented!()
}
fn compatible(ty: &crate::any::AnyTypeInfo) -> bool {
match &ty.0 {
#[cfg(feature = "postgres")]
crate::any::type_info::AnyTypeInfoKind::Postgres(ty) => {
<$ty as crate::types::Type<crate::postgres::Postgres>>::compatible(&ty)
}
#[cfg(feature = "mysql")]
crate::any::type_info::AnyTypeInfoKind::MySql(ty) => {
<$ty as crate::types::Type<crate::mysql::MySql>>::compatible(&ty)
}
#[cfg(feature = "sqlite")]
crate::any::type_info::AnyTypeInfoKind::Sqlite(ty) => {
<$ty as crate::types::Type<crate::sqlite::Sqlite>>::compatible(&ty)
}
#[cfg(feature = "mssql")]
crate::any::type_info::AnyTypeInfoKind::Mssql(ty) => {
<$ty as crate::types::Type<crate::mssql::Mssql>>::compatible(&ty)
}
}
}
}
};
}