Hi,

I have a program that uses sqlite to do bookkeeping for another set of data. I 
do a commit on sqlite once I'm certain the other set of data is done. While 
I'm waiting for the other set of data to process, I might make other changes 
to my Sqlite database. However, I don't want to commit the stuff made after I 
started to process the other set of data.

In short, I want a "commit to savepoint savepoint-name" which commits up until 
a savepoint begins, but not anything after.

Here's more or less what I need:

A * sqlite gets some inserts
B * we're at a checkpoint, so everything after this point shouldn't get 
committed now. So "savepoint SP"
C * insert some more into sqlite
D * The checkpoint is ready to go, so we do "commit to savepoint SP"
E * now, on-disk, the sqlite db contains everything in step A, but nothing in 
step C

In this example, doing the commit at D is the same as doing in between A and 
B.

Is there a way to do this today? How hard would it be to add "commit to 
savepoint" if not?

Thanks,

Charles

ps: I think the documentation on savepoint is a little bit unclear on if 
"rollback to savepoint" and "release savepoint" keep the savepoint in question 
as the active savepoint.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to