Replies: 4 comments
-
Could you please be more specific on: |
Beta Was this translation helpful? Give feedback.
-
@gwenn No diagnostics, it was just passing references around and problems with the borrow checker. We did make it work (see below), but I would like to know if you think a connection pool with FYI what started this is because Now we have both the connection pool (with timeouts disabled) and the single If useful for others, we did make it work with
Then we expose a fn like this:
Anywhere we need a connection in the code we just call the fn above and it works fine. And |
Beta Was this translation helpful? Give feedback.
-
I am afraid there is no best solution. For example, |
Beta Was this translation helpful? Give feedback.
-
Thanks @gwenn. It does seem like a connection pool is better then. We will stick with that, Closing the issue now. |
Beta Was this translation helpful? Give feedback.
-
We would like to keep a connection open for the life of the application. We are currently using
r2d2_sqlite
as a connection pool, and that works OK but we really do not need more than one connection. We triedlazy_static
with aMutex
and it is not compatible with the other fn calls we need to support.Is there a recommended way to do this with
rusqlite
?Beta Was this translation helpful? Give feedback.
All reactions