Open mu-arch opened 3 years ago
Maybe you should write your own ManageConnection
instead of using bb8-postgres, which can deal with a type that is wrapped around tokio_postgres::Client
(and potentially Deref
s to it)?
(If it's generic enough I'd be happy to accept it into bb8-postgres and maintain it.)
I have the following code:
I want to prepare a number of queries using this for every connection. However, I'm struggling to think of a way to actually get the reference to the prepared statements for a specific connection. Is there a way to bind some data to the connection object, or at least a way to get some unique identifier for a connection that I could use to lookup their prepared statements in a hash table?