#include <result.h>
Inheritance diagram for mysqlpp::ResultBase:
Public Member Functions | |
virtual | ~ResultBase () |
Destroy object. | |
const Field & | fetch_field () const |
Returns the next field in this result set. | |
const Field & | fetch_field (Fields::size_type i) const |
Returns the given field in this result set. | |
const Field & | field (unsigned int i) const |
Get the underlying Field structure given its index. | |
const Fields & | fields () const |
Get the underlying Fields structure. | |
const std::string & | field_name (int i) const |
Get the name of the field at the given index. | |
const RefCountedPointer< FieldNames > & | field_names () const |
Get the names of the fields within this result set. | |
int | field_num (const std::string &) const |
Get the index of the named field. | |
const FieldTypes::value_type & | field_type (int i) const |
Get the type of a particular field within this result set. | |
const RefCountedPointer< FieldTypes > & | field_types () const |
Get a list of the types of the fields within this result set. | |
size_t | num_fields () const |
Returns the number of fields in this result set. | |
const char * | table () const |
Return the name of the table the result set comes from. | |
Protected Member Functions | |
ResultBase () | |
Create empty object. | |
ResultBase (MYSQL_RES *result, DBDriver *dbd, bool te=true) | |
Create the object, fully initialized. | |
ResultBase (const ResultBase &other) | |
Create object as a copy of another ResultBase. | |
ResultBase & | copy (const ResultBase &other) |
Copy another ResultBase object's contents into this one. | |
Protected Attributes | |
DBDriver * | driver_ |
Access to DB driver; fully initted if nonzero. | |
Fields | fields_ |
list of fields in result | |
RefCountedPointer< FieldNames > | names_ |
list of field names in result | |
RefCountedPointer< FieldTypes > | types_ |
list of field types in result | |
Fields::size_type | current_field_ |
Default field index used by fetch_field(). |
Not useful directly. Just contains common functionality for its subclasses.
int mysqlpp::ResultBase::field_num | ( | const std::string & | ) | const |
Get the index of the named field.
This is the inverse of field_name().
Fields::size_type mysqlpp::ResultBase::current_field_ [mutable, protected] |
Default field index used by fetch_field().
It's mutable because it's just internal housekeeping: it's changed by fetch_field(void), but it doesn't change the "value" of the result. See mutability justification for UseQueryResult::result_: this field provides functionality we used to get through result_, so it's relevant here, too.