py.lib
13:cab7fedf8432
Go to Latest
py.lib/db/sqlite.py
.. Реструктуризация
5 def __init__(self, db_file):
6 self._con = sqlite3.connect(db_file)
7 self._ex = self._con.execute
8 self.commit = self._con.commit
9 self.rollback = self._con.rollback
12 self._ex("PRAGMA journal=WAL")
22 def __call__(self, *a, **kwa):
23 cur = self._con.cursor()
24 cur.execute(*a, **kwa)
27 def cq(self, *a, **wa):
32 except Exception as e: