Closed elpiel closed 4 years ago
The problems I've encountered here were that:
await!()
inside thread_localCurrent workaround was to implement it with the synchronous client and basically on each request make a new connection.
PRs #5 and #6 both tackle this problem using bb8
. It still looks quite ugly for the repository, but for now it's a start and it's using a Pool and it's async.
Further investigation should go into it, to see how we can make it easy for the Repositories to look and be more developer friendly.
Some improvements, i.e. separation of concern, were done in PR #42 for implementing the ToSql
& FromSql
for Domain Structs, since this cannot be done outside of domain
crate, we've created a wrapper tuple structs that will handle the conversion in the Postgres***Repository
implementations
closing in favour of #151
Create a Postgres async client to be used in Sentry with tokio_postgres