RepoQuery

class RepoQuery : public libdnf::sack::Query<RepoWeakPtr>

Public Functions

explicit RepoQuery(const libdnf::BaseWeakPtr &base)

Create a new RepoQuery instance.

Parameters

base – A weak pointer to Base

explicit RepoQuery(libdnf::Base &base)

Create a new RepoQuery instance.

Parameters

base – Reference to Base

inline libdnf::BaseWeakPtr get_base()

Since

5.0

Returns

Weak pointer to the Base object.

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 = libdnf::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 = libdnf::sack::QueryCmp::EQ)

Filter repos by their id.

Since

5.0

Parameters
  • pattern – A vector of strings the filter is matched against.

  • cmp – A comparison (match) operator, defaults to QueryCmp::EQ.

void filter_local(bool local)

Filter repos by their name.

Since

5.0

Parameters

pattern – A string the filter is matched against.

void filter_name(const std::string &pattern, sack::QueryCmp cmp = libdnf::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.

void filter_name(const std::vector<std::string> &patterns, sack::QueryCmp cmp = libdnf::sack::QueryCmp::EQ)

Filter repos by their name.

Since

5.0

Parameters
  • pattern – A vector of strings the filter is matched against.

  • cmp – A comparison (match) operator, defaults to QueryCmp::EQ.

void filter_type(Repo::Type type, sack::QueryCmp cmp = libdnf::sack::QueryCmp::EQ)

Filter repos by their type.

Since

5.0

Parameters
  • pattern – A type the filter is matched against.

  • cmp – A comparison (match) operator, defaults to QueryCmp::EQ.