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 [] 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()

and is IMMEDIATE the right thing, or do I need EXCLUSIVE.

#define QUESTION ((bb) || (!bb)) /* Shakespeare */
sqlite-users mailing list
sqlite-users mailing list

Reply via email to