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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! Adapter layer for protocol integration
//!
//! This module provides trait-based adapters that bridge HeliosDB Full's
//! interfaces to HeliosDB Lite's implementations. These adapters enable
//! protocol handlers (PostgreSQL, MySQL, etc.) to work with Lite's storage
//! and query execution engines.
//!
//! # Architecture
//!
//! The adapter layer follows the Adapter design pattern, providing:
//!
//! - **Storage Adapter**: Bridges Full's LsmStorageEngine to Lite's RocksDB engine
//! - **Query Executor Adapter**: Bridges Full's QueryExecutor to Lite's SQL executor
//! - **Pub/Sub Adapter**: Implements PostgreSQL LISTEN/NOTIFY mechanism
//! - **Connection Pool**: Manages database connections efficiently
//!
//! # Usage
//!
//! ```rust,no_run
//! use heliosdb_nano::protocols::adapters::{
//! LiteStorageAdapter,
//! LiteQueryExecutorAdapter,
//! PubSubManager,
//! ConnectionPool,
//! PoolConfig,
//! };
//! use heliosdb_nano::{StorageEngine, Config, Result};
//! use std::sync::Arc;
//!
//! # fn main() -> Result<()> {
//! // Create storage engine
//! let config = Config::in_memory();
//! let engine = Arc::new(StorageEngine::open_in_memory(&config)?);
//!
//! // Create storage adapter
//! let storage_adapter = LiteStorageAdapter::new(Arc::clone(&engine));
//!
//! // Create query executor adapter
//! let executor_adapter = LiteQueryExecutorAdapter::new(Arc::clone(&engine));
//!
//! // Create pub/sub manager
//! let pubsub = PubSubManager::new();
//!
//! // Create connection pool
//! let pool_config = PoolConfig::new()
//! .with_min_size(5)
//! .with_max_size(20);
//! let pool = ConnectionPool::new(pool_config)?;
//! # Ok(())
//! # }
//! ```
//!
//! # Thread Safety
//!
//! All adapters are thread-safe and can be shared across multiple threads
//! using `Arc`. The storage engine and connection pool use internal locking
//! to ensure safe concurrent access.
pub use ;
pub use ;
pub use ;
pub use ;