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
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2026 Kirky.X
// SPDX-License-Identifier: MIT
//! DBNexus Storage Adapters
//!
//! This module provides DBNexus-based implementations of Limiteron's storage traits.
//! All adapters use DBNexus for database operations, delegating all database
//! complexity to the DBNexus framework.
//!
//! # Features
//!
//! - **Complete trait implementations** - Storage, BanStorage, QuotaStorage
//! - **DBNexus integration** - Uses DBNexus entities and connection pooling
//! - **Async/await** - All operations are asynchronous
//! - **Thread-safe** - Uses `Arc<dyn Trait>` pattern for thread safety
//!
//! # Usage
//!
//! ```rust,no_run
//! use limiteron::adapters::{StorageFactory, DBNexusStorageAdapter, DBNexusBanStorageAdapter, DBNexusQuotaStorageAdapter};
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // 使用工厂创建存储
//! let mut factory = StorageFactory::from_dsn("postgresql://localhost/limiteron");
//! factory.initialize(None).await?;
//! let storage = factory.create_storage().await?;
//!
//! // 或直接使用适配器(需要已有连接池)
//! // let _adapter = DBNexusStorageAdapter::new(pool);
//!
//! Ok(())
//! }
//! ```
// Re-export adapters for convenient access
pub use DBNexusBanStorageAdapter;
pub use DBNexusQuotaStorageAdapter;
pub use DBNexusStorageAdapter;
// Re-export factory and related types
pub use ;