Result set.
More...
#include <resultset.h>
|
typedef std::vector< Row * >::iterator | RowIterator |
|
|
| ResultSet (const std::string &json) |
| Construct a result set from a JSON document returned from the Fledge storage service. More...
|
|
| ~ResultSet () |
| Destructor for a result set.
|
|
unsigned int | rowCount () const |
|
unsigned int | columnCount () const |
|
const std::string & | columnName (unsigned int column) const |
| Return the name of a specific column. More...
|
|
ColumnType | columnType (unsigned int column) const |
| Return the type of a specific column. More...
|
|
ColumnType | columnType (const std::string &name) const |
|
RowIterator | firstRow () |
| Fetch an iterator for the rows in a result set. More...
|
|
RowIterator | nextRow (RowIterator it) |
| Given an iterator over the rows in a result set move to the next row in the result set. More...
|
|
bool | isLastRow (RowIterator it) const |
| Given an iterator over the rows in a result set return if there this is the last row in the result set. More...
|
|
bool | hasNextRow (RowIterator it) const |
| Given an iterator over the rows in a result set return if there are any more rows in the result set. More...
|
|
unsigned int | findColumn (const std::string &name) const |
| Find the named column in the result set and return the column index. More...
|
|
const Row * | operator[] (unsigned long rowNo) |
|
◆ ResultSet()
ResultSet::ResultSet |
( |
const std::string & |
json | ) |
|
Construct a result set from a JSON document returned from the Fledge storage service.
- Parameters
-
json | The JSON document to construct the result set from |
◆ columnName()
const string & ResultSet::columnName |
( |
unsigned int |
column | ) |
const |
Return the name of a specific column.
- Parameters
-
column | - the column number of the column to return. Columns are numbered from 0 |
- Returns
- string& The name of the column
- Exceptions
-
◆ columnType()
ColumnType ResultSet::columnType |
( |
unsigned int |
column | ) |
const |
Return the type of a specific column.
- Parameters
-
column | - the column number of the column to return. Columns are numbered from 0 |
- Returns
- ColumnType The type of the specified column
- Exceptions
-
◆ findColumn()
unsigned int ResultSet::findColumn |
( |
const std::string & |
name | ) |
const |
Find the named column in the result set and return the column index.
- Parameters
-
name | The name of the column to return |
- Returns
- unsigned int The index of the named column
- Exceptions
-
◆ firstRow()
ResultSet::RowIterator ResultSet::firstRow |
( |
| ) |
|
Fetch an iterator for the rows in a result set.
The iterator is positioned at the first row in the result set.
◆ hasNextRow()
bool ResultSet::hasNextRow |
( |
RowIterator |
it | ) |
const |
Given an iterator over the rows in a result set return if there are any more rows in the result set.
- Parameters
-
- Returns
- bool True if there are more rows in the result set
◆ isLastRow()
bool ResultSet::isLastRow |
( |
RowIterator |
it | ) |
const |
Given an iterator over the rows in a result set return if there this is the last row in the result set.
- Parameters
-
- Returns
- bool True if there are no more rows in the result set
◆ nextRow()
ResultSet::RowIterator ResultSet::nextRow |
( |
RowIterator |
it | ) |
|
Given an iterator over the rows in a result set move to the next row in the result set.
- Parameters
-
- Returns
- RowIterator New value of the iterator
- Exceptions
-
The documentation for this class was generated from the following files: