# HG changeset patch # User Sebastien Jodogne # Date 1734345540 -3600 # Node ID 09fe1b384a20c0f2b647ab04b6b57536197a9ee8 # Parent ce2a754600ef705cd1b3868b60127cf9ae24ae9e fix SQLite build diff -r ce2a754600ef -r 09fe1b384a20 Framework/Plugins/IndexBackend.h --- a/Framework/Plugins/IndexBackend.h Mon Dec 16 11:25:15 2024 +0100 +++ b/Framework/Plugins/IndexBackend.h Mon Dec 16 11:39:00 2024 +0100 @@ -83,7 +83,8 @@ uint32_t limit); public: - explicit IndexBackend(OrthancPluginContext* context, bool readOnly); + explicit IndexBackend(OrthancPluginContext* context, + bool readOnly); virtual OrthancPluginContext* GetContext() ORTHANC_OVERRIDE { @@ -457,7 +458,6 @@ virtual bool HasPerformDbHousekeeping() ORTHANC_OVERRIDE; virtual void PerformDbHousekeeping(DatabaseManager& manager) ORTHANC_OVERRIDE; - #endif diff -r ce2a754600ef -r 09fe1b384a20 Framework/Plugins/IndexConnectionsPool.cpp --- a/Framework/Plugins/IndexConnectionsPool.cpp Mon Dec 16 11:25:15 2024 +0100 +++ b/Framework/Plugins/IndexConnectionsPool.cpp Mon Dec 16 11:39:00 2024 +0100 @@ -95,6 +95,12 @@ { throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); } + else if (backend->HasPerformDbHousekeeping() && + houseKeepingDelaySeconds == 0) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, + "The delay between two executions of housekeeping cannot be zero second"); + } else { context_ = backend_->GetContext(); diff -r ce2a754600ef -r 09fe1b384a20 SQLite/Plugins/IndexPlugin.cpp --- a/SQLite/Plugins/IndexPlugin.cpp Mon Dec 16 11:25:15 2024 +0100 +++ b/SQLite/Plugins/IndexPlugin.cpp Mon Dec 16 11:39:00 2024 +0100 @@ -70,7 +70,8 @@ OrthancDatabases::IndexBackend::Register( new OrthancDatabases::SQLiteIndex(context, "index.db"), // TODO parameter 1 /* only 1 connection is possible with SQLite */, - 0 /* no collision is possible, as SQLite has a global lock */); + 0 /* no collision is possible, as SQLite has a global lock */, + 0 /* housekeeping delay, unused for SQLite */); } catch (Orthanc::OrthancException& e) { diff -r ce2a754600ef -r 09fe1b384a20 SQLite/Plugins/SQLiteIndex.cpp --- a/SQLite/Plugins/SQLiteIndex.cpp Mon Dec 16 11:25:15 2024 +0100 +++ b/SQLite/Plugins/SQLiteIndex.cpp Mon Dec 16 11:39:00 2024 +0100 @@ -191,7 +191,7 @@ SQLiteIndex::SQLiteIndex(OrthancPluginContext* context, const std::string& path) : - IndexBackend(context), + IndexBackend(context, false /* not read-only */), path_(path), fast_(true) { @@ -203,7 +203,7 @@ SQLiteIndex::SQLiteIndex(OrthancPluginContext* context) : - IndexBackend(context), + IndexBackend(context, false /* not read-only */), fast_(true) { } diff -r ce2a754600ef -r 09fe1b384a20 SQLite/Plugins/SQLiteIndex.h --- a/SQLite/Plugins/SQLiteIndex.h Mon Dec 16 11:25:15 2024 +0100 +++ b/SQLite/Plugins/SQLiteIndex.h Mon Dec 16 11:39:00 2024 +0100 @@ -76,10 +76,19 @@ virtual void ExecuteFind(Orthanc::DatabasePluginMessages::TransactionResponse& response, DatabaseManager& manager, const Orthanc::DatabasePluginMessages::Find_Request& request) ORTHANC_OVERRIDE; +#endif +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5) virtual void ExecuteCount(Orthanc::DatabasePluginMessages::TransactionResponse& response, DatabaseManager& manager, const Orthanc::DatabasePluginMessages::Find_Request& request) ORTHANC_OVERRIDE; #endif + +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5) + virtual bool HasChildCountTable() const ORTHANC_OVERRIDE + { + return false; + } +#endif }; }