From: Klaus Kaempf Date: Mon, 20 Aug 2007 12:28:16 +0000 (+0000) Subject: search conjunctive on multiple string with iterateResolvablesByKindsAndStrings X-Git-Tag: BASE-SuSE-Linux-10_3-Branch~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7225fe5e03a39d73872ff45e7dddb579f44c745a;p=platform%2Fupstream%2Flibzypp.git search conjunctive on multiple string with iterateResolvablesByKindsAndStrings --- diff --git a/zypp/cache/ResolvableQuery.cc b/zypp/cache/ResolvableQuery.cc index 636b13d..9979d0c 100644 --- a/zypp/cache/ResolvableQuery.cc +++ b/zypp/cache/ResolvableQuery.cc @@ -208,7 +208,7 @@ struct ResolvableQuery::Impl std::string s( *it_s ); if (it_s != strings.begin()) - sqlcmd += "OR"; + sqlcmd += "AND"; //FIXME: Implement MATCH_RESSUMM and MATCH_RESDESC diff --git a/zypp/cache/ResolvableQuery.h b/zypp/cache/ResolvableQuery.h index 4395baf..1904107 100644 --- a/zypp/cache/ResolvableQuery.h +++ b/zypp/cache/ResolvableQuery.h @@ -250,10 +250,11 @@ namespace zypp /** * \short Iterate resolvables by Kinds and Strings * \param kinds kinds to match, will be ORed - * \param names names to match, will be ORed + * \param names names to match, will be ANDed * \param flags MATCH_xxx, see above * \param fnc callback to send the data to. (Will be called once per result) * + * Beware: Searching for multiple strings with MATCH_EXACT will _not_ find anything, except if all strings are identical ... */ void iterateResolvablesByKindsAndStrings( const std::vector & kinds, const std::vector &strings, int flags, ProcessResolvable fnc );