libzypp 17.31.23
zypp::PoolQuery Class Reference

Meta-data query API. More...

#include <PoolQuery.h>

Inheritance diagram for zypp::PoolQuery:

Classes

class  Impl
 

Public Types

enum  StatusFilter { ALL = 0 , INSTALLED_ONLY = 1 , UNINSTALLED_ONLY = 2 }
 Installed status filter setters. More...
 
typedef std::set< ResKindKinds
 
typedef std::set< std::string > StrContainer
 
typedef std::map< sat::SolvAttr, StrContainerAttrRawStrMap
 
typedef detail::PoolQueryIterator const_iterator
 
typedef unsigned int size_type
 
typedef function< bool(const sat::Solvable &)> ProcessResolvable
 
- Public Types inherited from zypp::sat::SolvIterMixin< PoolQuery, detail::PoolQueryIterator >
typedef size_t size_type
 
typedef detail::PoolQueryIterator Solvable_iterator
 
typedef transform_iterator< asPoolItem, Solvable_iteratorPoolItem_iterator
 
typedef transform_iterator< ui::asSelectable, UnifiedSolvable_iteratorSelectable_iterator
 

Public Member Functions

 PoolQuery ()
 
 ~PoolQuery ()
 
const_iterator begin () const
 Query result accessers.
 
const_iterator end () const
 An iterator pointing to the end of the query result.
 
bool empty () const
 Whether the result is empty.
 
size_type size () const
 Number of solvables in the query result.
 
void execute (ProcessResolvable fnc)
 Executes the query with the current settings.
 
void addKind (const ResKind &kind)
 Filter by selectable kind.
 
void addRepo (const std::string &repoalias)
 Filter by repo.
 
void setComment (const std::string &comment) const
 Set an optional comment string describing the purpose of the query.
 
void setInstalledOnly ()
 Return only @System repo packages.
 
void setUninstalledOnly ()
 Return only packages from repos other than @System.
 
void setStatusFilterFlags (StatusFilter flags)
 Set status filter directly.
 
void addString (const std::string &value)
 Add a global query string.
 
void addAttribute (const sat::SolvAttr &attr, const std::string &value="")
 Filter by the value of the specified attr attribute.
 
Filter by dependencies matching a broken down capability <tt>name [op edition]</tt> and/or architecture.

The capabilities name part may be defined as query string like with addAttribute.

Globing and regex are supported. Global query strings defined by addString are considered.

So without any op edition arch addDependency behaves the same as addAttribute. If an edition range is given, matches are restricted accordingly. There are various overloads, so pick the one you like best.

An optional arch argument will additionally require the matching solvable to be of this arch.

{
setCaseSensitive( false );
addDependency( sat::SolvAttr::provides, "kde*", Edition("2.0") ); // same as above
}
{
setCaseSensitive( false );
addString( "kde*" );
addDependency( sat::SolvAttr::provides, Edition("2.0") ); // same as above
}
Edition represents [epoch:]version[-release]
Definition: Edition.h:61
void addString(const std::string &value)
Add a global query string.
Definition: PoolQuery.cc:881
void setCaseSensitive(bool value=true)
Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag).
Definition: PoolQuery.cc:1018
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition)
Query "name|global op edition".
Definition: PoolQuery.cc:887
void setMatchGlob()
Set to match globs.
Definition: PoolQuery.cc:965
static const SolvAttr provides
Definition: SolvAttr.h:60
static const Rel EQ
Definition: Rel.h:50
Note
Thre's also a version of addDependency provided, that takes a complete Capability as argument. This always requires an exact match of the name part (as the resolver would do it).

This is the list of valid dependency attributes:

SolvAttr::provides
SolvAttr::obsoletes
SolvAttr::conflicts
SolvAttr::requires
SolvAttr::recommends
SolvAttr::suggests
SolvAttr::supplements
SolvAttr::enhances
Note
What happens if a non dependency attribute is passed?< > If an edition range is given, it is matched against the matching solvables edition instead. Without edition range it behaves the same as addAttribute.
// Find all packages providing "kernel > 2.0"
// // Find all packages named "kernel" and with edition "> 2.0"
static const SolvAttr name
Definition: SolvAttr.h:52
static const Rel GT
Definition: Rel.h:54
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition)
 Query "name|global op edition".
 
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition, const Arch &arch, Match::Mode mode)
 
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Edition &edition)
 
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Edition &edition, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr, const std::string &name)
 
void addDependency (const sat::SolvAttr &attr, const std::string &name, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr, const Rel &op, const Edition &edition)
 
void addDependency (const sat::SolvAttr &attr, const Rel &op, const Edition &edition, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr, const Edition &edition)
 
void addDependency (const sat::SolvAttr &attr, const Edition &edition, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr)
 
void addDependency (const sat::SolvAttr &attr, const Arch &arch)
 
void addDependency (const sat::SolvAttr &attr, Capability cap_r)
 
void setEdition (const Edition &edition, const Rel &op=Rel::EQ)
 Set version condition.
 
Text Matching Options
Note
The implementation treats an empty search string as <it>"match always"</it>. So if you want to actually match an empty value, try ( "^$", setMatchRegex ).
void setCaseSensitive (bool value=true)
 Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag).
 
void setFilesMatchFullPath (bool value=true)
 If set (default), look at the full path when searching in filelists.
 
void setFilesMatchBasename (bool value=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setMatchExact ()
 Set to match exact string instead of substring.
 
void setMatchSubstring ()
 Set to substring (the default).
 
void setMatchGlob ()
 Set to match globs.
 
void setMatchRegex ()
 Set to use the query strings as regexes.
 
void setMatchWord ()
 Set substring to match words.
 
- Public Member Functions inherited from zypp::sat::SolvIterMixin< PoolQuery, detail::PoolQueryIterator >
bool empty () const
 Whether the collection is epmty.
 
size_type size () const
 Size of the collection.
 
bool contains (const TSolv &solv_r) const
 Whether collection contains a specific Solvable.
 
Solvable_iterator solvableBegin () const
 
Solvable_iterator solvableEnd () const
 
Iterable< Solvable_iteratorsolvable () const
 
PoolItem_iterator poolItemBegin () const
 
PoolItem_iterator poolItemEnd () const
 
Iterable< PoolItem_iteratorpoolItem () const
 
Selectable_iterator selectableBegin () const
 
Selectable_iterator selectableEnd () const
 
Iterable< Selectable_iteratorselectable () const
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const PoolQuery &obj)
 Stream output.
 
std::ostream & dumpOn (std::ostream &str, const PoolQuery &obj)
 Detailed stream output.
 

getters

RW_pointer< Impl_pimpl
 Pointer to implementation.
 
const StrContainerstrings () const
 Search strings added via addString()
 
const AttrRawStrMapattributes () const
 Map (map<SolvAttr, StrContainer>) of attribute values added via addAttribute(), addDep in string form.
 
const StrContainerattribute (const sat::SolvAttr &attr) const
 
const Kindskinds () const
 
const StrContainerrepos () const
 
const std::string & comment () const
 
const Edition edition () const
 
const Rel editionRel () const
 
bool caseSensitive () const
 returns true if search is case sensitive
 
bool filesMatchFullPath () const
 Whether searching in filelists looks at the full path or just at the basenames.
 
bool filesMatchBasename () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool matchExact () const
 
bool matchSubstring () const
 
bool matchGlob () const
 
bool matchRegex () const
 
bool matchWord () const
 
Match::Mode matchMode () const
 Returns string matching mode as enum.
 
StatusFilter statusFilterFlags () const
 
bool recover (std::istream &str, char delim='\n')
 Reads from stream query.
 
void serialize (std::ostream &str, char delim='\n') const
 Writes a machine-readable string representation of the query to stream.
 
std::string asString () const
 Return a human-readable description of the query.
 
bool operator< (const PoolQuery &b) const
 
bool operator== (const PoolQuery &b) const
 
bool operator!= (const PoolQuery &b) const
 
Match flags () const
 Free function to get libsolv repo search flags.
 
void setFlags (const Match &flags)
 Free function to set libsolv repo search flags.
 
void setRequireAll (bool require_all=true) ZYPP_DEPRECATED
 
bool requireAll () const ZYPP_DEPRECATED
 

Additional Inherited Members

- Protected Member Functions inherited from zypp::sat::SolvIterMixin< PoolQuery, detail::PoolQueryIterator >
 SolvIterMixin ()
 
 SolvIterMixin (const SolvIterMixin &)
 
 ~SolvIterMixin ()
 
void operator= (const SolvIterMixin &)
 

Detailed Description

Meta-data query API.

Returns solvables of specified kinds from specified repositories with attributes matching the specified search strings.

The search strings can be specified via addString() and addAttribute() methods. String matching type can be set using the setMatch*() methods. Multiple search strings for a particular attribute will be combined into a regex (see addString() and addAttribute() for more details).

The begin() and end() methods return a PoolQueryIterator returning sat::Solvable objects which can easily be turned into Resolvable objects. Additionally, thanx to the sat::SolvIterMixin, a Selectable and PoolItem iterators are automatically available.

Note
You will sometimes face the problem, that when using the PoolItem iterator you hit multiple version of the same package, while when using the ui::Selectable iterator the information which of the available candidates actually matched got lost. In this case class PoolItemBest may help you. Use it to pick the best version only.

PoolQuery q; q.addAttribute(sat::SolvAttr::name, "zypp*"); q.addKind(ResKind::package); q.setMatchGlob();

for (PoolQuery::Selectable_iterator it = q.selectableBegin(); it != q.selectableEnd(); ++it) { ui::Selectable::constPtr s = *it; // ... }

Performance considerations

Results of simple queries like those using one string and/or one attribute and/or one repository are filtered by sat-solver's Dataiterator directly, and thus it is fast.

Queries with multiple strings are implemented using regexes. Queries based on kinds, multiple repos, and multiple attributes are filtered inside the PoolQuery, so these tend to be slower.

See also
detail::PoolQueryIterator on how to inspect matches in detail.
tests/zypp/PoolQuery_test.cc for more examples
sat::SolvIterMixin

Definition at line 90 of file PoolQuery.h.

Member Typedef Documentation

◆ Kinds

typedef std::set<ResKind> zypp::PoolQuery::Kinds

Definition at line 93 of file PoolQuery.h.

◆ StrContainer

typedef std::set<std::string> zypp::PoolQuery::StrContainer

Definition at line 94 of file PoolQuery.h.

◆ AttrRawStrMap

Definition at line 95 of file PoolQuery.h.

◆ const_iterator

◆ size_type

typedef unsigned int zypp::PoolQuery::size_type

Definition at line 98 of file PoolQuery.h.

◆ ProcessResolvable

Definition at line 101 of file PoolQuery.h.

Member Enumeration Documentation

◆ StatusFilter

Installed status filter setters.

Filter by status (installed uninstalled)

Enumerator
ALL 
INSTALLED_ONLY 
UNINSTALLED_ONLY 

Definition at line 177 of file PoolQuery.h.

Constructor & Destructor Documentation

◆ PoolQuery()

zypp::PoolQuery::PoolQuery ( )

Definition at line 854 of file PoolQuery.cc.

◆ ~PoolQuery()

zypp::PoolQuery::~PoolQuery ( )

Definition at line 858 of file PoolQuery.cc.

Member Function Documentation

◆ begin()

detail::PoolQueryIterator zypp::PoolQuery::begin ( ) const

Query result accessers.

Compile the query and return an iterator to the result.

Returns
An iterator (detail::PoolQueryIterator) returning sat::Solvable objects pointing at the beginning of the query result.
Exceptions
sat::MatchInvalidRegexExceptionif the query was about to use a regex which failed to compile.
Note
Note that PoolQuery is derived from sat::SolvIterMixin which makes PoolItem and Selectable iterators automatically available.
See also
sat::SolvIterMixin

Definition at line 1849 of file PoolQuery.cc.

◆ end()

detail::PoolQueryIterator zypp::PoolQuery::end ( ) const
inline

An iterator pointing to the end of the query result.

Definition at line 624 of file PoolQuery.h.

◆ empty()

bool zypp::PoolQuery::empty ( ) const

Whether the result is empty.

Definition at line 1035 of file PoolQuery.cc.

◆ size()

PoolQuery::size_type zypp::PoolQuery::size ( ) const

Number of solvables in the query result.

Definition at line 1042 of file PoolQuery.cc.

◆ execute()

void zypp::PoolQuery::execute ( ProcessResolvable  fnc)

Executes the query with the current settings.

Results are yielded via the fnc callback.

Definition at line 1055 of file PoolQuery.cc.

◆ addKind()

void zypp::PoolQuery::addKind ( const ResKind kind)

Filter by selectable kind.

By default, all kinds will be returned. If addKind() is used, only the specified kinds will be returned (multiple kinds will be ORed).

Note
This kind filter does not apply if you explicitly specify a ResKind when searching for sat::SolvAttr::name. The following will always match and include the kernel packages, no matter which kind filter is set.
addDependency( sat::SolvAttr::name, "package:kernel" );

Pass ResKind constants to this method, (e.g. ResKind::package).

Definition at line 871 of file PoolQuery.cc.

◆ addRepo()

void zypp::PoolQuery::addRepo ( const std::string &  repoalias)

Filter by repo.

By default, all repos will be returned. If addRepo() is used, only the specified repo will be returned (multiple repos will be ORed).

Definition at line 861 of file PoolQuery.cc.

◆ setComment()

void zypp::PoolQuery::setComment ( const std::string &  comment) const

Set an optional comment string describing the purpose of the query.

Stored and retrieved when serializing the query. E.g. as lock.

Definition at line 874 of file PoolQuery.cc.

◆ setInstalledOnly()

void zypp::PoolQuery::setInstalledOnly ( )

Return only @System repo packages.

Definition at line 974 of file PoolQuery.cc.

◆ setUninstalledOnly()

void zypp::PoolQuery::setUninstalledOnly ( )

Return only packages from repos other than @System.

Definition at line 976 of file PoolQuery.cc.

◆ setStatusFilterFlags()

void zypp::PoolQuery::setStatusFilterFlags ( PoolQuery::StatusFilter  flags)

Set status filter directly.

See also
StatusFilter

Definition at line 978 of file PoolQuery.cc.

◆ addString()

void zypp::PoolQuery::addString ( const std::string &  value)

Add a global query string.

The string added via this method is applied to all query attributes as if addAttribute(..., \value) was called for all of them.

This method can be used multiple times in which case the query strings will be combined (together with strings added via addAttribute()) into a regex. Searched attribute value will match this regex if any of these strings will match the value.

Definition at line 881 of file PoolQuery.cc.

◆ addAttribute()

void zypp::PoolQuery::addAttribute ( const sat::SolvAttr attr,
const std::string &  value = "" 
)

Filter by the value of the specified attr attribute.

This can be any of the available solvable attributes.

This method can be used multiple times with the same attr in which case the query strings will be combined (together with strings added via addString()) into a regex. Searched attribute value will match this regex if any of these strings will match the value.

Note
Though it is possible to use dependency attributes like Solv::Attr::provides here, note that the query string is matched against a dependencies "name" part only. Any "op edition" part of a Capability is not considered at all.
See also
addDependency on how to query for capabilities including edition ranges.
Note
Solvables of a kind not supporting the specified attribute will not be returned.
Todo:
check the above
Parameters
attrAttribute identfier. Use sat::Solvattr::* constants
valueWhat to search for.
See also
sat::SolvAttr

Definition at line 884 of file PoolQuery.cc.

◆ addDependency() [1/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Rel op,
const Edition edition 
)

Query "name|global op edition".

Definition at line 887 of file PoolQuery.cc.

◆ addDependency() [2/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Rel op,
const Edition edition,
const Arch arch 
)

Definition at line 893 of file PoolQuery.cc.

◆ addDependency() [3/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Rel op,
const Edition edition,
const Arch arch,
Match::Mode  mode 
)

Definition at line 899 of file PoolQuery.cc.

◆ addDependency() [4/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Edition edition 
)
inline

Definition at line 299 of file PoolQuery.h.

◆ addDependency() [5/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Edition edition,
const Arch arch 
)
inline

Definition at line 302 of file PoolQuery.h.

◆ addDependency() [6/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name 
)
inline

Definition at line 306 of file PoolQuery.h.

◆ addDependency() [7/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const std::string &  name,
const Arch arch 
)
inline

Definition at line 309 of file PoolQuery.h.

◆ addDependency() [8/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const Rel op,
const Edition edition 
)
inline

Definition at line 313 of file PoolQuery.h.

◆ addDependency() [9/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const Rel op,
const Edition edition,
const Arch arch 
)
inline

Definition at line 316 of file PoolQuery.h.

◆ addDependency() [10/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const Edition edition 
)
inline

Definition at line 320 of file PoolQuery.h.

◆ addDependency() [11/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const Edition edition,
const Arch arch 
)
inline

Definition at line 323 of file PoolQuery.h.

◆ addDependency() [12/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr)
inline

Definition at line 327 of file PoolQuery.h.

◆ addDependency() [13/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
const Arch arch 
)
inline

Definition at line 330 of file PoolQuery.h.

◆ addDependency() [14/14]

void zypp::PoolQuery::addDependency ( const sat::SolvAttr attr,
Capability  cap_r 
)

Definition at line 939 of file PoolQuery.cc.

◆ setEdition()

void zypp::PoolQuery::setEdition ( const Edition edition,
const Rel op = Rel::EQ 
)

Set version condition.

This will filter out solvables not matching solvableEdition op edition.

Parameters
editionEdition to look for.
opFound-wanted relation operator.

Definition at line 956 of file PoolQuery.cc.

◆ setCaseSensitive()

void zypp::PoolQuery::setCaseSensitive ( bool  value = true)

Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag).

PoolQuery defaults to case insensitive search unless this method is used.

Parameters
valueWhether to turn the case sensitivity on (default) or off.

Definition at line 1018 of file PoolQuery.cc.

◆ setFilesMatchFullPath()

void zypp::PoolQuery::setFilesMatchFullPath ( bool  value = true)

If set (default), look at the full path when searching in filelists.

Otherwise just match the the basenames.

See also
Match::FILES

Definition at line 1023 of file PoolQuery.cc.

◆ setFilesMatchBasename()

void zypp::PoolQuery::setFilesMatchBasename ( bool  value = true)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 371 of file PoolQuery.h.

◆ setMatchExact()

void zypp::PoolQuery::setMatchExact ( )

Set to match exact string instead of substring.

Definition at line 963 of file PoolQuery.cc.

◆ setMatchSubstring()

void zypp::PoolQuery::setMatchSubstring ( )

Set to substring (the default).

Definition at line 962 of file PoolQuery.cc.

◆ setMatchGlob()

void zypp::PoolQuery::setMatchGlob ( )

Set to match globs.

Definition at line 965 of file PoolQuery.cc.

◆ setMatchRegex()

void zypp::PoolQuery::setMatchRegex ( )

Set to use the query strings as regexes.

Definition at line 964 of file PoolQuery.cc.

◆ setMatchWord()

void zypp::PoolQuery::setMatchWord ( )

Set substring to match words.

Definition at line 966 of file PoolQuery.cc.

◆ strings()

const PoolQuery::StrContainer & zypp::PoolQuery::strings ( ) const

Search strings added via addString()

Definition at line 983 of file PoolQuery.cc.

◆ attributes()

const PoolQuery::AttrRawStrMap & zypp::PoolQuery::attributes ( ) const

Map (map<SolvAttr, StrContainer>) of attribute values added via addAttribute(), addDep in string form.

Definition at line 987 of file PoolQuery.cc.

◆ attribute()

const PoolQuery::StrContainer & zypp::PoolQuery::attribute ( const sat::SolvAttr attr) const

Definition at line 991 of file PoolQuery.cc.

◆ kinds()

const PoolQuery::Kinds & zypp::PoolQuery::kinds ( ) const

Definition at line 1005 of file PoolQuery.cc.

◆ repos()

const PoolQuery::StrContainer & zypp::PoolQuery::repos ( ) const

Definition at line 1009 of file PoolQuery.cc.

◆ comment()

const std::string & zypp::PoolQuery::comment ( ) const

Definition at line 1013 of file PoolQuery.cc.

◆ edition()

Query< tt > global zypp::PoolQuery::edition</tt > ( ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 998 of file PoolQuery.cc.

◆ editionRel()

const Rel zypp::PoolQuery::editionRel ( ) const

Definition at line 1000 of file PoolQuery.cc.

◆ caseSensitive()

bool zypp::PoolQuery::caseSensitive ( ) const

returns true if search is case sensitive

Definition at line 1016 of file PoolQuery.cc.

◆ filesMatchFullPath()

bool zypp::PoolQuery::filesMatchFullPath ( ) const

Whether searching in filelists looks at the full path or just at the basenames.

Definition at line 1021 of file PoolQuery.cc.

◆ filesMatchBasename()

bool zypp::PoolQuery::filesMatchBasename ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 416 of file PoolQuery.h.

◆ matchExact()

bool zypp::PoolQuery::matchExact ( ) const

Definition at line 1026 of file PoolQuery.cc.

◆ matchSubstring()

bool zypp::PoolQuery::matchSubstring ( ) const

Definition at line 1027 of file PoolQuery.cc.

◆ matchGlob()

bool zypp::PoolQuery::matchGlob ( ) const

Definition at line 1028 of file PoolQuery.cc.

◆ matchRegex()

bool zypp::PoolQuery::matchRegex ( ) const

Definition at line 1029 of file PoolQuery.cc.

◆ matchWord()

bool zypp::PoolQuery::matchWord ( ) const

Definition at line 1030 of file PoolQuery.cc.

◆ matchMode()

Match::Mode zypp::PoolQuery::matchMode ( ) const
inline

Returns string matching mode as enum.

See also
Match::Mode

Definition at line 428 of file PoolQuery.h.

◆ statusFilterFlags()

PoolQuery::StatusFilter zypp::PoolQuery::statusFilterFlags ( ) const

Definition at line 1032 of file PoolQuery.cc.

◆ recover()

bool zypp::PoolQuery::recover ( std::istream &  str,
char  delim = '\n' 
)

Reads from stream query.

Attributes is sepated by delim. Query is separated by two delim.

Parameters
strinput stream which contains query
delimdelimeter for attributes
Returns
true if non-empty query is recovered
See also
readPoolQueriesFromFile

Definition at line 1151 of file PoolQuery.cc.

◆ serialize()

void zypp::PoolQuery::serialize ( std::ostream &  str,
char  delim = '\n' 
) const

Writes a machine-readable string representation of the query to stream.

Use delim as attribute delimiter.

Parameters
stroutput stream to write to
delimdelimiter for attributes
See also
writePoolQueriesToFile

Definition at line 1392 of file PoolQuery.cc.

◆ asString()

std::string zypp::PoolQuery::asString ( ) const

Return a human-readable description of the query.

Definition at line 1491 of file PoolQuery.cc.

◆ operator<()

bool zypp::PoolQuery::operator< ( const PoolQuery b) const

Definition at line 1503 of file PoolQuery.cc.

◆ operator==()

bool zypp::PoolQuery::operator== ( const PoolQuery b) const

Definition at line 1500 of file PoolQuery.cc.

◆ operator!=()

bool zypp::PoolQuery::operator!= ( const PoolQuery b) const
inline

Definition at line 462 of file PoolQuery.h.

◆ flags()

Match zypp::PoolQuery::flags ( ) const

Free function to get libsolv repo search flags.

See also
Match

Definition at line 968 of file PoolQuery.cc.

◆ setFlags()

void zypp::PoolQuery::setFlags ( const Match flags)

Free function to set libsolv repo search flags.

See also
Match

Definition at line 970 of file PoolQuery.cc.

◆ setRequireAll()

void zypp::PoolQuery::setRequireAll ( bool  require_all = true)
Deprecated:
Attribute was defined but never implemented/used. Will be removed in future versions.

Definition at line 1059 of file PoolQuery.cc.

◆ requireAll()

bool zypp::PoolQuery::requireAll ( ) const
Deprecated:
Attribute was defined but never implemented/used. Will be removed in future versions.

Definition at line 1060 of file PoolQuery.cc.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  str,
const PoolQuery obj 
)
related

Stream output.

Definition at line 1494 of file PoolQuery.cc.

◆ dumpOn()

std::ostream & dumpOn ( std::ostream &  str,
const PoolQuery obj 
)
related

Detailed stream output.

Definition at line 1497 of file PoolQuery.cc.

Member Data Documentation

◆ _pimpl

RW_pointer<Impl> zypp::PoolQuery::_pimpl
private

Pointer to implementation.

Definition at line 492 of file PoolQuery.h.


The documentation for this class was generated from the following files: