Sparksee  6.0.2
ResultSet Class Reference

ResultSet class. More...

Inheritance diagram for ResultSet:
Inheritance graph
Collaboration diagram for ResultSet:
Collaboration graph

Public Member Functions

virtual ~ResultSet ()
 Destructor.
 
int32_t GetNumColumns () const
 Gets the number of columns. More...
 
const std::wstring & GetColumnName (int32_t index) const
 Gets the name for the given column. More...
 
int32_t GetColumnIndex (const std::wstring &name) const
 Gets the column index for the given column name. More...
 
DataType GetColumnDataType (int32_t index) const
 Gets the datatype for the given column. More...
 
bool_t Next ()
 Fetches the next row. More...
 
void GetColumn (int32_t index, Value &value) const
 Gets the value for the given column. More...
 
ValueGetColumn (int32_t index) const
 Gets the value for the given column. More...
 
void Rewind ()
 Positions the cursor before the first row.
 
const std::wstring & GetJSON (int32_t rows)
 Returns rows in JSON format. More...
 

Private Member Functions

sparksee_core::ResultSet * GetHandler ()
 Gets the handled reference. More...
 
const sparksee_core::ResultSet * GetHandler () const
 Gets the handled reference. More...
 
void SetHandler (sparksee_core::ResultSet *h)
 Sets the handled reference. More...
 
void FreeHandler ()
 Frees (deletes) the handled reference.
 
bool_t IsNull () const
 Gets if the handler is NULL. More...
 

Friends

class Query
 

Detailed Description

ResultSet class.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

void ResultSet::GetColumn ( int32_t  index,
Value value 
) const

Gets the value for the given column.

Parameters
index[in] Column index.
value[in|out] Value.
Exceptions
QueryExceptionIf a database access error occurs.
Value* ResultSet::GetColumn ( int32_t  index) const

Gets the value for the given column.

Parameters
index[in] Column index.
Returns
The Value of the given column.
Exceptions
QueryExceptionIf a database access error occurs.
DataType ResultSet::GetColumnDataType ( int32_t  index) const

Gets the datatype for the given column.

Parameters
index[in] Column index.
Returns
DataType for the given column.
int32_t ResultSet::GetColumnIndex ( const std::wstring &  name) const

Gets the column index for the given column name.

Parameters
name[in] Column name.
Returns
Column index.
const std::wstring& ResultSet::GetColumnName ( int32_t  index) const

Gets the name for the given column.

Parameters
index[in] Column index.
Returns
Column name.
const std::wstring& ResultSet::GetJSON ( int32_t  rows)

Returns rows in JSON format.

Rows are returned from the current position.

Parameters
rows[in] Maximum number of rows
Returns
JSON representation of the next <rows> rows in the resultset
int32_t ResultSet::GetNumColumns ( ) const

Gets the number of columns.

Columns are in the range [0...COLUMNS).

Returns
The number of columns.
bool_t ResultSet::Next ( )

Fetches the next row.

A ResultSet cursor is initially positioned before the first row; the first call to the method "Next" makes the first row the current row; the second call makes the second row the current row, and so on.

Returns
TRUE if the next row has been successfully fetched, FALSE otherwise.
Exceptions
QueryExceptionIf a database access error occurs.

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