#include <sqlitepp.h>
Public Types | |
typedef boost::shared_ptr< Statement > | Pointer |
Public Member Functions | |
BOOST_PP_REPEAT (BOOST_PP_INC(MAX_ARGUMENTS), BINDARGS, _)~Statement() | |
Statement & | bindArg (const Blob &argument, int pos=0) |
Bind an argument to a Statement. | |
Statement & | bindArg (const std::string &argument, int pos=0) |
Bind an argument to a Statement. | |
Statement & | bindArg (const char *argument, int pos=0) |
Bind an argument to a Statement. | |
Statement & | bindArg (int argument, unsigned int pos=0) |
Bind an argument to a Statement. | |
Statement & | bindArg (schma::UnicodePtr argument, int pos=0) |
Bind an argument to a Statement. | |
Statement & | exec () |
ResultIterator | query () |
Returns a ResultIterator to be used to iterate over the result of the db query. | |
template<typename T> | |
T | queryScalar () |
void | reset () |
Reset this Statement. Use this before binding other arguments to this Statement. | |
int | lastInsertId () |
int | affectedRows () |
Private Member Functions | |
Statement (const char *sql, sqlite3 *db) | |
Statement (sqlite3_stmt *stmt, sqlite3 *db) | |
Private Attributes | |
sqlite3_stmt * | m_stmt |
sqlite3 * | m_dbhandle |
int | m_argpos |
bool | m_finalize |
Friends | |
class | SqliteDB |
Definition at line 117 of file sqlitepp.h.
typedef boost::shared_ptr<Statement> SQLitePP::Statement::Pointer |
Definition at line 137 of file sqlitepp.h.
SQLitePP::Statement::Statement | ( | const char * | sql, | |
sqlite3 * | db | |||
) | [inline, private] |
Definition at line 126 of file sqlitepp.h.
SQLitePP::Statement::Statement | ( | sqlite3_stmt * | stmt, | |
sqlite3 * | db | |||
) | [inline, private] |
Definition at line 131 of file sqlitepp.h.
SQLitePP::Statement::BOOST_PP_REPEAT | ( | BOOST_PP_INC(MAX_ARGUMENTS) | , | |
BINDARGS | , | |||
_ | ||||
) | [inline] |
Statement& SQLitePP::Statement::bindArg | ( | const std::string & | argument, | |
int | pos = 0 | |||
) | [inline] |
Statement& SQLitePP::Statement::bindArg | ( | const char * | argument, | |
int | pos = 0 | |||
) | [inline] |
Statement& SQLitePP::Statement::bindArg | ( | int | argument, | |
unsigned int | pos = 0 | |||
) | [inline] |
Statement& SQLitePP::Statement::bindArg | ( | schma::UnicodePtr | argument, | |
int | pos = 0 | |||
) | [inline] |
Bind an argument to a Statement.
Definition at line 207 of file sqlitepp.h.
References m_argpos, m_stmt, and schma::toCharArray().
Statement& SQLitePP::Statement::exec | ( | ) | [inline] |
Definition at line 215 of file sqlitepp.h.
References m_dbhandle, m_stmt, reset(), and SQLitePP::showSqlite3Error().
ResultIterator SQLitePP::Statement::query | ( | ) | [inline] |
Returns a ResultIterator to be used to iterate over the result of the db query.
Definition at line 226 of file sqlitepp.h.
References m_argpos, and m_stmt.
Referenced by queryScalar().
T SQLitePP::Statement::queryScalar | ( | ) | [inline] |
Definition at line 233 of file sqlitepp.h.
References SQLitePP::ResultIterator::get(), SQLitePP::ResultIterator::hasMoreRows(), p_assert, and query().
void SQLitePP::Statement::reset | ( | ) | [inline] |
Reset this Statement. Use this before binding other arguments to this Statement.
Definition at line 243 of file sqlitepp.h.
References m_argpos, and m_stmt.
Referenced by BOOST_PP_REPEAT(), and exec().
int SQLitePP::Statement::lastInsertId | ( | ) | [inline] |
int SQLitePP::Statement::affectedRows | ( | ) | [inline] |
friend class SqliteDB [friend] |
Definition at line 124 of file sqlitepp.h.
sqlite3_stmt* SQLitePP::Statement::m_stmt [private] |
Definition at line 119 of file sqlitepp.h.
Referenced by bindArg(), BOOST_PP_REPEAT(), exec(), query(), and reset().
sqlite3* SQLitePP::Statement::m_dbhandle [private] |
Definition at line 120 of file sqlitepp.h.
Referenced by affectedRows(), exec(), and lastInsertId().
int SQLitePP::Statement::m_argpos [private] |
bool SQLitePP::Statement::m_finalize [private] |