#include <result.h>
Inheritance diagram for mysqlpp::ResUse:
Public Methods | |
Row | fetch_row () |
Wraps mysql_fetch_row() in MySQL C API. | |
bool | eof () const |
Wraps mysql_eof() in MySQL C API. | |
unsigned long * | fetch_lengths () const |
Wraps mysql_fetch_lengths() in MySQL C API. | |
Field & | fetch_field () const |
Wraps mysql_fetch_field() in MySQL C API. | |
void | field_seek (int field) |
Wraps mysql_field_seek() in MySQL C API. | |
int | num_fields () const |
Wraps mysql_num_fields() in MySQL C API. | |
std::string & | table () |
Get the name of table that the result set comes from. | |
int | field_num (const std::string &) const |
Get the index of the named field. | |
std::string & | field_name (int) |
Get the name of the field at the given index. | |
FieldNames & | field_names () |
Get the names of the fields within this result set. | |
void | reset_field_names () |
Reset the names in the field list to their original values. | |
mysql_type_info & | field_type (int i) |
Get the MySQL type for a field given its index. | |
FieldTypes & | field_types () |
Get a list of the types of the fields within this result set. | |
void | reset_field_types () |
Reset the field types to their original values. | |
int | names (const std::string &s) const |
Alias for field_num(). | |
std::string & | names (int i) |
Alias for field_name(). | |
FieldNames & | names () |
Alias for field_names(). | |
void | reset_names () |
Alias for reset_field_names(). | |
mysql_type_info & | types (int i) |
Alias for field_type(). | |
FieldTypes & | types () |
Alias for field_types(). | |
void | reset_types () |
Alias for reset_field_types(). | |
const Fields & | fields () const |
Get the underlying Fields structure. | |
const Field & | fields (unsigned int i) const |
Get the underlying Field structure given its index. | |
Protected Methods | |
void | copy (const ResUse &other) |
copy another ResUse object's contents into this one. |
A "use" query is one where you make the query and then process just one row at a time in the result instead of dealing with them all as a single large chunk. (The name comes from the MySQL C API function that initiates this action, mysql_use_result().)
By calling fetch_row() until it throws a mysqlpp::BadQuery exception (or an empty row if exceptions are disabled), you can process the result set one row at a time.
|
copy another ResUse object's contents into this one. Not to be used on the self. Self-copy is not allowed. |
|
Wraps mysql_fetch_row() in MySQL C API. This is not a thin wrapper. It does a lot of error checking before returning the mysqlpp::Row object containing the row data. |
|
Get the name of the field at the given index. This is the inverse of field_num(). |
|
Get the index of the named field. This is the inverse of field_name(). |