Content result class is a wrapper for the data that was retrieved from the content query.
More...
#include <content_result.hpp>
|
| ContentResult () |
| Constructor.
|
|
| ContentResult (ContentDataSharedPtr data) |
| Constructor.
|
|
ContentDataSharedPtr | get () const |
| Retrieves content data from this result. Internal, do not use.
|
|
size_t | getColumnCount () |
| Returns total number of columns in the result set.
|
|
string | getColumnName (size_t columnIndex) |
| Returns name of the column in given index.
|
|
ContentDataType | getColumnType (const string &name) |
| Returns data type of the column.
|
|
ContentDataType | getColumnType (size_t columnIndex) |
| Returns data type of the column in given index.
|
|
string | getColumnValue (size_t columnIndex) |
| Returns value of the column, as string.
|
|
size_t | getRowCount () |
| Returns total number of rows in the result set.
|
|
size_t | getRowIndex () |
| Returns index of current row in result set.
|
|
size_t | getStartIndex () const |
| Retrieve the previously stored start index.
|
|
template<class T > |
T | getValue (size_t columnIndex) |
| Returns value from specific column in current row (for simple types).
|
|
bool | isEmptyData () const |
| Checks if the contained data is empty.
|
|
void | pack (QueryResponseData &data) |
| Writes data from QueryResponseData to this result.
|
|
void | set (ContentDataSharedPtr data) |
| Sets content data in to this result. Internal, do not use.
|
|
void | setRowIndex (size_t index) |
| Sets index of current row in result set.
|
|
void | setStartIndex (size_t startIndex) |
| Sets a start index.
|
|
void | unpack (const QueryResponseData &data, bool resetData=true) |
| Writes data from this result to QueryResponseData.
|
|
| ~ContentResult () |
| Destructor.
|
|
Content result class is a wrapper for the data that was retrieved from the content query.
It is possible to serialize an instance of this class from server to client.
◆ ContentResult() [1/2]
kanzi::connect::ContentResult::ContentResult |
( |
| ) |
|
◆ ContentResult() [2/2]
Constructor.
- Parameters
-
data | Actual data from the content query. |
◆ ~ContentResult()
kanzi::connect::ContentResult::~ContentResult |
( |
| ) |
|
◆ get()
Retrieves content data from this result. Internal, do not use.
◆ getColumnCount()
size_t kanzi::connect::ContentResult::getColumnCount |
( |
| ) |
|
Returns total number of columns in the result set.
- Returns
- Number of columns.
◆ getColumnName()
string kanzi::connect::ContentResult::getColumnName |
( |
size_t | columnIndex | ) |
|
Returns name of the column in given index.
- Parameters
-
columnIndex | Index of the column. |
- Returns
- Name of the column.
◆ getColumnType() [1/2]
ContentDataType kanzi::connect::ContentResult::getColumnType |
( |
const string & | name | ) |
|
Returns data type of the column.
- Parameters
-
- Returns
- Data type of the column.
◆ getColumnType() [2/2]
ContentDataType kanzi::connect::ContentResult::getColumnType |
( |
size_t | columnIndex | ) |
|
Returns data type of the column in given index.
- Parameters
-
columnIndex | Index of the column. |
- Returns
- Data type of the column.
◆ getColumnValue()
string kanzi::connect::ContentResult::getColumnValue |
( |
size_t | columnIndex | ) |
|
Returns value of the column, as string.
- Parameters
-
columnIndex | Index of the column. |
- Returns
- Value as string.
◆ getRowCount()
size_t kanzi::connect::ContentResult::getRowCount |
( |
| ) |
|
Returns total number of rows in the result set.
- Returns
- Number of rows.
◆ getRowIndex()
size_t kanzi::connect::ContentResult::getRowIndex |
( |
| ) |
|
Returns index of current row in result set.
- Returns
- index of the row that is currently being iterated.
◆ getStartIndex()
size_t kanzi::connect::ContentResult::getStartIndex |
( |
| ) |
const |
Retrieve the previously stored start index.
- Returns
- start index
◆ getValue()
template<class T >
T kanzi::connect::ContentResult::getValue |
( |
size_t | columnIndex | ) |
|
|
inline |
Returns value from specific column in current row (for simple types).
- Parameters
-
columnIndex | Index of the column. |
- Returns
- Value as Type.
◆ isEmptyData()
bool kanzi::connect::ContentResult::isEmptyData |
( |
| ) |
const |
Checks if the contained data is empty.
- Returns
- If true, there is no content in this result.
◆ pack()
void kanzi::connect::ContentResult::pack |
( |
QueryResponseData & | data | ) |
|
Writes data from QueryResponseData to this result.
Internal, do not use.
- Parameters
-
data | response data where to write information to. |
◆ set()
Sets content data in to this result. Internal, do not use.
◆ setRowIndex()
void kanzi::connect::ContentResult::setRowIndex |
( |
size_t | index | ) |
|
Sets index of current row in result set.
- Parameters
-
index | New index to be set as current. |
◆ setStartIndex()
void kanzi::connect::ContentResult::setStartIndex |
( |
size_t | startIndex | ) |
|
Sets a start index.
- Parameters
-
startIndex | new start index to be stored. |
◆ unpack()
void kanzi::connect::ContentResult::unpack |
( |
const QueryResponseData & | data, |
|
|
bool | resetData = true ) |
Writes data from this result to QueryResponseData.
Internal, do not use.
- Parameters
-
data | where to read information from |
resetData | whether to reset internal contents before unpack. defaults to true. |
The documentation for this class was generated from the following file:
- connect/content/content_result.hpp