autocommit transactions to sqlite db in python 3.6+
This commit is contained in:
parent
414d3e4312
commit
9c45df622a
6 changed files with 15 additions and 11 deletions
|
@ -34,7 +34,7 @@ class Queue(object):
|
|||
return self.db_file
|
||||
|
||||
def connect(self):
|
||||
conn = sqlite3.connect(self.get_db_file())
|
||||
conn = sqlite3.connect(self.get_db_file(), isolation_level=None)
|
||||
c = conn.cursor()
|
||||
c.execute('''CREATE TABLE IF NOT EXISTS {0} (
|
||||
entity text,
|
||||
|
|
|
@ -33,7 +33,7 @@ class SessionCache(object):
|
|||
DB_FILE = os.path.join(os.path.expanduser('~'), '.wakatime.db')
|
||||
|
||||
def connect(self):
|
||||
conn = sqlite3.connect(self.DB_FILE)
|
||||
conn = sqlite3.connect(self.DB_FILE, isolation_level=None)
|
||||
c = conn.cursor()
|
||||
c.execute('''CREATE TABLE IF NOT EXISTS session (
|
||||
value BLOB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue