Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IndexBackend.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 |
---|---|
2063 // New primitive since Orthanc 1.5.2 | 2063 // New primitive since Orthanc 1.5.2 |
2064 void IndexBackend::LookupResources(IDatabaseBackendOutput& output, | 2064 void IndexBackend::LookupResources(IDatabaseBackendOutput& output, |
2065 DatabaseManager& manager, | 2065 DatabaseManager& manager, |
2066 const std::vector<Orthanc::DatabaseConstraint>& lookup, | 2066 const std::vector<Orthanc::DatabaseConstraint>& lookup, |
2067 OrthancPluginResourceType queryLevel, | 2067 OrthancPluginResourceType queryLevel, |
2068 const std::set<std::string>& withLabels, | |
2069 const std::set<std::string>& withoutLabels, | |
2068 uint32_t limit, | 2070 uint32_t limit, |
2069 bool requestSomeInstance) | 2071 bool requestSomeInstance) |
2070 { | 2072 { |
2073 if (!withLabels.empty() || | |
2074 !withoutLabels.empty()) | |
2075 { | |
2076 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | |
2077 } | |
2078 | |
2071 LookupFormatter formatter(manager.GetDialect()); | 2079 LookupFormatter formatter(manager.GetDialect()); |
2072 | 2080 |
2073 std::string sql; | 2081 std::string sql; |
2074 Orthanc::ISqlLookupFormatter::Apply(sql, formatter, lookup, | 2082 Orthanc::ISqlLookupFormatter::Apply(sql, formatter, lookup, |
2075 Orthanc::Plugins::Convert(queryLevel), limit); | 2083 Orthanc::Plugins::Convert(queryLevel), limit); |
2607 assert(result.instanceId != -1); | 2615 assert(result.instanceId != -1); |
2608 } | 2616 } |
2609 #endif | 2617 #endif |
2610 | 2618 |
2611 | 2619 |
2620 void IndexBackend::AddLabel(int64_t resource, | |
2621 const std::string& label) | |
2622 { | |
2623 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | |
2624 } | |
2625 | |
2626 | |
2627 void IndexBackend::RemoveLabel(int64_t resource, | |
2628 const std::string& label) | |
2629 { | |
2630 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | |
2631 } | |
2632 | |
2633 | |
2634 void IndexBackend::ListLabels(std::set<std::string>& target, | |
2635 int64_t resource) | |
2636 { | |
2637 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | |
2638 } | |
2639 | |
2640 | |
2612 void IndexBackend::Register(IndexBackend* backend, | 2641 void IndexBackend::Register(IndexBackend* backend, |
2613 size_t countConnections, | 2642 size_t countConnections, |
2614 unsigned int maxDatabaseRetries) | 2643 unsigned int maxDatabaseRetries) |
2615 { | 2644 { |
2616 if (backend == NULL) | 2645 if (backend == NULL) |