# HG changeset patch # User Sebastien Jodogne # Date 1721376548 -7200 # Node ID 3fd4d5833c55738d4124079f6a9e48298e9c9839 # Parent 3f97590cc0c95876053175b73054b8a35a05cac4 removed StatelessDatabaseOperations::ApplyLookupResources() diff -r 3f97590cc0c9 -r 3fd4d5833c55 OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp --- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Fri Jul 19 10:06:39 2024 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Fri Jul 19 10:09:08 2024 +0200 @@ -1564,77 +1564,6 @@ } - void StatelessDatabaseOperations::ApplyLookupResources(std::vector& resourcesId, - std::vector* instancesId, - const DatabaseLookup& lookup, - ResourceType queryLevel, - const std::set& labels, - LabelsConstraint labelsConstraint, - uint32_t limit) - { - class Operations : public ReadOnlyOperationsT6&, LabelsConstraint, size_t> - { - private: - std::list resourcesList_; - std::list instancesList_; - - public: - const std::list& GetResourcesList() const - { - return resourcesList_; - } - - const std::list& GetInstancesList() const - { - return instancesList_; - } - - virtual void ApplyTuple(ReadOnlyTransaction& transaction, - const Tuple& tuple) ORTHANC_OVERRIDE - { - // TODO - CANDIDATE FOR "TransactionType_Implicit" - if (tuple.get<0>()) - { - 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>(), tuple.get<4>(), tuple.get<5>()); - } - } - }; - - if (!labels.empty() && - !db_.GetDatabaseCapabilities().HasLabelsSupport()) - { - throw OrthancException(ErrorCode_NotImplemented, "The database backend doesn't support labels"); - } - - for (std::set::const_iterator it = labels.begin(); it != labels.end(); ++it) - { - ServerToolbox::CheckValidLabel(*it); - } - - DatabaseConstraints normalized; - - assert(mainDicomTagsRegistry_.get() != NULL); - mainDicomTagsRegistry_->NormalizeLookup(normalized, lookup, queryLevel); - - Operations operations; - operations.Apply(*this, (instancesId != NULL), normalized, queryLevel, labels, labelsConstraint, limit); - - CopyListToVector(resourcesId, operations.GetResourcesList()); - - if (instancesId != NULL) - { - CopyListToVector(*instancesId, operations.GetInstancesList()); - } - } - - bool StatelessDatabaseOperations::DeleteResource(Json::Value& remainingAncestor, const std::string& uuid, ResourceType expectedType) diff -r 3f97590cc0c9 -r 3fd4d5833c55 OrthancServer/Sources/Database/StatelessDatabaseOperations.h --- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Fri Jul 19 10:06:39 2024 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Fri Jul 19 10:09:08 2024 +0200 @@ -625,14 +625,6 @@ const std::string& publicId, ResourceType parentType); - void ApplyLookupResources(std::vector& resourcesId, - std::vector* instancesId, // Can be NULL if not needed - const DatabaseLookup& lookup, - ResourceType queryLevel, - const std::set& labels, - LabelsConstraint labelsConstraint, - uint32_t limit); - bool DeleteResource(Json::Value& remainingAncestor /* out */, const std::string& uuid, ResourceType expectedType);