I'm currently building an application with actix-web
and sqlx
. What I've build as an architecture is very similar to this source.
This is basically a trait wrapping the db access, so far so good. But this assumes every single method will get a connection from the pool and execute it. There's no way to share a connection for a transactional workflow (e.g. SELECT FOR UPDATE ... process ... UPDATE).
With which achitecture or library could I achieve this?