emmental/db/sql.py
Anna Schumaker 9cf1df7c33 db: Move SQLite Connection stuff into a new file
I find this cleaner than importing from the toplevel module

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-07 13:58:09 -04:00

12 lines
282 B
Python

# Copyright 2021 (c) Anna Schumaker.
import lib
import sqlite3
File = lib.data.emmental_data / "emmental.sqlite"
Connection = sqlite3.connect(File, detect_types=sqlite3.PARSE_DECLTYPES)
Connection.row_factory = sqlite3.Row
commit = Connection.commit
execute = Connection.execute