WORM 0.2
A C++ DAL/ORM code generation framework
Public Member Functions | Protected Member Functions | Friends

WSql::WMysqlResult Class Reference

WMysqlResult is the type of result set used by the MySQL driver. More...

#include <wmysqlresult.h>

Inheritance diagram for WSql::WMysqlResult:

List of all members.

Public Member Functions

 WMysqlResult (const WSql::WSqlDriver *driver)
 ~WMysqlResult ()
void addRecord (WSqlRecord &r)
void setIsCached (bool b)
bool isCached ()
int size () const
int count () const
bool empty () const
bool hasOutValues () const
void clear ()
WSqlRecord current ()
WSqlRecord fetch (int i=-1)
WSqlRecord fetchFirst ()
WSqlRecord fetchLast ()
WSqlRecord fetchNext ()
WSqlRecord fetchPrevious ()

Protected Member Functions

bool seek (int i, bool relative=false)
bool next ()
bool previous ()
bool first ()
bool last ()

Friends

class WMysqlDriver

Detailed Description

WMysqlResult is the type of result set used by the MySQL driver.

result set object for MySQL

Note:
Results from mysql are _always_ cached at the moment so this class is mostly a stub - no methods have been implemented.
Todo:
uncached results if possible.
See also:
WSqlResult

Definition at line 29 of file wmysqlresult.h.


Constructor & Destructor Documentation

WSql::WMysqlResult::WMysqlResult ( const WSql::WSqlDriver driver)

Definition at line 35 of file wmysqlresult.cpp.

WSql::WMysqlResult::~WMysqlResult ( )

Definition at line 45 of file wmysqlresult.cpp.


Member Function Documentation

void WSql::WMysqlResult::addRecord ( WSqlRecord r) [inline]
Todo:
virtual bool operator==(const WSqlResult& other) const;

Reimplemented from WSql::WSqlResult.

Definition at line 39 of file wmysqlresult.h.

void WSql::WMysqlResult::clear ( ) [inline, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 48 of file wmysqlresult.h.

int WSql::WMysqlResult::count ( ) const [inline, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 44 of file wmysqlresult.h.

WSqlRecord WSql::WMysqlResult::current ( ) [virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 66 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::empty ( ) const [inline, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 45 of file wmysqlresult.h.

WSqlRecord WSql::WMysqlResult::fetch ( int  index = -1) [virtual]

Returns the record from an arbitrary (zero-based) row index.

If the index is not in valid range an empty record is returned.

See also:
isActive(), fetchFirst(), fetchLast(), fetchNext(), fetchPrevious()

Reimplemented from WSql::WSqlResult.

Definition at line 72 of file wmysqlresult.cpp.

WSqlRecord WSql::WMysqlResult::fetchFirst ( ) [virtual]

Returns the record from the first record (row 0) in the result.

See also:
fetch(), fetchLast()

Reimplemented from WSql::WSqlResult.

Definition at line 78 of file wmysqlresult.cpp.

WSqlRecord WSql::WMysqlResult::fetchLast ( ) [virtual]

Returns the record from the last record (last row) in the result.

See also:
fetch(), fetchFirst()

Reimplemented from WSql::WSqlResult.

Definition at line 84 of file wmysqlresult.cpp.

WSqlRecord WSql::WMysqlResult::fetchNext ( ) [virtual]

Returns the record from the next available record (row) in the result.

See also:
fetch(), fetchPrevious()

Reimplemented from WSql::WSqlResult.

Definition at line 90 of file wmysqlresult.cpp.

WSqlRecord WSql::WMysqlResult::fetchPrevious ( ) [virtual]

Returns the record from the previous record (row) in the result.

Reimplemented from WSql::WSqlResult.

Definition at line 96 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::first ( ) [protected, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 102 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::hasOutValues ( ) const [inline, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 46 of file wmysqlresult.h.

bool WSql::WMysqlResult::isCached ( ) [inline]

Definition at line 42 of file wmysqlresult.h.

bool WSql::WMysqlResult::last ( ) [protected, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 108 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::next ( ) [protected, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 114 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::previous ( ) [protected, virtual]

Reimplemented from WSql::WSqlResult.

Definition at line 120 of file wmysqlresult.cpp.

bool WSql::WMysqlResult::seek ( int  pos,
bool  relative = false 
) [protected, virtual]
Todo:
test this

Reimplemented from WSql::WSqlResult.

Definition at line 126 of file wmysqlresult.cpp.

void WSql::WMysqlResult::setIsCached ( bool  b) [inline]

Reimplemented from WSql::WSqlResult.

Definition at line 40 of file wmysqlresult.h.

int WSql::WMysqlResult::size ( ) const [inline, virtual]

Returns the number of records in the result returned from a SELECT statement. Note that this will be 0 if no results were returned..

See also:
numRowsAffected()

Reimplemented from WSql::WSqlResult.

Definition at line 43 of file wmysqlresult.h.


Friends And Related Function Documentation

friend class WMysqlDriver [friend]

Definition at line 67 of file wmysqlresult.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines