3 ms·
In general I agree, but in this case, even those three sentences could be very useful to many. I remember when I first started playing with SQLite, looking at
by TeMPOraL 2y ago
In general I agree, but in this case, even those three sentences could be very useful to many.
I remember when I first started playing with SQLite, looking at some project using it, browsing some examples, skimming the SQL side of the docs - I had an impression that it's customary to open a single connection to a given SQLite database, and use it throughout the entire program. And I mean, it feels logical - it's a file database, and you wouldn't fopen() the same file independently several times and write to it when there's even a remote chance you'll end up doing so concurrently, even on a single thread.
So it's valuable to spell it out up front that yes, you can and should open multiple connections to the same SQLite database.