diff OrthancServer/Sources/Database/BaseDatabaseWrapper.cpp @ 5593:862b54b4cfe2 find-refactoring

implemented the default multi-stage find/expand
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 04 May 2024 11:35:34 +0200
parents bbe45a71f5cd
children 4640b7ae9a11
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/BaseDatabaseWrapper.cpp	Fri May 03 21:26:06 2024 +0200
+++ b/OrthancServer/Sources/Database/BaseDatabaseWrapper.cpp	Sat May 04 11:35:34 2024 +0200
@@ -23,6 +23,7 @@
 #include "BaseDatabaseWrapper.h"
 
 #include "../../../OrthancFramework/Sources/OrthancException.h"
+#include "Compatibility/GenericFind.h"
 
 namespace Orthanc
 {
@@ -45,6 +46,32 @@
   }
 
 
+  void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(FindResponse& response,
+                                                         const FindRequest& request,
+                                                         const std::vector<DatabaseConstraint>& normalized)
+  {
+    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+  }
+
+
+  void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(std::list<std::string>& identifiers,
+                                                         const FindRequest& request,
+                                                         const std::vector<DatabaseConstraint>& normalized)
+  {
+    Compatibility::GenericFind find(*this);
+    find.ExecuteFind(identifiers, request, normalized);
+  }
+
+
+  void BaseDatabaseWrapper::BaseTransaction::ExecuteExpand(FindResponse& response,
+                                                           const FindRequest& request,
+                                                           const std::string& identifier)
+  {
+    Compatibility::GenericFind find(*this);
+    find.ExecuteExpand(response, request, identifier);
+  }
+
+
   uint64_t BaseDatabaseWrapper::MeasureLatency()
   {
     throw OrthancException(ErrorCode_NotImplemented);  // only implemented in V4