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
//! Reusable Postgres + DuckDB database infrastructure.
//!
//! Provides the foundational components for projects that use Postgres for
//! writes and optionally DuckDB for analytical reads:
//!
//! - [`ConnectionManager`] — Postgres connection pool with auto-create DB
//! - [`Cache`] — DashMap-based concurrent key-value cache with named buckets
//! - [`BaseHandler`] — Unified `execute_write` (Postgres) / `execute_read` (DuckDB)
//! - [`InitializationHandler`] — Batch DDL migration executor
//!
//! # Example
//! ```no_run
//! use dbkit::{ConnectionManager, BaseHandler, InitializationHandler};
//!
//! # async fn example() -> Result<(), dbkit::DbkitError> {
//! let conn = ConnectionManager::new("postgres://localhost/myapp").await?;
//! let pool = std::sync::Arc::new(conn.pool().clone());
//!
//! // Run migrations
//! let init = InitializationHandler::new(pool.clone());
//! let sql = "CREATE TABLE IF NOT EXISTS users (id SERIAL PRIMARY KEY, name TEXT)";
//! init.run_migrations(sql).await?;
//!
//! // Use the handler for queries
//! let handler = BaseHandler::new(pool);
//! # Ok(())
//! # }
//! ```
pub use ;
pub use Cache;
pub use ;
pub use ;
pub use DbkitError;
pub use InitializationHandler;
// DuckDB types only available with the feature
pub use ;
// Re-export key types users will need
pub use Pool;
pub use Row as PgRow;