mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-10 23:30:53 +00:00
Use a cursor for PRAGMAs
This commit is contained in:
parent
236f0ec59c
commit
03244c4f96
1 changed files with 4 additions and 2 deletions
|
@ -68,8 +68,10 @@ class SbyStatusDb:
|
||||||
|
|
||||||
self.db = sqlite3.connect(path, isolation_level=None, timeout=timeout)
|
self.db = sqlite3.connect(path, isolation_level=None, timeout=timeout)
|
||||||
self.db.row_factory = sqlite3.Row
|
self.db.row_factory = sqlite3.Row
|
||||||
self.db.execute("PRAGMA journal_mode=WAL")
|
cur = self.db.cursor()
|
||||||
self.db.execute("PRAGMA synchronous=0")
|
cur.execute("PRAGMA journal_mode=WAL")
|
||||||
|
cur.execute("PRAGMA synchronous=0")
|
||||||
|
self.db.commit()
|
||||||
|
|
||||||
if setup:
|
if setup:
|
||||||
self._setup()
|
self._setup()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue