comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.h @ 5220:df39c7583a49 db-protobuf

preparing virtual methods for labels
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Apr 2023 18:09:04 +0200
parents 0ea402b4d901
children d0f7c742d397
comparison
equal deleted inserted replaced
5218:afa96af2eb5a 5220:df39c7583a49
155 155
156 void ApplyLookupResources(std::list<std::string>& resourcesId, 156 void ApplyLookupResources(std::list<std::string>& resourcesId,
157 std::list<std::string>* instancesId, // Can be NULL if not needed 157 std::list<std::string>* instancesId, // Can be NULL if not needed
158 const std::vector<DatabaseConstraint>& lookup, 158 const std::vector<DatabaseConstraint>& lookup,
159 ResourceType queryLevel, 159 ResourceType queryLevel,
160 size_t limit) 160 const std::set<std::string>& withLabels,
161 { 161 const std::set<std::string>& withoutLabels,
162 return transaction_.ApplyLookupResources(resourcesId, instancesId, lookup, queryLevel, limit); 162 uint32_t limit)
163 {
164 return transaction_.ApplyLookupResources(resourcesId, instancesId, lookup, queryLevel, withLabels, withoutLabels, limit);
163 } 165 }
164 166
165 void GetAllMetadata(std::map<MetadataType, std::string>& target, 167 void GetAllMetadata(std::map<MetadataType, std::string>& target,
166 int64_t id) 168 int64_t id)
167 { 169 {
175 } 177 }
176 178
177 void GetAllPublicIds(std::list<std::string>& target, 179 void GetAllPublicIds(std::list<std::string>& target,
178 ResourceType resourceType, 180 ResourceType resourceType,
179 size_t since, 181 size_t since,
180 size_t limit) 182 uint32_t limit)
181 { 183 {
182 return transaction_.GetAllPublicIds(target, resourceType, since, limit); 184 return transaction_.GetAllPublicIds(target, resourceType, since, limit);
183 } 185 }
184 186
185 void GetChanges(std::list<ServerIndexChange>& target /*out*/, 187 void GetChanges(std::list<ServerIndexChange>& target /*out*/,
186 bool& done /*out*/, 188 bool& done /*out*/,
187 int64_t since, 189 int64_t since,
188 uint32_t maxResults) 190 uint32_t limit)
189 { 191 {
190 transaction_.GetChanges(target, done, since, maxResults); 192 transaction_.GetChanges(target, done, since, limit);
191 } 193 }
192 194
193 void GetChildrenInternalId(std::list<int64_t>& target, 195 void GetChildrenInternalId(std::list<int64_t>& target,
194 int64_t id) 196 int64_t id)
195 { 197 {
203 } 205 }
204 206
205 void GetExportedResources(std::list<ExportedResource>& target /*out*/, 207 void GetExportedResources(std::list<ExportedResource>& target /*out*/,
206 bool& done /*out*/, 208 bool& done /*out*/,
207 int64_t since, 209 int64_t since,
208 uint32_t maxResults) 210 uint32_t limit)
209 { 211 {
210 return transaction_.GetExportedResources(target, done, since, maxResults); 212 return transaction_.GetExportedResources(target, done, since, limit);
211 } 213 }
212 214
213 void GetLastChange(std::list<ServerIndexChange>& target /*out*/) 215 void GetLastChange(std::list<ServerIndexChange>& target /*out*/)
214 { 216 {
215 transaction_.GetLastChange(target); 217 transaction_.GetLastChange(target);
513 ResourceType resourceType); 515 ResourceType resourceType);
514 516
515 void GetAllUuids(std::list<std::string>& target, 517 void GetAllUuids(std::list<std::string>& target,
516 ResourceType resourceType, 518 ResourceType resourceType,
517 size_t since, 519 size_t since,
518 size_t limit); 520 uint32_t limit);
519 521
520 void GetGlobalStatistics(/* out */ uint64_t& diskSize, 522 void GetGlobalStatistics(/* out */ uint64_t& diskSize,
521 /* out */ uint64_t& uncompressedSize, 523 /* out */ uint64_t& uncompressedSize,
522 /* out */ uint64_t& countPatients, 524 /* out */ uint64_t& countPatients,
523 /* out */ uint64_t& countStudies, 525 /* out */ uint64_t& countStudies,
529 const std::string& instancePublicId, 531 const std::string& instancePublicId,
530 FileContentType contentType); 532 FileContentType contentType);
531 533
532 void GetChanges(Json::Value& target, 534 void GetChanges(Json::Value& target,
533 int64_t since, 535 int64_t since,
534 unsigned int maxResults); 536 uint32_t limit);
535 537
536 void GetLastChange(Json::Value& target); 538 void GetLastChange(Json::Value& target);
537 539
538 void GetExportedResources(Json::Value& target, 540 void GetExportedResources(Json::Value& target,
539 int64_t since, 541 int64_t since,
540 unsigned int maxResults); 542 uint32_t limit);
541 543
542 void GetLastExportedResource(Json::Value& target); 544 void GetLastExportedResource(Json::Value& target);
543 545
544 bool IsProtectedPatient(const std::string& publicId); 546 bool IsProtectedPatient(const std::string& publicId);
545 547
603 605
604 void ApplyLookupResources(std::vector<std::string>& resourcesId, 606 void ApplyLookupResources(std::vector<std::string>& resourcesId,
605 std::vector<std::string>* instancesId, // Can be NULL if not needed 607 std::vector<std::string>* instancesId, // Can be NULL if not needed
606 const DatabaseLookup& lookup, 608 const DatabaseLookup& lookup,
607 ResourceType queryLevel, 609 ResourceType queryLevel,
608 size_t limit); 610 const std::set<std::string>& withLabels,
611 const std::set<std::string>& withoutLabels,
612 uint32_t limit);
609 613
610 bool DeleteResource(Json::Value& remainingAncestor /* out */, 614 bool DeleteResource(Json::Value& remainingAncestor /* out */,
611 const std::string& uuid, 615 const std::string& uuid,
612 ResourceType expectedType); 616 ResourceType expectedType);
613 617