comparison OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp @ 5681:77875b51cf95 find-refactoring

integration mainline->find-refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Jul 2024 10:15:15 +0200
parents 3f13db27b399 68fc5af30c03
children 023a99146dd0 7030fa489669
comparison
equal deleted inserted replaced
5679:527918e9c5d9 5681:77875b51cf95
796 } 796 }
797 797
798 798
799 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, 799 virtual void ApplyLookupResources(std::list<std::string>& resourcesId,
800 std::list<std::string>* instancesId, // Can be NULL if not needed 800 std::list<std::string>* instancesId, // Can be NULL if not needed
801 const std::vector<DatabaseConstraint>& lookup, 801 const DatabaseConstraints& lookup,
802 ResourceType queryLevel, 802 ResourceType queryLevel,
803 const std::set<std::string>& labels, 803 const std::set<std::string>& labels,
804 LabelsConstraint labelsConstraint, 804 LabelsConstraint labelsConstraint,
805 uint32_t limit) ORTHANC_OVERRIDE 805 uint32_t limit) ORTHANC_OVERRIDE
806 { 806 {
810 } 810 }
811 811
812 std::vector<OrthancPluginDatabaseConstraint> constraints; 812 std::vector<OrthancPluginDatabaseConstraint> constraints;
813 std::vector< std::vector<const char*> > constraintsValues; 813 std::vector< std::vector<const char*> > constraintsValues;
814 814
815 constraints.resize(lookup.size()); 815 constraints.resize(lookup.GetSize());
816 constraintsValues.resize(lookup.size()); 816 constraintsValues.resize(lookup.GetSize());
817 817
818 for (size_t i = 0; i < lookup.size(); i++) 818 for (size_t i = 0; i < lookup.GetSize(); i++)
819 { 819 {
820 lookup[i].EncodeForPlugins(constraints[i], constraintsValues[i]); 820 lookup.GetConstraint(i).EncodeForPlugins(constraints[i], constraintsValues[i]);
821 } 821 }
822 822
823 CheckSuccess(that_.backend_.lookupResources(transaction_, lookup.size(), 823 CheckSuccess(that_.backend_.lookupResources(transaction_, lookup.GetSize(),
824 (lookup.empty() ? NULL : &constraints[0]), 824 (lookup.IsEmpty() ? NULL : &constraints[0]),
825 Plugins::Convert(queryLevel), 825 Plugins::Convert(queryLevel),
826 limit, (instancesId == NULL ? 0 : 1))); 826 limit, (instancesId == NULL ? 0 : 1)));
827 CheckNoEvent(); 827 CheckNoEvent();
828 828
829 uint32_t count; 829 uint32_t count;