diff OrthancServer/Sources/Database/StatelessDatabaseOperations.h @ 5237:cd2258ca7894 db-protobuf

log about missing support for labels
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Apr 2023 09:07:47 +0200
parents 3a61fd50f804
children 367e8af46cfd
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.h	Tue Apr 04 21:43:37 2023 +0200
+++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.h	Wed Apr 05 09:07:47 2023 +0200
@@ -166,14 +166,17 @@
     {
     private:
       ITransactionContext&  context_;
+      bool                  hasLabelsSupport_;
       
     protected:
       IDatabaseWrapper::ITransaction&  transaction_;
       
     public:
       explicit ReadOnlyTransaction(IDatabaseWrapper::ITransaction& transaction,
-                                   ITransactionContext& context) :
+                                   ITransactionContext& context,
+                                   bool hasLabelsSupport) :
         context_(context),
+        hasLabelsSupport_(hasLabelsSupport),
         transaction_(transaction)
       {
       }
@@ -183,6 +186,11 @@
         return context_;
       }
 
+      bool HasLabelsSupport() const
+      {
+        return hasLabelsSupport_;
+      }
+
       /**
        * Higher-level constructions
        **/
@@ -367,8 +375,9 @@
     {
     public:
       ReadWriteTransaction(IDatabaseWrapper::ITransaction& transaction,
-                           ITransactionContext& context) :
-        ReadOnlyTransaction(transaction, context)
+                           ITransactionContext& context,
+                           bool hasLabelsSupport) :
+        ReadOnlyTransaction(transaction, context, hasLabelsSupport)
       {
       }