sqlite3x::sqlite3_connection Class Reference

#include <sqlite3x.hpp>

Inheritance diagram for sqlite3x::sqlite3_connection:
[legend]

List of all members.

Public Member Functions

 sqlite3_connection ()
 sqlite3_connection (const char *db)
 sqlite3_connection (const wchar_t *db)
void setprogresshandler (const zypp::ProgressData::ReceiverFnc &fnc, int n=100)
void resetprogresshandler ()
 ~sqlite3_connection ()
void open (const char *db)
void open (const wchar_t *db)
void close ()
long long insertid ()
void setbusytimeout (int ms)
void execute (const std::string &sql)
void executenonquery (const char *sql)
void executenonquery (const wchar_t *sql)
void executenonquery (const std::string &sql)
void executenonquery (const std::wstring &sql)
int executeint (const char *sql)
int executeint (const wchar_t *sql)
int executeint (const std::string &sql)
int executeint (const std::wstring &sql)
long long executeint64 (const char *sql)
long long executeint64 (const wchar_t *sql)
long long executeint64 (const std::string &sql)
long long executeint64 (const std::wstring &sql)
double executedouble (const char *sql)
double executedouble (const wchar_t *sql)
double executedouble (const std::string &sql)
double executedouble (const std::wstring &sql)
std::string executestring (const char *sql)
std::string executestring (const wchar_t *sql)
std::string executestring (const std::string &sql)
std::string executestring (const std::wstring &sql)
std::wstring executestring16 (const char *sql)
std::wstring executestring16 (const wchar_t *sql)
std::wstring executestring16 (const std::string &sql)
std::wstring executestring16 (const std::wstring &sql)
std::string executeblob (const char *sql)
std::string executeblob (const wchar_t *sql)
std::string executeblob (const std::string &sql)
std::string executeblob (const std::wstring &sql)
int _progress_handler_accessor (void *ptr)

Private Attributes

struct sqlite3 * db
zypp::ProgressData _ticks

Friends

class sqlite3_command
class database_error


Detailed Description

Definition at line 38 of file sqlite3x.hpp.


Constructor & Destructor Documentation

sqlite3x::sqlite3_connection::sqlite3_connection (  ) 

Definition at line 58 of file sqlite3x_connection.cpp.

sqlite3x::sqlite3_connection::sqlite3_connection ( const char *  db  ) 

Definition at line 61 of file sqlite3x_connection.cpp.

References open().

sqlite3x::sqlite3_connection::sqlite3_connection ( const wchar_t *  db  ) 

Definition at line 66 of file sqlite3x_connection.cpp.

References open().

sqlite3x::sqlite3_connection::~sqlite3_connection (  ) 

Definition at line 71 of file sqlite3x_connection.cpp.

References _ticks, and resetprogresshandler().


Member Function Documentation

void sqlite3x::sqlite3_connection::setprogresshandler ( const zypp::ProgressData::ReceiverFnc fnc,
int  n = 100 
)

Sets a tick progress callback

Parameters:
fnc callback
n number of sqlite vm opcodes per tick

Definition at line 78 of file sqlite3x_connection.cpp.

References _ticks, db, global_progress_handler(), and zypp::ProgressData::sendTo().

void sqlite3x::sqlite3_connection::resetprogresshandler (  ) 

Disables tick progress callback

Definition at line 88 of file sqlite3x_connection.cpp.

References _ticks, and db.

Referenced by ~sqlite3_connection().

void sqlite3x::sqlite3_connection::open ( const char *  db  ) 

Definition at line 94 of file sqlite3x_connection.cpp.

References database_error, and SQLITE3X_THROW.

Referenced by zypp::cache::ResolvableQuery::Impl::Impl(), zypp::cache::CacheStore::Impl::Impl(), and sqlite3_connection().

void sqlite3x::sqlite3_connection::open ( const wchar_t *  db  ) 

Definition at line 104 of file sqlite3x_connection.cpp.

References database_error, and SQLITE3X_THROW.

void sqlite3x::sqlite3_connection::close (  ) 

Definition at line 110 of file sqlite3x_connection.cpp.

References database_error, db, and SQLITE3X_THROW.

long long sqlite3x::sqlite3_connection::insertid (  ) 

Definition at line 120 of file sqlite3x_connection.cpp.

References database_error.

void sqlite3x::sqlite3_connection::setbusytimeout ( int  ms  ) 

Definition at line 126 of file sqlite3x_connection.cpp.

References database_error, and SQLITE3X_THROW.

void sqlite3x::sqlite3_connection::execute ( const std::string &  sql  ) 

Definition at line 302 of file sqlite3x_connection.cpp.

References database_error, and SQLITE3X_THROW.

void sqlite3x::sqlite3_connection::executenonquery ( const char *  sql  ) 

Definition at line 134 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

Referenced by sqlite3x::sqlite3_transaction::begin(), sqlite3x::sqlite3_transaction::commit(), zypp::cache::ResolvableQuery::Impl::Impl(), zypp::cache::CacheStore::Impl::Impl(), zypp::cache::CacheTypes::refreshCache(), and sqlite3x::sqlite3_transaction::rollback().

void sqlite3x::sqlite3_connection::executenonquery ( const wchar_t *  sql  ) 

Definition at line 140 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

void sqlite3x::sqlite3_connection::executenonquery ( const std::string &  sql  ) 

Definition at line 146 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

void sqlite3x::sqlite3_connection::executenonquery ( const std::wstring &  sql  ) 

Definition at line 152 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

int sqlite3x::sqlite3_connection::executeint ( const char *  sql  ) 

Definition at line 158 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

int sqlite3x::sqlite3_connection::executeint ( const wchar_t *  sql  ) 

Definition at line 164 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

int sqlite3x::sqlite3_connection::executeint ( const std::string &  sql  ) 

Definition at line 170 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

int sqlite3x::sqlite3_connection::executeint ( const std::wstring &  sql  ) 

Definition at line 176 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

long long sqlite3x::sqlite3_connection::executeint64 ( const char *  sql  ) 

Definition at line 182 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

long long sqlite3x::sqlite3_connection::executeint64 ( const wchar_t *  sql  ) 

Definition at line 188 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

long long sqlite3x::sqlite3_connection::executeint64 ( const std::string &  sql  ) 

Definition at line 194 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

long long sqlite3x::sqlite3_connection::executeint64 ( const std::wstring &  sql  ) 

Definition at line 200 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

double sqlite3x::sqlite3_connection::executedouble ( const char *  sql  ) 

Definition at line 206 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

double sqlite3x::sqlite3_connection::executedouble ( const wchar_t *  sql  ) 

Definition at line 212 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

double sqlite3x::sqlite3_connection::executedouble ( const std::string &  sql  ) 

Definition at line 218 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

double sqlite3x::sqlite3_connection::executedouble ( const std::wstring &  sql  ) 

Definition at line 224 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executestring ( const char *  sql  ) 

Definition at line 230 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executestring ( const wchar_t *  sql  ) 

Definition at line 236 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executestring ( const std::string &  sql  ) 

Definition at line 242 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executestring ( const std::wstring &  sql  ) 

Definition at line 248 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::wstring sqlite3x::sqlite3_connection::executestring16 ( const char *  sql  ) 

Definition at line 254 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::wstring sqlite3x::sqlite3_connection::executestring16 ( const wchar_t *  sql  ) 

Definition at line 260 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::wstring sqlite3x::sqlite3_connection::executestring16 ( const std::string &  sql  ) 

Definition at line 266 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::wstring sqlite3x::sqlite3_connection::executestring16 ( const std::wstring &  sql  ) 

Definition at line 272 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executeblob ( const char *  sql  ) 

Definition at line 278 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executeblob ( const wchar_t *  sql  ) 

Definition at line 284 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executeblob ( const std::string &  sql  ) 

Definition at line 290 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

std::string sqlite3x::sqlite3_connection::executeblob ( const std::wstring &  sql  ) 

Definition at line 296 of file sqlite3x_connection.cpp.

References database_error, sqlite3_command, and SQLITE3X_THROW.

int sqlite3x::sqlite3_connection::_progress_handler_accessor ( void *  ptr  ) 

Definition at line 51 of file sqlite3x_connection.cpp.

References _ticks, and zypp::ProgressData::tick().

Referenced by global_progress_handler().


Friends And Related Function Documentation

friend class sqlite3_command [friend]

Definition at line 41 of file sqlite3x.hpp.

Referenced by executeblob(), executedouble(), executeint(), executeint64(), executenonquery(), executestring(), and executestring16().

friend class database_error [friend]

Definition at line 42 of file sqlite3x.hpp.

Referenced by close(), execute(), executeblob(), executedouble(), executeint(), executeint64(), executenonquery(), executestring(), executestring16(), insertid(), open(), and setbusytimeout().


Member Data Documentation

struct sqlite3* sqlite3x::sqlite3_connection::db [read, private]

Definition at line 43 of file sqlite3x.hpp.

Referenced by close(), resetprogresshandler(), setprogresshandler(), and sqlite3x::sqlite3_command::sqlite3_command().

zypp::ProgressData sqlite3x::sqlite3_connection::_ticks [private]

Definition at line 44 of file sqlite3x.hpp.

Referenced by _progress_handler_accessor(), resetprogresshandler(), setprogresshandler(), and ~sqlite3_connection().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:13 2007 for libzypp by  doxygen 1.5.3