Fixed compile without SQL dbs

This commit is contained in:
mdecimus
2024-04-07 17:39:58 +02:00
parent 841b8000c4
commit 44f531ecf9
3 changed files with 20 additions and 4 deletions

View File

@@ -677,6 +677,18 @@ impl Store {
pub fn is_none(&self) -> bool {
matches!(self, Self::None)
}
pub fn is_sql(&self) -> bool {
match self {
#[cfg(feature = "sqlite")]
Store::SQLite(_) => true,
#[cfg(feature = "postgres")]
Store::PostgreSQL(_) => true,
#[cfg(feature = "mysql")]
Store::MySQL(_) => true,
_ => false,
}
}
}
impl std::fmt::Debug for Store {