diff OrthancServer/SQLiteDatabaseWrapper.h @ 3080:1a75595d8e44 db-changes

started refactoring of ServerIndex::Store()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 03 Jan 2019 18:21:22 +0100
parents ead8576a02ef
children 847a0ed92654
line wrap: on
line diff
--- a/OrthancServer/SQLiteDatabaseWrapper.h	Thu Jan 03 14:03:39 2019 +0100
+++ b/OrthancServer/SQLiteDatabaseWrapper.h	Thu Jan 03 18:21:22 2019 +0100
@@ -36,6 +36,7 @@
 #include "IDatabaseWrapper.h"
 
 #include "../Core/SQLite/Connection.h"
+#include "Search/Compatibility/ICompatibilityCreateInstance.h"
 
 namespace Orthanc
 {
@@ -49,7 +50,9 @@
    * translates low-level requests into SQL statements. Mutual
    * exclusion MUST be implemented at a higher level.
    **/
-  class SQLiteDatabaseWrapper : public IDatabaseWrapper
+  class SQLiteDatabaseWrapper :
+    public IDatabaseWrapper,
+    public Compatibility::ICompatibilityCreateInstance
   {
   private:
     class Transaction;
@@ -320,5 +323,17 @@
                                       ResourceType queryLevel,
                                       size_t limit)
       ORTHANC_OVERRIDE;
+
+    virtual bool CreateInstance(CreateInstanceResult& result,
+                                int64_t& instanceId,
+                                const std::string& patient,
+                                const std::string& study,
+                                const std::string& series,
+                                const std::string& instance,
+                                bool overwrite)
+    {
+      return ICompatibilityCreateInstance::Apply(
+        result, instanceId, *this, *this, patient, study, series, instance, overwrite);
+    }
   };
 }