#include <ResolvableQuery.h>
Public Member Functions | |
| ResolvableQuery (const Pathname &dbdir) | |
| Constructor. | |
| ~ResolvableQuery () | |
| void | query (const data::RecordId &record_id, ProcessResolvable fnc) |
| Query by record id. | |
| void | query (const std::string &text, ProcessResolvable fnc) |
| Query by matching text. | |
| int | queryNumericAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, int default_value=0) |
| Queries a specifc attribute for a resolvable. | |
| int | queryNumericAttribute (const data::RecordId &record_id, const Attribute &attr, int default_value=0) |
| bool | queryBooleanAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, bool default_value=false) |
| Queries a specifc attribute for a resolvable. | |
| bool | queryBooleanAttribute (const data::RecordId &record_id, const Attribute &attr, bool default_value=false) |
| std::string | queryStringAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, const std::string &default_value=std::string()) |
| Queries a specifc attribute for a resolvable. | |
| std::string | queryStringAttribute (const data::RecordId &record_id, const Attribute &attr, const std::string &default_value=std::string()) |
| std::string | queryStringAttributeTranslation (const data::RecordId &record_id, const Locale &locale, const std::string &klass, const std::string &name, const std::string &default_value=std::string()) |
| Queries a specifc attribute translation for a resolvable. | |
| std::string | queryStringAttributeTranslation (const data::RecordId &record_id, const Locale &locale, const Attribute &attr, const std::string &default_value=std::string()) |
| TranslatedText | queryTranslatedStringAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, const TranslatedText &default_value=TranslatedText()) |
| Queries all translations for a specific attribute in a resolvable. | |
| TranslatedText | queryTranslatedStringAttribute (const data::RecordId &record_id, const Attribute &attr, const TranslatedText &default_value=TranslatedText()) |
| template<class _OutputIterator> | |
| void | queryStringContainerAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, _OutputIterator result) |
| Queries for a specific container attribute in a resolvable. | |
| template<class _OutputIterator> | |
| void | queryStringContainerAttribute (const data::RecordId &record_id, const Attribute &attr, _OutputIterator result) |
| void | queryDiskUsage (const data::RecordId &record_id, DiskUsage &du) |
| std::string | queryRepositoryAlias (const data::RecordId &repo_id) |
| data::RecordId | queryRepositoryId (const std::string &repo_alias) |
| void | iterateResolvablesByKindsAndStringsAndRepos (const std::vector< zypp::Resolvable::Kind > &kinds, const std::vector< std::string > &names, int flags, const std::vector< std::string > &repos, ProcessResolvable fnc) |
Private Attributes | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
Classes | |
| struct | Impl |
Definition at line 69 of file ResolvableQuery.h.
| zypp::cache::ResolvableQuery::ResolvableQuery | ( | const Pathname & | dbdir | ) |
Constructor.
| dbdir | Cache location path |
Definition at line 439 of file ResolvableQuery.cc.
| zypp::cache::ResolvableQuery::~ResolvableQuery | ( | ) |
Definition at line 445 of file ResolvableQuery.cc.
| void zypp::cache::ResolvableQuery::query | ( | const data::RecordId & | record_id, | |
| ProcessResolvable | fnc | |||
| ) |
Query by record id.
| record_id | Resolvable id to query | |
| fnc | callback to send the data to. (Will be called once or none) |
Definition at line 452 of file ResolvableQuery.cc.
References _pimpl.
| void zypp::cache::ResolvableQuery::query | ( | const std::string & | text, | |
| ProcessResolvable | fnc | |||
| ) |
Query by matching text.
| text | text to match, wildcard operators like * and ? are allowed | |
| fnc | callback to send the data to. (Will be called once per result) |
Definition at line 459 of file ResolvableQuery.cc.
References _pimpl.
| int zypp::cache::ResolvableQuery::queryNumericAttribute | ( | const data::RecordId & | record_id, | |
| const std::string & | klass, | |||
| const std::string & | name, | |||
| int | default_value = 0 | |||
| ) |
Queries a specifc attribute for a resolvable.
| record_id | Resolvable cache id | |
| klass | Attribute Class | |
| name | Attribute Name |
0 if no record is found. Definition at line 466 of file ResolvableQuery.cc.
References _pimpl.
Referenced by queryNumericAttribute().
| int zypp::cache::ResolvableQuery::queryNumericAttribute | ( | const data::RecordId & | record_id, | |
| const Attribute & | attr, | |||
| int | default_value = 0 | |||
| ) | [inline] |
Definition at line 111 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryNumericAttribute().
| bool zypp::cache::ResolvableQuery::queryBooleanAttribute | ( | const data::RecordId & | record_id, | |
| const std::string & | klass, | |||
| const std::string & | name, | |||
| bool | default_value = false | |||
| ) |
Queries a specifc attribute for a resolvable.
| record_id | Resolvable cache id | |
| klass | Attribute Class | |
| name | Attribute Name |
false if no record is found. Definition at line 474 of file ResolvableQuery.cc.
References _pimpl.
Referenced by queryBooleanAttribute().
| bool zypp::cache::ResolvableQuery::queryBooleanAttribute | ( | const data::RecordId & | record_id, | |
| const Attribute & | attr, | |||
| bool | default_value = false | |||
| ) | [inline] |
Definition at line 132 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryBooleanAttribute().
| std::string zypp::cache::ResolvableQuery::queryStringAttribute | ( | const data::RecordId & | record_id, | |
| const std::string & | klass, | |||
| const std::string & | name, | |||
| const std::string & | default_value = std::string() | |||
| ) |
Queries a specifc attribute for a resolvable.
| record_id | Resolvable cache id | |
| klass | Attribute Class | |
| name | Attribute Name |
Definition at line 483 of file ResolvableQuery.cc.
References _pimpl.
Referenced by queryStringAttribute(), and queryStringContainerAttribute().
| std::string zypp::cache::ResolvableQuery::queryStringAttribute | ( | const data::RecordId & | record_id, | |
| const Attribute & | attr, | |||
| const std::string & | default_value = std::string() | |||
| ) | [inline] |
Definition at line 153 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryStringAttribute().
| std::string zypp::cache::ResolvableQuery::queryStringAttributeTranslation | ( | const data::RecordId & | record_id, | |
| const Locale & | locale, | |||
| const std::string & | klass, | |||
| const std::string & | name, | |||
| const std::string & | default_value = std::string() | |||
| ) |
Queries a specifc attribute translation for a resolvable.
| record_id | Resolvable cache id | |
| locale | Locale of the translation | |
| klass | Attribute Class | |
| name | Attribute Name |
Definition at line 493 of file ResolvableQuery.cc.
References _pimpl.
Referenced by queryStringAttributeTranslation().
| std::string zypp::cache::ResolvableQuery::queryStringAttributeTranslation | ( | const data::RecordId & | record_id, | |
| const Locale & | locale, | |||
| const Attribute & | attr, | |||
| const std::string & | default_value = std::string() | |||
| ) | [inline] |
Definition at line 176 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryStringAttributeTranslation().
| TranslatedText zypp::cache::ResolvableQuery::queryTranslatedStringAttribute | ( | const data::RecordId & | record_id, | |
| const std::string & | klass, | |||
| const std::string & | name, | |||
| const TranslatedText & | default_value = TranslatedText() | |||
| ) |
Queries all translations for a specific attribute in a resolvable.
| record_id | Resolvable cache id | |
| klass | Attribute Class | |
| name | Attribute Name |
Definition at line 504 of file ResolvableQuery.cc.
References _pimpl.
Referenced by queryTranslatedStringAttribute().
| TranslatedText zypp::cache::ResolvableQuery::queryTranslatedStringAttribute | ( | const data::RecordId & | record_id, | |
| const Attribute & | attr, | |||
| const TranslatedText & | default_value = TranslatedText() | |||
| ) | [inline] |
Definition at line 198 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryTranslatedStringAttribute().
| void zypp::cache::ResolvableQuery::queryStringContainerAttribute | ( | const data::RecordId & | record_id, | |
| const std::string & | klass, | |||
| const std::string & | name, | |||
| _OutputIterator | result | |||
| ) | [inline] |
Queries for a specific container attribute in a resolvable.
| record_id | Resolvable cache id | |
| klass | Attribute Class | |
| name | Attribute Name |
Definition at line 215 of file ResolvableQuery.h.
References zypp::ZConfig::instance(), queryStringAttribute(), and zypp::url::split().
Referenced by queryStringContainerAttribute().
| void zypp::cache::ResolvableQuery::queryStringContainerAttribute | ( | const data::RecordId & | record_id, | |
| const Attribute & | attr, | |||
| _OutputIterator | result | |||
| ) | [inline] |
Definition at line 227 of file ResolvableQuery.h.
References zypp::cache::Attribute::klass, zypp::cache::Attribute::name, and queryStringContainerAttribute().
| void zypp::cache::ResolvableQuery::queryDiskUsage | ( | const data::RecordId & | record_id, | |
| DiskUsage & | du | |||
| ) |
Query disk usage for a resolvable
Definition at line 512 of file ResolvableQuery.cc.
References _pimpl.
| std::string zypp::cache::ResolvableQuery::queryRepositoryAlias | ( | const data::RecordId & | repo_id | ) |
| data::RecordId zypp::cache::ResolvableQuery::queryRepositoryId | ( | const std::string & | repo_alias | ) |
Query repo id by alias
| void zypp::cache::ResolvableQuery::iterateResolvablesByKindsAndStringsAndRepos | ( | const std::vector< zypp::Resolvable::Kind > & | kinds, | |
| const std::vector< std::string > & | names, | |||
| int | flags, | |||
| const std::vector< std::string > & | repos, | |||
| ProcessResolvable | fnc | |||
| ) |
Iterate resolvables by Kinds and Strings
| kinds | kinds to match, will be ORed | |
| names | names to match, will be ANDed | |
| repos | repository aliases to match, will be ORed | |
| flags | MATCH_xxx, see above; applied to 'names' | |
| fnc | callback to send the data to. (Will be called once per result) |
Definition at line 522 of file ResolvableQuery.cc.
References _pimpl.
RW_pointer<Impl> zypp::cache::ResolvableQuery::_pimpl [private] |
Pointer to implementation.
Definition at line 265 of file ResolvableQuery.h.
Referenced by iterateResolvablesByKindsAndStringsAndRepos(), query(), queryBooleanAttribute(), queryDiskUsage(), queryNumericAttribute(), queryRepositoryAlias(), queryStringAttribute(), queryStringAttributeTranslation(), and queryTranslatedStringAttribute().
1.5.3