16 lines
419 B
Python
16 lines
419 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, check_same_thread=False)
|
|
Connection.row_factory = sqlite3.Row
|
|
|
|
commit = Connection.commit
|
|
execute = Connection.execute
|
|
|
|
def optimize():
|
|
Connection.execute("PRAGMA analysis_limit=1000")
|
|
Connection.execute("PRAGMA optimize")
|