py.lib
29:b8fc22566efd
Go to Latest
py.lib/db/sqlite.py
. Устанавливаем значение по умолчанию для нового лога
3 from sqlite3 import Error, IntegrityError
6 def __init__(self, db_file):
7 self._conn = sqlite3.connect(db_file)
8 self._ex = self._conn.execute
9 self.commit = self._conn.commit
10 self.rollback = self._conn.rollback
13 self._ex("PRAGMA journal=WAL")
14 self._ex("PRAGMA foreign_keys=ON")
24 def __call__(self, *a, **kwa):
25 cur = self._conn.cursor()
26 cur.execute(*a, **kwa)
29 def cq(self, *a, **wa):