I am working with IN-MEMORY database.
When my program starts I load data from file-system DB into my IN-MEMORY DB.
All other SQL operations are performed directly on my IN-MEMORY database.
This is in order to keep performance high.
However, I have a requirement that my original file-system database will remain
updated with the program modifications every few seconds.
My idea to implement this was to have a worker-thread that will work as follows:
void WorkerThread()
{
// Initialize SQLite online-backup ONCE:
p = sqlite3_backup_init(...);
loop{
Sleep(5 seconds);
// Save only intermediate changes (?)
sqlite3_backup_step(p, -1); // Backup all modifications from last time
} while( program is running);
// No program is exiting...
// Release object resources
sqlite3_backup_finish(p);
}
The problem is that I see that first time around all data is saved, but all
follwing calls to 'sqlite3_backup_step()' do not save anything.
My question:
Is there a way to use this online-backup system in an incremental way: that it
will save only difference from last time BUT ALL the difference from last time?
Many thanks, John
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users