//! # dbpool - PostgreSQL Connection Pool
//!
//! A simple, production-ready connection pool for PostgreSQL with async/await support.
//!
//! ## ⚠️ DOGFOOD NOTICE
//!
//! This library contains **intentional violations** for Aphoria code-level truth
//! linting demonstration. These violations are deliberately introduced to showcase
//! Aphoria's detection capabilities:
//!
//! ### Configuration Violations (5)
//! - **Unbounded max_connections**: No upper limit prevents connection exhaustion
//! - **Plaintext password**: Connection string contains unencrypted credentials
//! - **Missing max_lifetime**: Stale connections never recycled
//! - **Excessive connection_timeout**: 60s timeout exceeds 30s safety limit
//! - **Zero min_connections**: No connection warm-up degrades cold-start performance
//!
//! ### Operational Violations (2)
//! - **No connection validation**: Connections returned without health checks
//! - **No observability**: Missing metrics prevent monitoring pool health
//!
//! **Expected Detection**: 7-8 violations with BLOCK/FLAG/WARNING verdicts
//!
//! ## Example Usage
//!
//! ```no_run
//! use dbpool::{PoolConfig, ConnectionPool};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let config = PoolConfig::default();
//!     let mut pool = ConnectionPool::new(config)?;
//!
//!     let conn = pool.get().await?;
//!     // Use connection...
//!     pool.return_connection(conn).await;
//!
//!     Ok(())
//! }
//! ```
//!
//! ## Remediation Path
//!
//! This library will progress through violation remediation in Day 4:
//! 1. Fix unbounded configuration (add max_connections)
//! 2. Secure credentials (environment variable or secrets manager)
//! 3. Add lifecycle management (max_lifetime)
//! 4. Tune timeouts (reduce connection_timeout to 30s)
//! 5. Add validation (pre-checkout health checks)
//! 6. Expose metrics (pool utilization, wait times)
//!
//! See `docs/SUCCESS-STORY.md` for complete before/after analysis.

pub mod config;
pub mod connection;
pub mod error;
pub mod pool;

pub use config::PoolConfig;
pub use connection::Connection;
pub use error::{PoolError, Result};
pub use pool::ConnectionPool;
