Main Page   Data Structures   File List   Data Fields  

CMyMySQLPPResult Class Reference

#include <MyMySQLPPResult.h>


Detailed Description

The result object contains one result set and can be used to enumerate through the rows and determine the structure of the result set.

Definition at line 32 of file MyMySQLPPResult.h.

Public Member Functions

 CMyMySQLPPResult (void)
 Class constructor.

 ~CMyMySQLPPResult (void)
 Class destructor.

void Free (void)
 Frees up space allocated by this result set.

MYSQL_RES * Detach (void)
 Detaches and returns the result set managed by this object.

void Attach (MYSQL_RES *Result)
 Frees the current result set managed by this object and attaches a new one.

MYSQL_ROW_OFFSET RowTell (void)
 Returns the current position of the row cursor for the last FetchRow(). Only use after CMyMySQLPPResult::StoreResult(), not CMyMySQLPPResult::UseResult().

MYSQL_ROW_OFFSET RowSeek (MYSQL_ROW_OFFSET Offset)
 Sets the row cursor to an arbitrary row in a query result set.

void DataSeek (__int64 Offset)
 Seeks to an arbitrary row in a query result set.

BOOL EndOfFile (void)
 Determines whether the last row of a result set has been read.

unsigned int NumFields (void)
 Returns the number of columns in a result set.

__int64 NumRows (void)
 Returns the number of rows in the result set.

BOOL FetchRow (CMyMySQLPPRow *row)
 Retrieves the next row of a result set.

CMyMySQLPPRow FetchRow (void)
 Retrieves the next row of a result set.

BOOL FetchRow (CMyMySQLPPRow *row, __int64 offset)
 Retrieves the next row of a result set at a specific offset.

CMyMySQLPPRow FetchRow (__int64 offset)
 Retrieves the next row of a result set at a specific offset.

CMyMySQLPPRow operator[] (__int64 offset)
 Retrieves the next row of a result set at a specific offset.

unsigned long * FetchLengths (void)
 Returns the lengths of the columns of the current row within a result set.

BOOL FetchField (CMyMySQLPPField *field)
 Returns the definition of one column of a result set.

CMyMySQLPPField FetchField (void)
 Returns the definition of one column of a result set.

BOOL FetchField (CMyMySQLPPField *field, unsigned int fieldnr)
 Returns the definition of a specific column of a result set.

CMyMySQLPPField FetchField (unsigned int fieldnr)
 Returns the definition of a specific column of a result set.

MYSQL_FIELD_OFFSET FieldSeek (MYSQL_FIELD_OFFSET offset)
 Sets the field cursor to the given offset. The next call to FetchField() will retrieve the field definition of the column associated with that offset.

MYSQL_FIELD_OFFSET FieldTell (void)
 Returns the position of the field cursor used for the last FetchField().


Constructor & Destructor Documentation

CMyMySQLPPResult::CMyMySQLPPResult void   
 

Class constructor.

Definition at line 33 of file MyMySQLPPResult.cpp.

CMyMySQLPPResult::~CMyMySQLPPResult void   
 

Class destructor.

Definition at line 39 of file MyMySQLPPResult.cpp.

References Free().


Member Function Documentation

void CMyMySQLPPResult::Attach MYSQL_RES *    Result
 

Frees the current result set managed by this object and attaches a new one.

Parameters:
Result New mysql result to be managed by this object

Definition at line 64 of file MyMySQLPPResult.cpp.

References Free().

Referenced by CMyMySQLPPConnection::ListDatabases(), CMyMySQLPPConnection::ListFields(), CMyMySQLPPConnection::ListProcesses(), CMyMySQLPPConnection::ListTables(), CMyMySQLPPConnection::StoreResult(), and CMyMySQLPPConnection::UseResult().

void CMyMySQLPPResult::DataSeek __int64    Offset
 

Seeks to an arbitrary row in a query result set.

Parameters:
Offset New offset in result set to read rows from

Definition at line 94 of file MyMySQLPPResult.cpp.

Referenced by FetchRow().

MYSQL_RES * CMyMySQLPPResult::Detach void   
 

Detaches and returns the result set managed by this object.

Returns:
mysql result set that was managed by this result object

Definition at line 55 of file MyMySQLPPResult.cpp.

BOOL CMyMySQLPPResult::EndOfFile void   
 

Determines whether the last row of a result set has been read.

Returns:
TRUE if there are no more rows or FALSE if there is at least one.

Definition at line 103 of file MyMySQLPPResult.cpp.

CMyMySQLPPField CMyMySQLPPResult::FetchField unsigned int    fieldnr
 

Returns the definition of a specific column of a result set.

Parameters:
fieldnr Number of field
Returns:
Field description

Definition at line 249 of file MyMySQLPPResult.cpp.

BOOL CMyMySQLPPResult::FetchField CMyMySQLPPField   field,
unsigned int    fieldnr
 

Returns the definition of a specific column of a result set.

Parameters:
field CMyMySQLPPField to store field description in
fieldnr Number of field
Returns:
TRUE if the field description has been stored or FALSE on failure

Definition at line 233 of file MyMySQLPPResult.cpp.

References CMyMySQLPPField::Attach(), and CMyMySQLPPField::Free().

CMyMySQLPPField CMyMySQLPPResult::FetchField void   
 

Returns the definition of one column of a result set.

Returns:
Field definition

Definition at line 218 of file MyMySQLPPResult.cpp.

BOOL CMyMySQLPPResult::FetchField CMyMySQLPPField   field
 

Returns the definition of one column of a result set.

Parameters:
field CMyMySQLPPField to store field description in
Returns:
TRUE if the field description has been stored or FALSE on failure

Definition at line 203 of file MyMySQLPPResult.cpp.

References CMyMySQLPPField::Attach(), and CMyMySQLPPField::Free().

unsigned long * CMyMySQLPPResult::FetchLengths void   
 

Returns the lengths of the columns of the current row within a result set.

Returns:
Array of longs describing the column length, terminated with NULL.

Definition at line 192 of file MyMySQLPPResult.cpp.

CMyMySQLPPRow CMyMySQLPPResult::FetchRow __int64    offset
 

Retrieves the next row of a result set at a specific offset.

Parameters:
offset Offset to read row from
Returns:
Next row in result set.

Definition at line 174 of file MyMySQLPPResult.cpp.

References DataSeek(), and FetchRow().

BOOL CMyMySQLPPResult::FetchRow CMyMySQLPPRow   row,
__int64    offset
 

Retrieves the next row of a result set at a specific offset.

Parameters:
row CMyMySQLPPRow to store row in
offset Offset to read row from
Returns:
TRUE if the row has been retrieved or FALSE on failure

Definition at line 164 of file MyMySQLPPResult.cpp.

References DataSeek(), and FetchRow().

CMyMySQLPPRow CMyMySQLPPResult::FetchRow void   
 

Retrieves the next row of a result set.

Returns:
Next row in result set.

Definition at line 149 of file MyMySQLPPResult.cpp.

Referenced by FetchRow(), and operator[]().

BOOL CMyMySQLPPResult::FetchRow CMyMySQLPPRow   row
 

Retrieves the next row of a result set.

Parameters:
row CMyMySQLPPRow to store row in
Returns:
TRUE if the row has been retrieved or FALSE on failure

Definition at line 134 of file MyMySQLPPResult.cpp.

References CMyMySQLPPRow::Attach(), and CMyMySQLPPRow::Free().

MYSQL_FIELD_OFFSET CMyMySQLPPResult::FieldSeek MYSQL_FIELD_OFFSET    offset
 

Sets the field cursor to the given offset. The next call to FetchField() will retrieve the field definition of the column associated with that offset.

Parameters:
offset New field cursor offset
Returns:
Old field cursor offset

Definition at line 263 of file MyMySQLPPResult.cpp.

MYSQL_FIELD_OFFSET CMyMySQLPPResult::FieldTell void   
 

Returns the position of the field cursor used for the last FetchField().

Returns:
Current field cursor offset

Definition at line 273 of file MyMySQLPPResult.cpp.

void CMyMySQLPPResult::Free void   
 

Frees up space allocated by this result set.

Definition at line 45 of file MyMySQLPPResult.cpp.

Referenced by Attach(), CMyMySQLPPConnection::ListDatabases(), CMyMySQLPPConnection::ListFields(), CMyMySQLPPConnection::ListProcesses(), CMyMySQLPPConnection::ListTables(), CMyMySQLPPConnection::StoreResult(), CMyMySQLPPConnection::UseResult(), and ~CMyMySQLPPResult().

unsigned int CMyMySQLPPResult::NumFields void   
 

Returns the number of columns in a result set.

Returns:
Number of fields (columns)

Definition at line 113 of file MyMySQLPPResult.cpp.

__int64 CMyMySQLPPResult::NumRows void   
 

Returns the number of rows in the result set.

Returns:
Number of rows

Definition at line 123 of file MyMySQLPPResult.cpp.

CMyMySQLPPRow CMyMySQLPPResult::operator[] __int64    offset
 

Retrieves the next row of a result set at a specific offset.

Parameters:
offset Offset to read row from
Returns:
Next row in result set.

Definition at line 184 of file MyMySQLPPResult.cpp.

References FetchRow().

MYSQL_ROW_OFFSET CMyMySQLPPResult::RowSeek MYSQL_ROW_OFFSET    Offset
 

Sets the row cursor to an arbitrary row in a query result set.

Parameters:
Offset New position of the row cursor
Returns:
Old position of the row cursor

Definition at line 84 of file MyMySQLPPResult.cpp.

MYSQL_ROW_OFFSET CMyMySQLPPResult::RowTell void   
 

Returns the current position of the row cursor for the last FetchRow(). Only use after CMyMySQLPPResult::StoreResult(), not CMyMySQLPPResult::UseResult().

Returns:
Current position of the row cursor

Definition at line 73 of file MyMySQLPPResult.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 20 16:16:00 2003 for MyMySQL++ by doxygen1.3-rc3