sfackler / r2d2

A generic connection pool for Rust
Apache License 2.0
1.51k stars 82 forks source link

Can I use it on cassandra? #82

Open pili2026 opened 5 years ago

pili2026 commented 5 years ago

Because I did not see information about cassandra on the list, so if i want to build like Sql, is there a related way?

sfackler commented 5 years ago

This crate's readme mentions r2d2: https://github.com/AlexPikalov/cdrs

pili2026 commented 5 years ago

Because I use cassandra-sys-rs and build an executable program. But the connection was too time-consuming to build, so I wondered if I could use it in casandra-sys-rs?

sfackler commented 5 years ago

Sure, if you make a type that implements this trait: https://docs.rs/r2d2/0.8.4/r2d2/trait.ManageConnection.html