Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp @ 5517:0d433132b249 pg-transactions
refactoring IDatabaseWrapper::Capabilities
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 Jan 2024 19:19:52 +0100 |
parents | 4dd50c4b985a |
children | 2c5eb1ef26a0 |
comparison
equal
deleted
inserted
replaced
5516:d9c9f3c57f4f | 5517:0d433132b249 |
---|---|
276 // Don't throw exception in destructors | 276 // Don't throw exception in destructors |
277 that_.errorDictionary_.LogError(code, true); | 277 that_.errorDictionary_.LogError(code, true); |
278 } | 278 } |
279 } | 279 } |
280 | 280 |
281 virtual const IDatabaseWrapper::Capabilities& GetDatabaseCapabilities() const ORTHANC_OVERRIDE | 281 virtual const Capabilities GetDatabaseCapabilities() const ORTHANC_OVERRIDE |
282 { | 282 { |
283 return that_.GetDatabaseCapabilities(); | 283 return that_.GetDatabaseCapabilities(); |
284 } | 284 } |
285 | 285 |
286 virtual void Rollback() ORTHANC_OVERRIDE | 286 virtual void Rollback() ORTHANC_OVERRIDE |
1085 void* database, | 1085 void* database, |
1086 const std::string& serverIdentifier) : | 1086 const std::string& serverIdentifier) : |
1087 library_(library), | 1087 library_(library), |
1088 errorDictionary_(errorDictionary), | 1088 errorDictionary_(errorDictionary), |
1089 database_(database), | 1089 database_(database), |
1090 serverIdentifier_(serverIdentifier), | 1090 serverIdentifier_(serverIdentifier) |
1091 dbCapabilities_(false, /* hasFlushToDisk */ | |
1092 false, /* revision support is updated in open() */ | |
1093 false, /* hasLabelsSupport */ | |
1094 false, /* hasAtomicIncrementGlobalProperty */ | |
1095 false, /* hasUpdateAndGetStatistics */ | |
1096 false /* hasMeasureLatency */) | |
1097 | 1091 |
1098 { | 1092 { |
1099 CLOG(INFO, PLUGINS) << "Identifier of this Orthanc server for the global properties " | 1093 CLOG(INFO, PLUGINS) << "Identifier of this Orthanc server for the global properties " |
1100 << "of the custom database: \"" << serverIdentifier << "\""; | 1094 << "of the custom database: \"" << serverIdentifier << "\""; |
1101 | 1095 |
1203 CheckSuccess(backend_.open(database_)); | 1197 CheckSuccess(backend_.open(database_)); |
1204 | 1198 |
1205 // update the db capabilities | 1199 // update the db capabilities |
1206 uint8_t hasRevisions; | 1200 uint8_t hasRevisions; |
1207 CheckSuccess(backend_.hasRevisionsSupport(database_, &hasRevisions)); | 1201 CheckSuccess(backend_.hasRevisionsSupport(database_, &hasRevisions)); |
1208 dbCapabilities_.hasRevisionsSupport_ = (hasRevisions != 0); | 1202 dbCapabilities_.SetRevisionsSupport(hasRevisions != 0); |
1209 } | 1203 } |
1210 | 1204 |
1211 | 1205 |
1212 void OrthancPluginDatabaseV3::Close() | 1206 void OrthancPluginDatabaseV3::Close() |
1213 { | 1207 { |