Removed method from public interface

This commit is contained in:
emeric
2025-07-09 07:54:54 +02:00
parent 764c92698c
commit ef42bba0b0
4 changed files with 6 additions and 7 deletions
+2 -1
View File
@@ -20,6 +20,7 @@
#pragma once
#include <mutex>
#include <string>
#include <vector>
#include <Wt/Dbo/SqlConnectionPool.h>
@@ -37,7 +38,7 @@ namespace lms::db
Session& getTLSSession() override;
void executeSql(const std::string& sql) override;
void executeSql(const std::string& sql);
private:
Db(const Db&) = delete;
+3 -3
View File
@@ -67,7 +67,7 @@ namespace lms::db::Migration
class ScopedNoForeignKeys
{
public:
ScopedNoForeignKeys(IDb& db)
ScopedNoForeignKeys(Db& db)
: _db{ db }
{
_db.executeSql("PRAGMA foreign_keys=OFF");
@@ -83,7 +83,7 @@ namespace lms::db::Migration
ScopedNoForeignKeys& operator=(const ScopedNoForeignKeys&) = delete;
ScopedNoForeignKeys& operator=(ScopedNoForeignKeys&&) = delete;
IDb& _db;
Db& _db;
};
namespace
@@ -1422,7 +1422,7 @@ WHERE art.image_id IS NULL)");
{
constexpr std::string_view outdatedMsg{ "Outdated database, please rebuild it (delete the .db file and restart)" };
ScopedNoForeignKeys noPragmaKeys{ session.getDb() };
ScopedNoForeignKeys noPragmaKeys{ static_cast<Db&>(session.getDb()) };
using MigrationFunction = std::function<void(Session&)>;
+1 -1
View File
@@ -360,7 +360,7 @@ namespace lms::db
// We manually take a lock here since vacuum cannot be inside a transaction
{
std::unique_lock lock{ static_cast<Db&>(_db).getMutex() };
_db.executeSql("VACUUM");
static_cast<Db&>(_db).executeSql("VACUUM");
}
LMS_LOG(DB, INFO, "Vacuum complete!");