dmlite::Statement Class Reference
Prepared statement wrapper.
More...
#include <MySqlWrapper.h>
List of all members.
Public Member Functions |
| Statement (MYSQL *conn, const std::string &db, const char *query) |
| ~Statement () throw () |
void | bindParam (unsigned index, int64_t) |
void | bindParam (unsigned index, const std::string &value) |
void | bindParam (unsigned index, const char *value, size_t size) |
unsigned long | execute (void) |
void | bindResult (unsigned index, short *destination) |
void | bindResult (unsigned index, unsigned short *destination) |
void | bindResult (unsigned index, signed int *destination) |
void | bindResult (unsigned index, unsigned int *destination) |
void | bindResult (unsigned index, signed long *destination) |
void | bindResult (unsigned index, unsigned long *destination) |
void | bindResult (unsigned index, signed long long *destination) |
void | bindResult (unsigned index, unsigned long long *destination) |
void | bindResult (unsigned index, char *destination, size_t size) |
void | bindResult (unsigned index, char *destination, size_t size, int) |
unsigned long | count (void) throw () |
bool | fetch (void) |
Private Types |
enum | Step {
STMT_CREATED,
STMT_EXECUTED,
STMT_RESULTS_UNBOUND,
STMT_RESULTS_BOUND,
STMT_DONE,
STMT_FAILED
} |
Private Member Functions |
void | throwException () |
| Throws the proper exception.
|
void | zeroNullResults () |
Private Attributes |
MYSQL_STMT * | stmt_ |
unsigned long | nParams_ |
unsigned long | nFields_ |
MYSQL_BIND * | params_ |
MYSQL_BIND * | result_ |
my_bool * | result_null_ |
Step | status_ |
Detailed Description
Prepared statement wrapper.
Member Enumeration Documentation
- Enumerator:
STMT_CREATED |
|
STMT_EXECUTED |
|
STMT_RESULTS_UNBOUND |
|
STMT_RESULTS_BOUND |
|
STMT_DONE |
|
STMT_FAILED |
|
Constructor & Destructor Documentation
dmlite::Statement::Statement |
( |
MYSQL * |
conn, |
|
|
const std::string & |
db, |
|
|
const char * |
query | |
|
) |
| | |
dmlite::Statement::~Statement |
( |
|
) |
throw () |
Member Function Documentation
void dmlite::Statement::bindParam |
( |
unsigned |
index, |
|
|
const char * |
value, |
|
|
size_t |
size | |
|
) |
| | |
void dmlite::Statement::bindParam |
( |
unsigned |
index, |
|
|
const std::string & |
value | |
|
) |
| | |
void dmlite::Statement::bindParam |
( |
unsigned |
index, |
|
|
int64_t |
| |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
char * |
destination, |
|
|
size_t |
size, |
|
|
int |
| |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
char * |
destination, |
|
|
size_t |
size | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
unsigned long long * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
signed long long * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
unsigned long * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
signed long * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
unsigned int * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
signed int * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
unsigned short * |
destination | |
|
) |
| | |
void dmlite::Statement::bindResult |
( |
unsigned |
index, |
|
|
short * |
destination | |
|
) |
| | |
unsigned long dmlite::Statement::count |
( |
void |
|
) |
throw () |
unsigned long dmlite::Statement::execute |
( |
void |
|
) |
|
bool dmlite::Statement::fetch |
( |
void |
|
) |
|
void dmlite::Statement::throwException |
( |
|
) |
[private] |
Throws the proper exception.
void dmlite::Statement::zeroNullResults |
( |
|
) |
[private] |
Member Data Documentation
The documentation for this class was generated from the following file: