use crate::key::SnowflakeGenerator;
use akita_core::cfg_if;
use once_cell::sync::Lazy;
use std::sync::Arc;
pub mod shared;
cfg_if! {if #[cfg(any(
feature = "mysql-sync",
feature = "postgres-sync",
feature = "sqlite-sync",
feature = "oracle-sync",
feature = "mssql-sync"
))] {
pub mod blocking;
}}
cfg_if! {if #[cfg(any(
feature = "mysql-async",
feature = "postgres-async",
feature = "sqlite-async",
feature = "oracle-async",
feature = "mssql-async"
))]{
pub mod non_blocking;
}}
pub(crate) static GLOBAL_GENERATOR: Lazy<Arc<SnowflakeGenerator>> =
Lazy::new(|| Arc::new(SnowflakeGenerator::new()));