Sparksee 6.1.0
ResultSet Class Reference

ResultSet class. More...

#include <ResultSet.h>

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.
const std::wstring & GetColumnName (int32_t index) const
 Gets the name for the given column.
int32_t GetColumnIndex (const std::wstring &name) const
 Gets the column index for the given column name.
DataType GetColumnDataType (int32_t index) const
 Gets the datatype for the given column.
bool_t Next ()
 Fetches the next row.
void GetColumn (int32_t index, Value &value) const
 Gets the value for the given column.
ValueGetColumn (int32_t index) const
 Gets the value for the given column.
void Rewind ()
 Positions the cursor before the first row.
const std::wstring & GetJSON (int32_t rows)
 Returns rows in JSON format.

Friends

class Query

Detailed Description

ResultSet class.

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

Member Function Documentation

◆ GetColumn() [1/2]

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.

◆ GetColumn() [2/2]

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.

◆ GetColumnDataType()

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.

◆ GetColumnIndex()

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.

◆ GetColumnName()

const std::wstring & ResultSet::GetColumnName ( int32_t index) const

Gets the name for the given column.

Parameters
index[in] Column index.
Returns
Column name.

◆ GetJSON()

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

◆ GetNumColumns()

int32_t ResultSet::GetNumColumns ( ) const

Gets the number of columns.

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

Returns
The number of columns.

◆ Next()

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: