Is there a good way to copy a memory db to disk, when that memory db uses the FTS1 module?
I've got code that uses a memory db, then copies it to disk. I use the trick of copying the schema to disk with this: diskdb transaction { memdb eval {SELECT sql FROM sqlite_master WHERE sql NOT NULL} { diskdb eval $sql } } ... and then iterating over the contents of each table in memory, copying it to the disk db. This has worked up to now, but when I added the use of FTS1 to my code, it stopped working. The problem is that when I create a virtual table it magically creates other tables (*_content and *_term). Now, I can ignore those when duplicating the schema and copying the data but that seems quite fragile since in the future those tables might not be created or be created with different names. Given that, is there a reliable, portable way to copy a memory db to disk, when that db makes use of the FTS1 module? What I really pine for is "memdb save disk.db" that saves a memory db "membd" to a disk database "disk.db". Up til now that wasn't necessary since it's easy enough to copy tables, but now with some extra, mostly-hidden tables that have to be in sync with virtual tables, that's a bit more difficult. -- Bryan Oakley ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------