Minor db cleanup
This commit is contained in:
@@ -50,12 +50,6 @@ namespace lms::db
|
||||
prepare();
|
||||
}
|
||||
|
||||
~Connection() override
|
||||
{
|
||||
// make use of per-connection usage stats to optimize
|
||||
optimize();
|
||||
}
|
||||
|
||||
private:
|
||||
Connection& operator=(const Connection&) = delete;
|
||||
|
||||
@@ -72,13 +66,6 @@ namespace lms::db
|
||||
LMS_LOG(DB, DEBUG, "Setting per-connection settings done!");
|
||||
}
|
||||
|
||||
void optimize()
|
||||
{
|
||||
LMS_LOG(DB, DEBUG, "connection close: Running pragma optimize...");
|
||||
executeSql("PRAGMA optimize");
|
||||
LMS_LOG(DB, DEBUG, "connection close: pragma optimize complete");
|
||||
}
|
||||
|
||||
std::filesystem::path _dbPath;
|
||||
};
|
||||
}
|
||||
@@ -119,6 +106,9 @@ namespace lms::db
|
||||
}
|
||||
}
|
||||
|
||||
// For now, multiple databases are not handled
|
||||
assert(&tlsSession->getDb() == this);
|
||||
|
||||
return *tlsSession;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user