Jeffrey Becker wrote:
> As a solution I suggest you come up
> with two slightly different schemas one with change-tracking and one
> without.  The disk file will be saved without change-tracking.  When
> you load a file, first create a connection to a :memory: database, set
> up your schema with change tracking, attach your file and pull the
> data from the file into your main database.  When you save, attach the
> file again and write the data out to it from main. While it may sound
> complex, a healthy dose of good object orientation can really help.

That's what I wanted to do to begin with, but I got challenged on it.

I saw an article on how to do this in tcl, but I'll have to see if I can 
figure out how to adapt that to C++. I'm assuming that I end up with a 
pointer to the in-memory database when I'm done?

As for the change tracking, I still haven't decided exactly what I want 
to do concerning that. I think you're probably right, that storing it in 
the file in disk will just bloat the files in the long run. Most of the 
time, we just use undo two or three times to backtrack from a mistake.

-- Darren

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to