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
    }
}
