Hi all,
Just reading the sqlite-user mailing list I found here
http://www.mail-archive.com/sqlite-users@sqlite.org/msg01521.html
that there is a way to dump from memory databases to file databases. What we are trying in our database is to ATTACH a read-only database and make changes to it in MEMORY. We don't want to save the changes, just be able to make updates to same rows.
Yes, I can do a schema like:
ATTACH 'abc.db' AS external; BEGIN; DELETE FROM xyz; INSERT INTO xyz SELECT * FROM external.xyz; ... COMMIT; DETACH external;
But the "abc.db" is usually modified, and is a mess to have to change the code (+recompile) for every table added
or changed. I just want to create an exact copy of it in memory, do updates and some selects, and then discard changes. Something like "ATTACH INMEMORY 'file.db' AS external"
Do you think is there a way clean way to do it?
Thanks in advance, Ricard