Would you be interested in a pool implementation? #238
Replies: 1 comment 1 reply
-
My stance, so far, has been that if you want a pool, prepared statement cache, etc, you should use I'm not opposed to connection pooling, but it's one less thing for me to maintain. And I fully expect that a prepared statement cache is the follow-up request (not necessarily from you, but the next person that decides to use the pool). I've also tried hard to avoid inventing new APIs: the low level ones I copy from SQLite as closely as possible, There aren't many battle tested, low level, connection pool APIs for SQLite; crawshaw is one, so if I was to build one, I'd mostly likely copy from there. |
Beta Was this translation helpful? Give feedback.
-
I have a pool implementation that I use when I'm using the SQLite API directly. Would you be interested in adding it to the package?
What I'd propose is that I give you the code here; you could then take it and make it your own, so to speak. (If you'd rather have a pull request we can do that too. I thought this approach might be more efficient, but maybe not.)
The API is about what you'd expect:
Here's a somewhat stripped down example of its use, also about what you'd expect:
Beta Was this translation helpful? Give feedback.
All reactions