zypp::cache::ResolvableQuery::Impl Struct Reference

List of all members.

Public Member Functions

 Impl (const Pathname &dbdir)
 ~Impl ()
std::string regex2sql (const std::string &s)
data::ResObject_Ptr fromRow (sqlite3_reader &reader)
void query (const data::RecordId &id, ProcessResolvable fnc)
void query (const std::string &s, ProcessResolvable fnc)
std::string queryStringAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, const std::string &default_value)
std::string queryStringAttributeTranslation (const data::RecordId &record_id, const Locale &locale, const std::string &klass, const std::string &name, const std::string &default_value)
TranslatedText queryTranslatedStringAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, const TranslatedText &default_value)
bool queryBooleanAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, bool default_value)
int queryNumericAttribute (const data::RecordId &record_id, const std::string &klass, const std::string &name, int default_value)
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 > &strings, int flags, const std::vector< std::string > repos, ProcessResolvable fnc)

Public Attributes

Pathname _dbdir
string _fields
CacheTypes _type_cache
sqlite3_connection _con
sqlite3_command_ptr _cmd_attr_str
sqlite3_command_ptr _cmd_attr_tstr
sqlite3_command_ptr _cmd_attr_num
sqlite3_command_ptr _cmd_disk_usage
sqlite3_command_ptr _cmd_shared_id

Private Member Functions

int queryNumericAttributeInternal (sqlite3_connection &con, const data::RecordId &record_id, const std::string &klass, const std::string &name, int default_value)
TranslatedText queryTranslatedStringAttributeInternal (sqlite3_connection &con, const data::RecordId &record_id, const std::string &klass, const std::string &name, const TranslatedText &default_value)
std::string queryStringAttributeInternal (sqlite3_connection &con, const data::RecordId &record_id, const std::string &klass, const std::string &name, const std::string &default_value)
std::string queryStringAttributeTranslationInternal (sqlite3_connection &con, const data::RecordId &record_id, const Locale &locale, const std::string &klass, const std::string &name, const std::string &default_value)


Detailed Description

Definition at line 18 of file ResolvableQuery.cc.


Constructor & Destructor Documentation

zypp::cache::ResolvableQuery::Impl::Impl ( const Pathname &  dbdir  )  [inline]

Definition at line 30 of file ResolvableQuery.cc.

References _cmd_attr_num, _cmd_attr_str, _cmd_attr_tstr, _cmd_disk_usage, _cmd_shared_id, _con, _fields, zypp::ui::asString(), sqlite3x::sqlite3_connection::executenonquery(), MIL, and sqlite3x::sqlite3_connection::open().

zypp::cache::ResolvableQuery::Impl::~Impl (  )  [inline]

Definition at line 53 of file ResolvableQuery.cc.

References MIL.


Member Function Documentation

std::string zypp::cache::ResolvableQuery::Impl::regex2sql ( const std::string &  s  )  [inline]

Definition at line 62 of file ResolvableQuery.cc.

Referenced by iterateResolvablesByKindsAndStringsAndRepos(), and query().

data::ResObject_Ptr zypp::cache::ResolvableQuery::Impl::fromRow ( sqlite3_reader reader  )  [inline]

Definition at line 74 of file ResolvableQuery.cc.

References _type_cache, zypp::cache::CacheTypes::archFor(), sqlite3x::sqlite3_reader::getint(), sqlite3x::sqlite3_reader::getstring(), and zypp::cache::CacheTypes::kindFor().

Referenced by iterateResolvablesByKindsAndStringsAndRepos(), and query().

void zypp::cache::ResolvableQuery::Impl::query ( const data::RecordId id,
ProcessResolvable  fnc 
) [inline]

Definition at line 92 of file ResolvableQuery.cc.

References _con, _fields, sqlite3x::sqlite3_command::bind(), sqlite3x::sqlite3_command::executereader(), fromRow(), and sqlite3x::sqlite3_reader::read().

void zypp::cache::ResolvableQuery::Impl::query ( const std::string &  s,
ProcessResolvable  fnc 
) [inline]

Definition at line 105 of file ResolvableQuery.cc.

References _con, _fields, sqlite3x::sqlite3_command::bind(), sqlite3x::sqlite3_command::executereader(), fromRow(), sqlite3x::sqlite3_reader::getint64(), sqlite3x::sqlite3_reader::read(), and regex2sql().

std::string zypp::cache::ResolvableQuery::Impl::queryStringAttribute ( const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
const std::string &  default_value 
) [inline]

Definition at line 119 of file ResolvableQuery.cc.

References _con, and queryStringAttributeTranslationInternal().

std::string zypp::cache::ResolvableQuery::Impl::queryStringAttributeTranslation ( const data::RecordId record_id,
const Locale locale,
const std::string &  klass,
const std::string &  name,
const std::string &  default_value 
) [inline]

Definition at line 129 of file ResolvableQuery.cc.

References _con, and queryStringAttributeTranslationInternal().

TranslatedText zypp::cache::ResolvableQuery::Impl::queryTranslatedStringAttribute ( const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
const TranslatedText default_value 
) [inline]

Definition at line 139 of file ResolvableQuery.cc.

References _con, and queryTranslatedStringAttributeInternal().

bool zypp::cache::ResolvableQuery::Impl::queryBooleanAttribute ( const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
bool  default_value 
) [inline]

Definition at line 148 of file ResolvableQuery.cc.

References _con, and queryNumericAttributeInternal().

int zypp::cache::ResolvableQuery::Impl::queryNumericAttribute ( const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
int  default_value 
) [inline]

Definition at line 156 of file ResolvableQuery.cc.

References _con, and queryNumericAttributeInternal().

void zypp::cache::ResolvableQuery::Impl::queryDiskUsage ( const data::RecordId record_id,
DiskUsage du 
) [inline]

Definition at line 164 of file ResolvableQuery.cc.

References _cmd_disk_usage, zypp::DiskUsage::add(), sqlite3x::sqlite3_reader::getint(), sqlite3x::sqlite3_reader::getstring(), and sqlite3x::sqlite3_reader::read().

std::string zypp::cache::ResolvableQuery::Impl::queryRepositoryAlias ( const data::RecordId repo_id  )  [inline]

Definition at line 178 of file ResolvableQuery.cc.

References _con, sqlite3x::sqlite3_command::bind(), sqlite3x::sqlite3_command::executereader(), sqlite3x::sqlite3_reader::getstring(), and sqlite3x::sqlite3_reader::read().

data::RecordId zypp::cache::ResolvableQuery::Impl::queryRepositoryId ( const std::string &  repo_alias  )  [inline]

Definition at line 192 of file ResolvableQuery.cc.

References _con, sqlite3x::sqlite3_command::bind(), sqlite3x::sqlite3_command::executereader(), sqlite3x::sqlite3_reader::getint64(), and sqlite3x::sqlite3_reader::read().

Referenced by iterateResolvablesByKindsAndStringsAndRepos().

void zypp::cache::ResolvableQuery::Impl::iterateResolvablesByKindsAndStringsAndRepos ( const std::vector< zypp::Resolvable::Kind > &  kinds,
const std::vector< std::string > &  strings,
int  flags,
const std::vector< std::string >  repos,
ProcessResolvable  fnc 
) [inline]

Definition at line 206 of file ResolvableQuery.cc.

References _con, _fields, _type_cache, sqlite3x::sqlite3_command::executereader(), fromRow(), sqlite3x::sqlite3_reader::getint64(), zypp::cache::CacheTypes::idForKind(), zypp::cache::MATCH_LEADING, zypp::cache::MATCH_TRAILING, zypp::cache::MATCH_WILDCARDS, MIL, queryRepositoryId(), sqlite3x::sqlite3_reader::read(), and regex2sql().

int zypp::cache::ResolvableQuery::Impl::queryNumericAttributeInternal ( sqlite3_connection con,
const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
int  default_value 
) [inline, private]

Definition at line 313 of file ResolvableQuery.cc.

References _cmd_attr_num, _cmd_shared_id, sqlite3x::sqlite3_reader::close(), sqlite3x::sqlite3_reader::getint(), and sqlite3x::sqlite3_reader::read().

Referenced by queryBooleanAttribute(), and queryNumericAttribute().

TranslatedText zypp::cache::ResolvableQuery::Impl::queryTranslatedStringAttributeInternal ( sqlite3_connection con,
const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
const TranslatedText default_value 
) [inline, private]

Definition at line 344 of file ResolvableQuery.cc.

References _cmd_attr_tstr, _cmd_shared_id, sqlite3x::sqlite3_reader::close(), sqlite3x::sqlite3_reader::getint(), sqlite3x::sqlite3_reader::getstring(), sqlite3x::sqlite3_reader::read(), and zypp::TranslatedText::setText().

Referenced by queryTranslatedStringAttribute().

std::string zypp::cache::ResolvableQuery::Impl::queryStringAttributeInternal ( sqlite3_connection con,
const data::RecordId record_id,
const std::string &  klass,
const std::string &  name,
const std::string &  default_value 
) [inline, private]

Definition at line 387 of file ResolvableQuery.cc.

References queryStringAttributeTranslationInternal().

std::string zypp::cache::ResolvableQuery::Impl::queryStringAttributeTranslationInternal ( sqlite3_connection con,
const data::RecordId record_id,
const Locale locale,
const std::string &  klass,
const std::string &  name,
const std::string &  default_value 
) [inline, private]

Definition at line 396 of file ResolvableQuery.cc.

References _cmd_attr_str, _cmd_shared_id, sqlite3x::sqlite3_reader::close(), zypp::Locale::code(), sqlite3x::sqlite3_reader::getint(), sqlite3x::sqlite3_reader::getstring(), and sqlite3x::sqlite3_reader::read().

Referenced by queryStringAttribute(), queryStringAttributeInternal(), and queryStringAttributeTranslation().


Member Data Documentation

Pathname zypp::cache::ResolvableQuery::Impl::_dbdir

Definition at line 20 of file ResolvableQuery.cc.

string zypp::cache::ResolvableQuery::Impl::_fields

Definition at line 21 of file ResolvableQuery.cc.

Referenced by Impl(), iterateResolvablesByKindsAndStringsAndRepos(), and query().

CacheTypes zypp::cache::ResolvableQuery::Impl::_type_cache

Definition at line 22 of file ResolvableQuery.cc.

Referenced by fromRow(), and iterateResolvablesByKindsAndStringsAndRepos().

sqlite3_connection zypp::cache::ResolvableQuery::Impl::_con

Definition at line 23 of file ResolvableQuery.cc.

Referenced by Impl(), iterateResolvablesByKindsAndStringsAndRepos(), query(), queryBooleanAttribute(), queryNumericAttribute(), queryRepositoryAlias(), queryRepositoryId(), queryStringAttribute(), queryStringAttributeTranslation(), and queryTranslatedStringAttribute().

sqlite3_command_ptr zypp::cache::ResolvableQuery::Impl::_cmd_attr_str

Definition at line 24 of file ResolvableQuery.cc.

Referenced by Impl(), and queryStringAttributeTranslationInternal().

sqlite3_command_ptr zypp::cache::ResolvableQuery::Impl::_cmd_attr_tstr

Definition at line 25 of file ResolvableQuery.cc.

Referenced by Impl(), and queryTranslatedStringAttributeInternal().

sqlite3_command_ptr zypp::cache::ResolvableQuery::Impl::_cmd_attr_num

Definition at line 26 of file ResolvableQuery.cc.

Referenced by Impl(), and queryNumericAttributeInternal().

sqlite3_command_ptr zypp::cache::ResolvableQuery::Impl::_cmd_disk_usage

Definition at line 27 of file ResolvableQuery.cc.

Referenced by Impl(), and queryDiskUsage().

sqlite3_command_ptr zypp::cache::ResolvableQuery::Impl::_cmd_shared_id

Definition at line 28 of file ResolvableQuery.cc.

Referenced by Impl(), queryNumericAttributeInternal(), queryStringAttributeTranslationInternal(), and queryTranslatedStringAttributeInternal().


The documentation for this struct was generated from the following file:
Generated on Tue Sep 25 19:23:18 2007 for libzypp by  doxygen 1.5.3