Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 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 | 450ac804d3af |
children | d0f7c742d397 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Mon Apr 03 17:00:12 2023 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Mon Apr 03 18:09:04 2023 +0200 @@ -1066,7 +1066,7 @@ void StatelessDatabaseOperations::GetAllUuids(std::list<std::string>& target, ResourceType resourceType, size_t since, - size_t limit) + uint32_t limit) { if (limit == 0) { @@ -1646,7 +1646,9 @@ { // TODO - CANDIDATE FOR "TransactionType_Implicit" std::list<std::string> tmp; - transaction.ApplyLookupResources(tmp, NULL, query_, level_, 0); + std::set<std::string> withLabels; + std::set<std::string> withoutLabels; + transaction.ApplyLookupResources(tmp, NULL, query_, level_, withLabels, withoutLabels, 0); CopyListToVector(result_, tmp); } }; @@ -1915,9 +1917,12 @@ std::vector<std::string>* instancesId, const DatabaseLookup& lookup, ResourceType queryLevel, - size_t limit) + const std::set<std::string>& withLabels, + const std::set<std::string>& withoutLabels, + uint32_t limit) { - class Operations : public ReadOnlyOperationsT4<bool, const std::vector<DatabaseConstraint>&, ResourceType, size_t> + class Operations : public ReadOnlyOperationsT6<bool, const std::vector<DatabaseConstraint>&, ResourceType, + const std::set<std::string>&, const std::set<std::string>&, size_t> { private: std::list<std::string> resourcesList_; @@ -1940,11 +1945,13 @@ // TODO - CANDIDATE FOR "TransactionType_Implicit" if (tuple.get<0>()) { - transaction.ApplyLookupResources(resourcesList_, &instancesList_, tuple.get<1>(), tuple.get<2>(), tuple.get<3>()); + transaction.ApplyLookupResources( + resourcesList_, &instancesList_, tuple.get<1>(), tuple.get<2>(), tuple.get<3>(), tuple.get<4>(), tuple.get<5>()); } else { - transaction.ApplyLookupResources(resourcesList_, NULL, tuple.get<1>(), tuple.get<2>(), tuple.get<3>()); + transaction.ApplyLookupResources( + resourcesList_, NULL, tuple.get<1>(), tuple.get<2>(), tuple.get<3>(), tuple.get<4>(), tuple.get<5>()); } } }; @@ -1954,7 +1961,7 @@ NormalizeLookup(normalized, lookup, queryLevel); Operations operations; - operations.Apply(*this, (instancesId != NULL), normalized, queryLevel, limit); + operations.Apply(*this, (instancesId != NULL), normalized, queryLevel, withLabels, withoutLabels, limit); CopyListToVector(resourcesId, operations.GetResourcesList());