comparison 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
comparison
equal deleted inserted replaced
5248:a7d95f951f8a 5249:f22c8fac764b
3576 Operations operations; 3576 Operations operations;
3577 operations.Apply(*this, target, publicId, level); 3577 operations.Apply(*this, target, publicId, level);
3578 } 3578 }
3579 3579
3580 3580
3581 void StatelessDatabaseOperations::ListAllLabels(std::set<std::string>& target)
3582 {
3583 class Operations : public ReadOnlyOperationsT1<std::set<std::string>& >
3584 {
3585 public:
3586 virtual void ApplyTuple(ReadOnlyTransaction& transaction,
3587 const Tuple& tuple) ORTHANC_OVERRIDE
3588 {
3589 transaction.ListAllLabels(tuple.get<0>());
3590 }
3591 };
3592
3593 Operations operations;
3594 operations.Apply(*this, target);
3595 }
3596
3597
3581 void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId, 3598 void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId,
3582 ResourceType level, 3599 ResourceType level,
3583 const std::string& label, 3600 const std::string& label,
3584 LabelOperation operation) 3601 LabelOperation operation)
3585 { 3602 {