1mod common;
4pub mod database;
5mod keyvalue;
6mod macros;
7pub mod pool;
8pub mod stmt;
9pub mod value;
10
11pub use cdk_common::database::ConversionError;
12pub use common::{migrate, run_db_operation, run_db_operation_sync};
13
14#[cfg(feature = "mint")]
15pub mod mint;
16#[cfg(feature = "wallet")]
17pub mod wallet;
18
19#[cfg(all(test, feature = "prometheus"))]
20mod metrics_test_lock {
21 use tokio::sync::{Mutex, MutexGuard};
22
23 static METRICS_TEST_LOCK: Mutex<()> = Mutex::const_new(());
24
25 pub(crate) async fn lock() -> MutexGuard<'static, ()> {
26 METRICS_TEST_LOCK.lock().await
27 }
28}
29
30#[cfg(feature = "mint")]
31pub use mint::SQLMintDatabase;
32#[cfg(feature = "wallet")]
33pub use wallet::SQLWalletDatabase;