ContentResult¶
-
class
kanzi::connect::ContentResult¶ 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.
Public Functions
-
ContentResult()¶ Constructor.
Constructor.
- Parameters
data: Actual data from the content query.
-
~ContentResult()¶ Destructor.
-
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.
- Return
Number of columns.
-
string
getColumnName(size_t columnIndex)¶ Returns name of the column in given index.
- Return
Name of the column.
- Parameters
columnIndex: Index of the column.
-
ContentDataType
getColumnType(size_t columnIndex)¶ Returns data type of the column in given index.
- Return
Data type of the column.
- Parameters
columnIndex: Index of the column.
-
ContentDataType
getColumnType(const string &name)¶ Returns data type of the column.
- Return
Data type of the column.
- Parameters
name: Name of the column.
-
string
getColumnValue(size_t columnIndex)¶ Returns value of the column, as string.
- Return
Value as string.
- Parameters
columnIndex: Index of the column.
-
size_t
getRowCount()¶ Returns total number of rows in the result set.
- Return
Number of rows.
-
size_t
getRowIndex()¶ Returns index of current row in result set.
- Return
index of the row that is currently being iterated.
-
size_t
getStartIndex() const¶ Retrieve the previously stored start index.
- Return
start index
-
template<class
T>
TgetValue(size_t columnIndex)¶ Returns value from specific column in current row (for simple types).
- Return
Value as Type.
- Parameters
columnIndex: Index of the column.
-
bool
isEmptyData() const¶ Checks if the contained data is empty.
- Return
If true, there is no content in this result.
-
void
pack(QueryResponseData &data)¶ Writes data from QueryResponseData to this result.
Internal, do not use.
- Parameters
data: response data where to write information to.
Sets content data in to this result. Internal, do not use.
-
void
setRowIndex(size_t index)¶ Sets index of current row in result set.
- Parameters
index: New index to be set as current.
-
void
setStartIndex(size_t startIndex)¶ Sets a start index.
- Parameters
startIndex: new start index to be stored.
-
void
unpack(const QueryResponseData &data, bool resetData = true)¶ Writes data from this result to QueryResponseData.
Internal, do not use.
- Parameters
data: where to read information fromresetData: whether to reset internal contents before unpack. defaults to true.
-