Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/IDatabaseWrapper.h @ 5466:dceed5e3d6a9 pg-transactions
new DB plugin primitive: UpdateAndGetStatistics
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 15 Dec 2023 17:15:43 +0100 |
parents | 176bc05f85f4 |
children | b3ebe249ed5b |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/IDatabaseWrapper.h Wed Dec 13 15:44:33 2023 +0100 +++ b/OrthancServer/Sources/Database/IDatabaseWrapper.h Fri Dec 15 17:15:43 2023 +0100 @@ -56,16 +56,19 @@ bool hasRevisionsSupport_; bool hasLabelsSupport_; bool hasAtomicIncrementGlobalProperty_; + bool hasUpdateAndGetStatistics_; public: Capabilities(bool hasFlushToDisk, bool hasRevisionsSupport, bool hasLabelsSupport, - bool hasAtomicIncrementGlobalProperty) + bool hasAtomicIncrementGlobalProperty, + bool hasUpdateAndGetStatistics) : hasFlushToDisk_(hasFlushToDisk), hasRevisionsSupport_(hasRevisionsSupport), hasLabelsSupport_(hasLabelsSupport), - hasAtomicIncrementGlobalProperty_(hasAtomicIncrementGlobalProperty) + hasAtomicIncrementGlobalProperty_(hasAtomicIncrementGlobalProperty), + hasUpdateAndGetStatistics_(hasUpdateAndGetStatistics) { } @@ -88,6 +91,12 @@ { return hasAtomicIncrementGlobalProperty_; } + + bool HasUpdateAndGetStatistics() const + { + return hasUpdateAndGetStatistics_; + } + }; struct CreateInstanceResult : public boost::noncopyable @@ -310,6 +319,13 @@ virtual int64_t IncrementGlobalProperty(GlobalProperty property, int64_t increment, bool shared) = 0; + + virtual void UpdateAndGetStatistics(int64_t& patientsCount, + int64_t& studiesCount, + int64_t& seriesCount, + int64_t& instancesCount, + int64_t& compressedSize, + int64_t& uncompressedSize) = 0; };