comparison 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
comparison
equal deleted inserted replaced
5592:1e2631b8b9af 5593:862b54b4cfe2
21 21
22 22
23 #include "BaseDatabaseWrapper.h" 23 #include "BaseDatabaseWrapper.h"
24 24
25 #include "../../../OrthancFramework/Sources/OrthancException.h" 25 #include "../../../OrthancFramework/Sources/OrthancException.h"
26 #include "Compatibility/GenericFind.h"
26 27
27 namespace Orthanc 28 namespace Orthanc
28 { 29 {
29 int64_t BaseDatabaseWrapper::BaseTransaction::IncrementGlobalProperty(GlobalProperty property, 30 int64_t BaseDatabaseWrapper::BaseTransaction::IncrementGlobalProperty(GlobalProperty property,
30 int64_t increment, 31 int64_t increment,
43 { 44 {
44 throw OrthancException(ErrorCode_NotImplemented); // Not supported 45 throw OrthancException(ErrorCode_NotImplemented); // Not supported
45 } 46 }
46 47
47 48
49 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(FindResponse& response,
50 const FindRequest& request,
51 const std::vector<DatabaseConstraint>& normalized)
52 {
53 throw OrthancException(ErrorCode_NotImplemented); // Not supported
54 }
55
56
57 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(std::list<std::string>& identifiers,
58 const FindRequest& request,
59 const std::vector<DatabaseConstraint>& normalized)
60 {
61 Compatibility::GenericFind find(*this);
62 find.ExecuteFind(identifiers, request, normalized);
63 }
64
65
66 void BaseDatabaseWrapper::BaseTransaction::ExecuteExpand(FindResponse& response,
67 const FindRequest& request,
68 const std::string& identifier)
69 {
70 Compatibility::GenericFind find(*this);
71 find.ExecuteExpand(response, request, identifier);
72 }
73
74
48 uint64_t BaseDatabaseWrapper::MeasureLatency() 75 uint64_t BaseDatabaseWrapper::MeasureLatency()
49 { 76 {
50 throw OrthancException(ErrorCode_NotImplemented); // only implemented in V4 77 throw OrthancException(ErrorCode_NotImplemented); // only implemented in V4
51 } 78 }
52 } 79 }