ResultSet Class Reference
[Gdb]

ResultSet class. More...

Inheritance diagram for ResultSet:

Inheritance graph
Collaboration diagram for ResultSet:

Collaboration graph

List of all members.

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) const
 Returns rows in JSON format.

Friends

class Query


Detailed Description

ResultSet class.

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

Member Function Documentation

int32_t ResultSet::GetNumColumns (  )  const

Gets the number of columns.

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

Returns:
The number of columns.

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

Gets the name for the given column.

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

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.

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.

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:
QueryException If a database access error occurs.

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:
QueryException If 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:
QueryException If a database access error occurs.

const std::wstring ResultSet::GetJSON ( int32_t  rows  )  const

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


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

Generated on Tue Jun 2 13:44:22 2015 for Sparksee by  doxygen 1.5.6