If by explicitly, you mean starting my own transactions, then I guess I'll be doing it as you are. I do not even want to think about savepoints and figuring out what has to be re-done. My transactions, while numerous, will be pretty simple and mostly quite quick, so there's not much advantage to redoing over just delaying. Besides, I'm not sure I know how to detect a conflict that would has caused or should cause a rollback.
On Tue, Sep 20, 2016 at 12:21 PM, David Raymond <david.raym...@tomtom.com> wrote: > Your understanding of the isolation_level parameter there is correct. It > only effects how the <implicit> transactions are created. If you're going > to be doing a few selects before you update then <explicitly> doing the > "begin someSortOf transaction;" is what you want. > > After having some trouble getting savepoints to work correctly I've gotten > into the habit of always doing isolation_level = None, and doing everything > explicitly, but as long as you know what's going on then you're good. > > > -----Original Message----- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Kevin O'Gorman > Sent: Tuesday, September 20, 2016 12:35 PM > To: sqlite-users > Subject: [sqlite] Consistency, rollback and such > > I'm also wondering if setting > conn = sqlite3.connect("mydb", isolation_level=IMMEDIATE) > does what I need. Reading the docs, it would appear this does not start a > transaction until the UPDATE, and I think I want the transactions to start > before the first SELECT. Should I instead do > c = conn.cursor() > c.execuite("BEGIN TRANSACTION IMMEDIATE") > > and is IMMEDIATE the right thing, or do I need EXCLUSIVE. > > > -- > #define QUESTION ((bb) || (!bb)) /* Shakespeare */ > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- #define QUESTION ((bb) || (!bb)) /* Shakespeare */ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users