mysql_cli::Result Class Reference

MySQL result set class. More...

#include <result.h>

List of all members.

Public Member Functions

 Result ()
 Default constructor.
 Result (MYSQL_RES *res)
 Constructor.
 Result (Result const &r)
 Copy constructor.
Resultoperator= (Result const &right)
 Assignment operator.
Resultoperator= (MYSQL_RES *right)
 Assignment operator for MYSQL_RES *.
 ~Result ()
 Destructor.
 operator MYSQL_RES * () const
 Conversion operator.
MYSQL_RES * result () const
 Returns pointer to the MYSQL_RES result set.
my_ulonglong num_rows ()
 Returns the number of rows in the result set.
MYSQL_ROW fetch_row ()
 Retrieves the next row of the result set (0 if no more rows).
unsigned long * fetch_lengths ()
 Returns the lengths of the columns of the current row.
void data_seek (my_ulonglong offset)
 Seeks to an arbitrary row in the result set.
MYSQL_ROW_OFFSET row_tell ()
 Returns the position of the row cursor used for the last fetch_row().
MYSQL_ROW_OFFSET row_seek (MYSQL_ROW_OFFSET offset)
 Sets the row cursor to the given offset.
unsigned int num_fields ()
 Returns the number of columns in the result set.
MYSQL_FIELD * fetch_field ()
 Returns the definition of one column of the result set.
MYSQL_FIELD * fetch_field (unsigned int fieldnum)
 Returns the definition of the given column of the result set.
MYSQL_FIELD * fetch_fields ()
 Returns an array of all MYSQL_FIELD structures of the result set.
MYSQL_FIELD_OFFSET field_tell ()
 Returns the position of the field cursor used for the last fetch_field().
MYSQL_FIELD_OFFSET field_seek (MYSQL_FIELD_OFFSET offset)
 Sets the field cursor to the given offset.

Classes

class  Shared


Detailed Description

This class encapsulates an instance of MYSQL_RES. It automatically frees it with mysql_free_result when it is not needed anymore. The result is reference counted; you may copy the class as needed, they'll all share the same result set.


Constructor & Destructor Documentation

mysql_cli::Result::Result MYSQL_RES *  res  )  [explicit]
 

Constructor.

Parameters:
[in] res The MYSQL_RES instance to manage in this class. It may be NULL.


Member Function Documentation

void mysql_cli::Result::data_seek my_ulonglong  offset  ) 
 

Seeks to an arbitrary row in the result set. Should not be used if the result set was obtained through mysql_use_result.

Parameters:
[in] offset The row number, which must be between 0 and num_rows() - 1.


The documentation for this class was generated from the following file:
Generated on Sun May 20 21:32:22 2007 for Epona API by  doxygen 1.4.6