swadhinbiswas feat(core): add async database ORM with connection pooling and migrations · 7/7/2026
a55c5f9
30 lines · 712 Bytes
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
//! Database integration: connection pooling, migrations, query building.
//!
//! Feature-gated behind `db` — enabled by default in the Python package.
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use justapi_core::db::{PoolManager, DatabaseConfig, DbKind};
//!
//! # async fn example() {
//! let config = DatabaseConfig {
//!     kind: DbKind::Postgres,
//!     url: "postgres://user:pass@localhost/mydb".into(),
//!     max_connections: 10,
//! };
//! let mut mgr = PoolManager::new();
//! let pool = mgr.init("default", config).await.unwrap();
//! # }
//! ```

pub mod migrations;
pub mod model;
pub mod pool;
pub mod query;

pub use migrations::*;
pub use model::*;
pub use pool::*;
pub use query::*;