Open wsanchez opened 6 years ago
IIRC, according to @glyph, the issue here is that SQLite doesn't work at all with Alchmia, because SQLite doesn't get along with multiple threads.
So… either Alchmia should prevent the use of threads when one is using SQLite, or, the example code on the README
file should stop using SQLite as an example, because presently its lying.
IIRC, according to @glyph, the issue here is that SQLite doesn't work at all with Alchmia, because SQLite doesn't get along with multiple threads.
Wait, what? SQLite works fine with Alchimia. There are lots of unit tests showing that it does. SQLite's in-memory store can't easily be accessed by multiple threads, because there's no way that I'm aware of to get discrete "Connection" objects pointing at the same data structure.
So… either Alchmia should prevent the use of threads when one is using SQLite, or, the example code on the
README
file should stop using SQLite as an example, because presently its lying.
The example code should probably be modified to use a disk file, yeah.
I've got some code that creates a SQLite DB, populates a schema, then writes some data.
If the SQLite DB is a file, this seems to work as expected:
However, if the SQLite DB is an in-memory DB, it fails, complaining that the table being written to doesn't exist:
The difference between these two runs is whether line 71 or line 72 is commented out.