diff OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp @ 5455:176bc05f85f4 pg-transactions

DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
author Alain Mazy <am@osimis.io>
date Thu, 07 Dec 2023 12:04:11 +0100
parents f22c8fac764b
children dceed5e3d6a9
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp	Wed Dec 06 14:20:33 2023 +0100
+++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp	Thu Dec 07 12:04:11 2023 +0100
@@ -43,7 +43,7 @@
 namespace Orthanc
 {
   class OrthancPluginDatabase::Transaction :
-    public IDatabaseWrapper::ITransaction,
+    public BaseDatabaseWrapper::BaseTransaction,
     public Compatibility::ICreateInstance,
     public Compatibility::IGetChildrenMetadata,
     public Compatibility::ILookupResources,
@@ -243,6 +243,11 @@
       that_.activeTransaction_ = NULL;
     }
 
+    virtual const IDatabaseWrapper::Capabilities& GetDatabaseCapabilities() const ORTHANC_OVERRIDE
+    {
+      return that_.GetDatabaseCapabilities();
+    }
+
     IDatabaseListener& GetDatabaseListener() const
     {
       return listener_;
@@ -1472,7 +1477,8 @@
     payload_(payload),
     activeTransaction_(NULL),
     fastGetTotalSize_(false),
-    currentDiskSize_(0)
+    currentDiskSize_(0),
+    dbCapabilities_(false, false, false, false)
   {
     static const char* const MISSING = "  Missing extension in database index plugin: ";