Closed
Description
Sometimes I need the pool, to construct other stuff in the application. It would be useful to access the state's internal pool, so that I don't need to have two of the same pool in my app's state. What do you think?
What I mean is that I don't want to have
#[derive(Clone, FromRef)]
pub struct AppState {
pub pool: PgPool,
pub tx_state: axum_sqlx_tx::State<sqlx::Postgres>,
}
And have only the tx_state
, since it already holds a pool.
Metadata
Metadata
Assignees
Labels
No labels