Hi,

Brief:
Should transactions be used for ensuring consistency between multiple
queries? And if so, after I've finished is there a reason why I should not
call commit?

Background:
I'm using SQLite for a web service.  The database reference is passed to
Page objects, which handle their specific url path.  Not all pages will
write data, but nearly all do multiple queries, which should be consistent
with eachother.  I was thinking that to simplify each page object's code, I
would pass a transaction reference instead, and then call rollback if the
page object returns an error, commit otherwise.

However, given that the page will read many times more often than it
writes, I'm wondering if this is a bad idea.

Thoughts?

Thanks.
--
Richard Warburton - MSc(Hons), PGDipSci, BE(Hons) +64 9 377-2881 ext 9
Senior Developer - http://www.skagerraksoftware.com/
Skagerrak Software - P.O.Box 56-710 / Level 1, 371 Dominion Road, Mt Eden,
Auckland 1024 NZ
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to