Closed dkotik closed 2 months ago
You will also need to pass in OpenSharedCache
(not on by default) in order for a pool of in-memory connections to work as you expect.
edit: I believe adding &cache=shared
will also work. If that's the case, the error message should probably be amended to include that to avoid future confusion.
edit: I believe adding &cache=shared will also work. If that's the case, the error message should probably be amended to include that to avoid future confusion.
This worked perfectly! You are amazing!
I will gladly submit a documentation PR - would you like me to? I write ok docs.
Sure, sounds good. 👍
Dear maintainer,
I use the sqlitex.Pool for simulating in-memory testing connections, but it does not appear to work when using
file:memory?mode=memory
with multiple connections as described below:::
between file and memory.I care about this, because my authorization code occasionally may make a database call, which will block the Pool, making this impossible to test. I can work around this by writing my own wrapper around the Pool and returning the same connection when in `file:memory:" mode, but I want to know if I am doing something wrong here, or may be there is a better way. Thank you!