Closed jparr721 closed 5 years ago
r2d2_foodb is a separate crate, not a separate module. It's a stand-in for the interface for whatever database you're using. There's a list of them in the readme: https://github.com/sfackler/r2d2/blob/master/README.md
Forgive me for the confusion here. I see exactly what you mean now.
Hi, I noticed the tutorial for this piece of Diesel rs is a bit lackluster. I am attempting to use r2d2 for its connection pool capabilities, but I have noticed it's kind of hard to get started with the example given.
A cursory glance of this code still leaves me confused about how I may go about implementing this in my own system. For example, you import r2d2, but you use a connection manager for a separate r2d2 module, r2d2::foodb. After reading the source code for an example of how I can emulate this desired behavior, I have not been able to find what I am looking for. What is "foodb" and how does it get created as an external crate in this case?
Would you be willing to provide a more complete example of how this system works? It is still quite confusing in its current state.