AlexPikalov / cdrs

Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async
Apache License 2.0
343 stars 58 forks source link

Connection pool for CDRS 2.x+ #355

Open bbarin opened 3 years ago

bbarin commented 3 years ago

It's more a question than an issue. I'm trying to use CDRS in an actix-web application. I would like to share the database session among the HTTP requests but for that, the struct must implement the Clonetrait. Given that, r2d2 would fit nicely. However, when trying to use TcpConnectionsManager to pass to a Poolfrom r2d2, I can only get a TransportTcp struct and not the Session itself. Am I missing something in order to get a proper session from the r2d2 pool?