1
0
Fork 0
forked from 2sys/phonograph
phonograph/interim-models/src/client.rs
2025-10-09 08:00:53 +00:00

16 lines
352 B
Rust

use sqlx::{PgConnection, Postgres, pool::PoolConnection};
#[derive(Debug)]
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
}
}