@ Stephan Beal

"Every instance of a :memory: db is a unique instance, so you cannot have 
multiple connections to a single :memory: db."

>> I know, this is one of the various reasons that made my solution not really 
>> ideal

@ Simon Slavin

"There's a PRAGMA for storing and retrieving a 'user-version' in the database:

<https://www.sqlite.org/pragma.html#pragma_schema_version>

It's not used by SQLite itself, you can use it to store any 32-bit signed 
integer.  So you could store a different number to each of your databases and 
check to see whether the user-version of one connection is the same as that 
from a different connection."

>> That's a good idea, but this 'user-version' pragma is persistent and stored 
>> on disk. So it's difficult to use in my case : if the user quit the 
>> application and restart it without loading the same databases (or in the 
>> same order) assigning 'user-version' id will be really difficult.

In fact, I expected something like a unique memory address (void*) per database.

Thanks.

Reply via email to