RepoQuery
-
class RepoQuery : public libdnf5::sack::Query<RepoWeakPtr>
Public Functions
-
explicit RepoQuery(const libdnf5::BaseWeakPtr &base)
Create a new RepoQuery instance.
- Parameters:
base – A weak pointer to Base
-
explicit RepoQuery(libdnf5::Base &base)
Create a new RepoQuery instance.
- Parameters:
base – Reference to Base
-
~RepoQuery()
-
void filter_enabled(bool enabled)
Filter repos by their
enabled
state.- Since
5.0
- Parameters:
enabled – A boolean value the filter is matched against.
-
void filter_expired(bool expired)
Filter repos by their
expired
state.- Since
5.0
- Parameters:
expired – A boolean value the filter is matched against.
-
void filter_id(const std::string &pattern, sack::QueryCmp cmp = libdnf5::sack::QueryCmp::EQ)
Filter repos by their
id
.- Since
5.0
- Parameters:
pattern – A string the filter is matched against.
cmp – A comparison (match) operator, defaults to
QueryCmp::EQ
.
-
void filter_id(const std::vector<std::string> &patterns, sack::QueryCmp cmp = libdnf5::sack::QueryCmp::EQ)
Filter repos by their
id
.- Since
5.0
- Parameters:
patterns – A vector of strings the filter is matched against.
cmp – A comparison (match) operator, defaults to
QueryCmp::EQ
.
-
void filter_local(bool local)
Filter repositories by whether they are local
- Since
5.0
- Parameters:
local –
true
returns local repos,false
remote repos.
-
void filter_name(const std::string &pattern, sack::QueryCmp cmp = libdnf5::sack::QueryCmp::EQ)
Filter repos by their
name
.- Since
5.0
- Parameters:
pattern – A string the filter is matched against.
cmp – A comparison (match) operator, defaults to
QueryCmp::EQ
.
-
explicit RepoQuery(const libdnf5::BaseWeakPtr &base)