Mercurial > hg > orthanc-databases
comparison Framework/Plugins/DatabaseBackendAdapterV4.cpp @ 391:d14e6ff04a5c db-protobuf
added primitives to handle labels
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 12:09:46 +0200 |
parents | 3d6886f3e5b3 |
children | 7b3acfa95bd8 |
comparison
equal
deleted
inserted
replaced
390:eb80f7c5e7d8 | 391:d14e6ff04a5c |
---|---|
565 lookup.push_back(Orthanc::DatabaseConstraint(c)); | 565 lookup.push_back(Orthanc::DatabaseConstraint(c)); |
566 } | 566 } |
567 | 567 |
568 assert(values.size() == countValues); | 568 assert(values.size() == countValues); |
569 | 569 |
570 std::set<std::string> withLabels, withoutLabels; | |
571 | |
572 for (int i = 0; i < request.with_labels().size(); i++) | |
573 { | |
574 withLabels.insert(request.with_labels(i)); | |
575 } | |
576 | |
577 for (int i = 0; i < request.without_labels().size(); i++) | |
578 { | |
579 withoutLabels.insert(request.without_labels(i)); | |
580 } | |
581 | |
570 Output output(response); | 582 Output output(response); |
571 backend.LookupResources(output, manager, lookup, Convert(request.query_level()), | 583 backend.LookupResources(output, manager, lookup, Convert(request.query_level()), |
572 request.limit(), request.retrieve_instances_ids()); | 584 withLabels, withoutLabels, request.limit(), request.retrieve_instances_ids()); |
573 } | 585 } |
574 | 586 |
575 | 587 |
576 static void ProcessTransactionOperation(Orthanc::DatabasePluginMessages::TransactionResponse& response, | 588 static void ProcessTransactionOperation(Orthanc::DatabasePluginMessages::TransactionResponse& response, |
577 const Orthanc::DatabasePluginMessages::TransactionRequest& request, | 589 const Orthanc::DatabasePluginMessages::TransactionRequest& request, |