Closed dimfeld closed 3 years ago
Right now you have to do &mut state.pg.acquire().await.unwrap().conn. By implementing the Executor trait from sqlx this can just be &state.pg.
&mut state.pg.acquire().await.unwrap().conn
Executor
sqlx
&state.pg
Implemented using a macro for now due to lifetime issues on Pool Executor. Could be better but I'll come back to this again in the future.
Right now you have to do
&mut state.pg.acquire().await.unwrap().conn
. By implementing theExecutor
trait fromsqlx
this can just be&state.pg
.