Use write ahead logging in sqlite3 connection
This commit is contained in:
parent
256abc6222
commit
34f37667ef
@ -4,10 +4,14 @@ from app.types import Order
|
||||
|
||||
|
||||
def connect(connection_string):
|
||||
return sqlite3.connect(
|
||||
connection = sqlite3.connect(
|
||||
connection_string, detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES
|
||||
)
|
||||
|
||||
connection.execute("pragma journal_mode=wal")
|
||||
|
||||
return connection
|
||||
|
||||
|
||||
def apply_database_schema(connection):
|
||||
connection.execute(
|
||||
|
Loading…
x
Reference in New Issue
Block a user