Kanzi Connect 3.9.10
kanzi::connect::ContentResult Class Reference

Content result class is a wrapper for the data that was retrieved from the content query. More...

#include <content_result.hpp>

Public Member Functions

 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 >
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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ContentResult() [1/2]

kanzi::connect::ContentResult::ContentResult ( )

Constructor.

◆ ContentResult() [2/2]

kanzi::connect::ContentResult::ContentResult ( ContentDataSharedPtr data)

Constructor.

Parameters
dataActual data from the content query.

◆ ~ContentResult()

kanzi::connect::ContentResult::~ContentResult ( )

Destructor.

Member Function Documentation

◆ get()

ContentDataSharedPtr kanzi::connect::ContentResult::get ( ) const

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
columnIndexIndex 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
nameName of the column.
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
columnIndexIndex 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
columnIndexIndex 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
columnIndexIndex 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
dataresponse data where to write information to.

◆ set()

void kanzi::connect::ContentResult::set ( ContentDataSharedPtr data)

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
indexNew index to be set as current.

◆ setStartIndex()

void kanzi::connect::ContentResult::setStartIndex ( size_t startIndex)

Sets a start index.

Parameters
startIndexnew 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
datawhere to read information from
resetDatawhether to reset internal contents before unpack. defaults to true.

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