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
//! Multi-backend database infrastructure.
//!
//! Transactional writes go through [sqlx]'s `Any` driver, so the backend
//! (Postgres, MySQL, or SQLite) is selected from the connection URL scheme.
//! Analytical reads go through a pluggable Arrow-based engine (DuckDB or
//! DataFusion), behind feature flags.
//!
//! - [`ConnectionManager`] — sqlx connection pool with auto-create DB
//! - [`Cache`] — DashMap-based concurrent key-value cache with named buckets
//! - [`BaseHandler`] — `execute_write` (sqlx) / `execute_read` (Arrow) /
//! `execute_read_as` (typed), plus transactional → analytical sync
//! - [`InitializationHandler`] — backend-aware DDL migration executor
//!
//! [sqlx]: https://docs.rs/sqlx
//!
//! # Example
//! ```no_run
//! use dbkit::ConnectionManager;
//!
//! # async fn example() -> Result<(), dbkit::DbkitError> {
//! // The URL scheme selects the backend: postgres:// , mysql:// , sqlite://
//! let conn = ConnectionManager::new("postgres://localhost/myapp").await?;
//!
//! // `pool()` yields a sqlx `AnyPool`, usable across all supported backends.
//! let _pool = conn.pool();
//! # Ok(())
//! # }
//! ```
//!
//! Note: the write/read handlers and migration runner are being ported onto
//! this pool; see the crate changelog for the current status.
pub use ;
pub use Cache;
pub use ;
pub use ;
pub use DbkitError;
pub use InitializationHandler;
pub use DbValue;
// Arrow contract — available whenever any analytical feature is on (embedded
// engine or remote source). `arrow` is re-exported so callers can inspect
// `RecordBatch`es with a version-matched arrow.
pub use ;
// Embedded analytical read engines.
pub use ReadEngine;
// Remote analytical sources (read) and sinks (bulk write).
pub use ;
// Re-export key sqlx types users will need
pub use ;
// Native Postgres pool (rich types) — see `ConnectionManager::pg_native_pool`.
// `PgHandler` is the rich-typed counterpart to `BaseHandler` (binds
// date/timestamp/json/uuid `DbValue`s natively and returns `PgRow`).
pub use PgHandler;
// `Row` is the trait that provides `PgRow::get` / `try_get`; callers need it in
// scope to read columns off the `PgRow`s returned by `PgHandler::query`.
pub use ;