- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# mysqlpp::ResultBase Class Reference

Base class for StoreQueryResult and UseQueryResult. More...

`#include <result.h>`

Inheritance diagram for mysqlpp::ResultBase:

[legend]
Collaboration diagram for mysqlpp::ResultBase:

[legend]
List of all members.

## 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().

## Detailed Description

Base class for StoreQueryResult and UseQueryResult.

Not useful directly. Just contains common functionality for its subclasses.

## Member Function Documentation

int mysqlpp::ResultBase::field_num | ( | const std::string & |  | ) | const

Get the index of the named field.

This is the inverse of field_name().

## Member Data Documentation

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.

The documentation for this class was generated from the following files:

- result.h
- result.cpp