Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
5465:2829889bfa57 | 5466:dceed5e3d6a9 |
---|---|
54 protected: | 54 protected: |
55 bool hasFlushToDisk_; | 55 bool hasFlushToDisk_; |
56 bool hasRevisionsSupport_; | 56 bool hasRevisionsSupport_; |
57 bool hasLabelsSupport_; | 57 bool hasLabelsSupport_; |
58 bool hasAtomicIncrementGlobalProperty_; | 58 bool hasAtomicIncrementGlobalProperty_; |
59 bool hasUpdateAndGetStatistics_; | |
59 | 60 |
60 public: | 61 public: |
61 Capabilities(bool hasFlushToDisk, | 62 Capabilities(bool hasFlushToDisk, |
62 bool hasRevisionsSupport, | 63 bool hasRevisionsSupport, |
63 bool hasLabelsSupport, | 64 bool hasLabelsSupport, |
64 bool hasAtomicIncrementGlobalProperty) | 65 bool hasAtomicIncrementGlobalProperty, |
66 bool hasUpdateAndGetStatistics) | |
65 : hasFlushToDisk_(hasFlushToDisk), | 67 : hasFlushToDisk_(hasFlushToDisk), |
66 hasRevisionsSupport_(hasRevisionsSupport), | 68 hasRevisionsSupport_(hasRevisionsSupport), |
67 hasLabelsSupport_(hasLabelsSupport), | 69 hasLabelsSupport_(hasLabelsSupport), |
68 hasAtomicIncrementGlobalProperty_(hasAtomicIncrementGlobalProperty) | 70 hasAtomicIncrementGlobalProperty_(hasAtomicIncrementGlobalProperty), |
71 hasUpdateAndGetStatistics_(hasUpdateAndGetStatistics) | |
69 { | 72 { |
70 } | 73 } |
71 | 74 |
72 bool HasFlushToDisk() const | 75 bool HasFlushToDisk() const |
73 { | 76 { |
86 | 89 |
87 bool HasAtomicIncrementGlobalProperty() const | 90 bool HasAtomicIncrementGlobalProperty() const |
88 { | 91 { |
89 return hasAtomicIncrementGlobalProperty_; | 92 return hasAtomicIncrementGlobalProperty_; |
90 } | 93 } |
94 | |
95 bool HasUpdateAndGetStatistics() const | |
96 { | |
97 return hasUpdateAndGetStatistics_; | |
98 } | |
99 | |
91 }; | 100 }; |
92 | 101 |
93 struct CreateInstanceResult : public boost::noncopyable | 102 struct CreateInstanceResult : public boost::noncopyable |
94 { | 103 { |
95 bool isNewPatient_; | 104 bool isNewPatient_; |
308 virtual const IDatabaseWrapper::Capabilities& GetDatabaseCapabilities() const = 0; | 317 virtual const IDatabaseWrapper::Capabilities& GetDatabaseCapabilities() const = 0; |
309 | 318 |
310 virtual int64_t IncrementGlobalProperty(GlobalProperty property, | 319 virtual int64_t IncrementGlobalProperty(GlobalProperty property, |
311 int64_t increment, | 320 int64_t increment, |
312 bool shared) = 0; | 321 bool shared) = 0; |
322 | |
323 virtual void UpdateAndGetStatistics(int64_t& patientsCount, | |
324 int64_t& studiesCount, | |
325 int64_t& seriesCount, | |
326 int64_t& instancesCount, | |
327 int64_t& compressedSize, | |
328 int64_t& uncompressedSize) = 0; | |
313 }; | 329 }; |
314 | 330 |
315 | 331 |
316 virtual ~IDatabaseWrapper() | 332 virtual ~IDatabaseWrapper() |
317 { | 333 { |