Webmaster  |  Imprint 
Platinum
Platinum C++ Framework
Main  |  License  |  Documentation  |  Download  |  Support 

Result Class Reference

#include <Pt/Db/Result.h>

List of all members.

Public Types

typedef size_t size_type
 The size-type used for the Result class.
typedef Row value_type
 The value-type contained in the result.

Public Member Functions

 Result ()
 default constructor
 Result (IResult *res)
 Construct a Result from an implemenataion.
Row getRow (size_type row_num) const
 Returns a row at a given index.
Value getValue (size_type row_num, size_type field_num) const
 Returns a value at a given result index and row index.
size_type size () const
 Returns the number of rows of this result.
bool empty () const
 Test if this result-object has no rows.
size_type getFieldCount () const
 Return the number of columns in the result.
Row operator[] (size_type row_num) const
 Returns a row at a given index.
ConstIterator begin () const
 Returns an iterator to the first row.
ConstIterator end () const
 Returns an iterator past the last row.
bool operator! () const
 Test if bound to a database-result.
const IResultgetImpl () const
 Returns the actual implementation-class.

Classes

class  ConstIterator
 Iterator to iterate over the rows of a result. More...


Detailed Description

The class holds a resultset of a query. Querys might return multiple rows, which are accessable here in arbitary order.

Constructor & Destructor Documentation

Result ( IResult res  ) 

Parameters:
res The implementation of a specific result.


Member Function Documentation

Row getRow ( size_type  row_num  )  const

Returns a row at a given index, without range checking.

Parameters:
row_num Index of row.
Returns:
Row at index.

Value getValue ( size_type  row_num,
size_type  field_num 
) const

Returns a value at a given index, without range checking.

Parameters:
row_num Index of row.
field_num Index of value.
Returns:
Value at indices.

size_type size (  )  const

Returns the number of rows.

Returns:
Number of rows in result.

bool empty (  )  const

Returns true if this result-object has no rows.

Returns:
True if result is empty.

size_type getFieldCount (  )  const

Returns the number of columns in the result.

Returns:
Number of columns.

Row operator[] ( size_type  row_num  )  const

Returns a row at a given index, without range checking.

Parameters:
row_num Specific row index.
Returns:
Row at index.

ConstIterator begin (  )  const

The returned iterator is a random access iterator, thus i can be used with all algorithms of the stl.

Returns:
Iterator to begin of result.

ConstIterator end (  )  const

The returned iterator is a random access iterator, thus i can be used with all algorithms of the stl.

Returns:
Iterator to end of result.

bool operator! (  )  const

Returns true if not bound to a database-result.

Returns:
True if unbound.

Copyright © 2003-2007 The Pt Development Team
Pt 1.0