Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5523:d82cc7c9720a pg-transactions
comment
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 31 Jan 2024 09:26:31 +0100 |
parents | dd430a1b21fe |
children | 9a431368801b |
comparison
equal
deleted
inserted
replaced
5522:dd430a1b21fe | 5523:d82cc7c9720a |
---|---|
1107 /* out */ uint64_t& countPatients, | 1107 /* out */ uint64_t& countPatients, |
1108 /* out */ uint64_t& countStudies, | 1108 /* out */ uint64_t& countStudies, |
1109 /* out */ uint64_t& countSeries, | 1109 /* out */ uint64_t& countSeries, |
1110 /* out */ uint64_t& countInstances) | 1110 /* out */ uint64_t& countInstances) |
1111 { | 1111 { |
1112 // new code that updates and gets all statistics. | 1112 // Code introduced in Orthanc 1.12.3 that updates and gets all statistics. |
1113 // I.e, PostgreSQL now store "changes" to apply to the statistics to prevent row locking | 1113 // I.e, PostgreSQL now store "changes" to apply to the statistics to prevent row locking |
1114 // of the GlobalIntegers table while multiple clients are inserting/deleting new resources. | 1114 // of the GlobalIntegers table while multiple clients are inserting/deleting new resources. |
1115 // Then, the statistics are updated when requested to make sure they are correct. | 1115 // Then, the statistics are updated when requested to make sure they are correct. |
1116 class Operations : public IReadWriteOperations | 1116 class Operations : public IReadWriteOperations |
1117 { | 1117 { |
1153 { | 1153 { |
1154 transaction.UpdateAndGetStatistics(countPatients_, countStudies_, countSeries_, countInstances_, diskSize_, uncompressedSize_); | 1154 transaction.UpdateAndGetStatistics(countPatients_, countStudies_, countSeries_, countInstances_, diskSize_, uncompressedSize_); |
1155 } | 1155 } |
1156 }; | 1156 }; |
1157 | 1157 |
1158 // legacy oprations that reads each entry individualy | 1158 // Compatibility with Orthanc SDK <= 1.12.2 that reads each entry individualy |
1159 class LegacyOperations : public ReadOnlyOperationsT6<uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&> | 1159 class LegacyOperations : public ReadOnlyOperationsT6<uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&> |
1160 { | 1160 { |
1161 public: | 1161 public: |
1162 virtual void ApplyTuple(ReadOnlyTransaction& transaction, | 1162 virtual void ApplyTuple(ReadOnlyTransaction& transaction, |
1163 const Tuple& tuple) ORTHANC_OVERRIDE | 1163 const Tuple& tuple) ORTHANC_OVERRIDE |