Mercurial > hg > orthanc-databases
comparison Framework/Plugins/DatabaseBackendAdapterV3.cpp @ 260:793bbbe11287
IDatabaseBackend::HasRevisionsSupport()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Apr 2021 16:45:15 +0200 |
parents | e184dcadf163 |
children | 34e2b93a7ac1 |
comparison
equal
deleted
inserted
replaced
259:93a6efd7d8e5 | 260:793bbbe11287 |
---|---|
22 #include "DatabaseBackendAdapterV3.h" | 22 #include "DatabaseBackendAdapterV3.h" |
23 | 23 |
24 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 | 24 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 |
25 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | 25 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) |
26 | 26 |
27 #include <Logging.h> | |
27 #include <MultiThreading/SharedMessageQueue.h> | 28 #include <MultiThreading/SharedMessageQueue.h> |
28 | |
29 #include <OrthancException.h> | 29 #include <OrthancException.h> |
30 | 30 |
31 #include <stdexcept> | 31 #include <stdexcept> |
32 #include <list> | 32 #include <list> |
33 #include <string> | 33 #include <string> |
2059 new Adapter(backend, countConnections)) != OrthancPluginErrorCode_Success) | 2059 new Adapter(backend, countConnections)) != OrthancPluginErrorCode_Success) |
2060 { | 2060 { |
2061 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, "Unable to register the database backend"); | 2061 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, "Unable to register the database backend"); |
2062 } | 2062 } |
2063 | 2063 |
2064 if (backend->HasRevisionsSupport()) | |
2065 { | |
2066 LOG(INFO) << "The database backend *has* support for revisions of metadata and attachments"; | |
2067 } | |
2068 else | |
2069 { | |
2070 LOG(WARNING) << "The database backend has *no* support for revisions of metadata and attachments"; | |
2071 } | |
2072 | |
2064 backend->SetOutputFactory(new Factory); | 2073 backend->SetOutputFactory(new Factory); |
2065 | 2074 |
2066 isBackendInUse_ = true; | 2075 isBackendInUse_ = true; |
2067 } | 2076 } |
2068 | 2077 |