phonograph/interim-models/src/client.rs

16 lines
335 B
Rust
Raw Normal View History

2025-08-04 13:59:42 -07:00
use sqlx::{PgConnection, Postgres, pool::PoolConnection};
pub struct AppDbClient {
pub(crate) conn: PoolConnection<Postgres>,
}
impl AppDbClient {
pub fn from_pool_conn(conn: PoolConnection<Postgres>) -> Self {
Self { conn }
}
pub fn get_conn(&mut self) -> &mut PgConnection {
&mut self.conn
}
}