X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=db.cpp;h=c3e647cf46343885360c58007da9d970aabe80af;hb=c786b9e247c7169e7a8097b37259dfa6ecd5a953;hp=9b0de352fda7bafb3ae8c107181325bdefca7508;hpb=92cca212dad5e4b968c052d8200a534473929674;p=nageru diff --git a/db.cpp b/db.cpp index 9b0de35..c3e647c 100644 --- a/db.cpp +++ b/db.cpp @@ -15,6 +15,9 @@ DB::DB(const std::string &filename) sqlite3_exec(db, R"( CREATE TABLE IF NOT EXISTS state (state BLOB); )", nullptr, nullptr, nullptr); // Ignore errors. + + sqlite3_exec(db, "PRAGMA journal_mode=WAL", nullptr, nullptr, nullptr); // Ignore errors. + sqlite3_exec(db, "PRAGMA synchronous=NORMAL", nullptr, nullptr, nullptr); // Ignore errors. } StateProto DB::get_state()