Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5249:f22c8fac764b db-protobuf
added "/tools/labels" to list all the labels that are associated with any resource
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Apr 2023 22:54:57 +0200 |
parents | a7d95f951f8a |
children | c04230962098 5053a10da5a2 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Fri Apr 07 22:18:37 2023 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Fri Apr 07 22:54:57 2023 +0200 @@ -3578,6 +3578,23 @@ } + void StatelessDatabaseOperations::ListAllLabels(std::set<std::string>& target) + { + class Operations : public ReadOnlyOperationsT1<std::set<std::string>& > + { + public: + virtual void ApplyTuple(ReadOnlyTransaction& transaction, + const Tuple& tuple) ORTHANC_OVERRIDE + { + transaction.ListAllLabels(tuple.get<0>()); + } + }; + + Operations operations; + operations.Apply(*this, target); + } + + void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId, ResourceType level, const std::string& label,