2021-10-07 13:58:09 -04:00
|
|
|
# Copyright 2021 (c) Anna Schumaker.
|
|
|
|
import lib
|
|
|
|
import sqlite3
|
|
|
|
|
|
|
|
File = lib.data.emmental_data / "emmental.sqlite"
|
|
|
|
|
2021-11-20 17:03:18 -05:00
|
|
|
Connection = sqlite3.connect(File, detect_types=sqlite3.PARSE_DECLTYPES, check_same_thread=False)
|
2021-10-07 13:58:09 -04:00
|
|
|
Connection.row_factory = sqlite3.Row
|
|
|
|
|
|
|
|
commit = Connection.commit
|
|
|
|
execute = Connection.execute
|
2021-12-09 22:09:40 -05:00
|
|
|
|
|
|
|
def optimize():
|
|
|
|
Connection.execute("PRAGMA analysis_limit=1000")
|
|
|
|
Connection.execute("PRAGMA optimize")
|