Apache Ignite C++
Public Member Functions | List of all members
ignite::cache::query::QueryFieldsRow Class Reference

Query fields cursor. More...

#include <query_fields_row.h>

Public Member Functions

 QueryFieldsRow ()
 Default constructor. More...
 
 QueryFieldsRow (impl::cache::query::QueryFieldsRowImpl *impl)
 Constructor. More...
 
bool HasNext ()
 Check whether next entry exists. More...
 
bool HasNext (IgniteError &err)
 Check whether next entry exists. More...
 
template<typename T >
GetNext ()
 Get next entry. More...
 
template<typename T >
GetNext (IgniteError &err)
 Get next entry. More...
 
int32_t GetNextInt8Array (int8_t *dst, int32_t len)
 Get next entry assuming it's an array of 8-byte signed integers. More...
 
bool IsValid () const
 Check if the instance is valid. More...
 

Detailed Description

Query fields cursor.

This class is implemented as a reference to an implementation so copying of this class instance will only create another reference to the same underlying object. Underlying object will be released automatically once all the instances are destructed.

Constructor & Destructor Documentation

◆ QueryFieldsRow() [1/2]

ignite::cache::query::QueryFieldsRow::QueryFieldsRow ( )
inline

Default constructor.

Constructed instance is not valid and thus can not be used.

◆ QueryFieldsRow() [2/2]

ignite::cache::query::QueryFieldsRow::QueryFieldsRow ( impl::cache::query::QueryFieldsRowImpl *  impl)
inline

Constructor.

Internal method. Should not be used by user.

Parameters
implImplementation.

Member Function Documentation

◆ GetNext() [1/2]

template<typename T >
T ignite::cache::query::QueryFieldsRow::GetNext ( )
inline

Get next entry.

Template argument type should be default-constructable, copy-constructable and assignable. Also BinaryType class template should be specialized for this type.

This method should only be used on the valid instance.

Returns
Next entry.
Exceptions
IgniteErrorclass instance in case of failure.

◆ GetNext() [2/2]

template<typename T >
T ignite::cache::query::QueryFieldsRow::GetNext ( IgniteError err)
inline

Get next entry.

Properly sets error param in case of failure.

Template argument type should be default-constructable, copy-constructable and assignable. Also BinaryType class template should be specialized for this type.

This method should only be used on the valid instance.

Parameters
errUsed to set operation result.
Returns
Next entry on success and default-constructed type instance on failure.

◆ GetNextInt8Array()

int32_t ignite::cache::query::QueryFieldsRow::GetNextInt8Array ( int8_t *  dst,
int32_t  len 
)
inline

Get next entry assuming it's an array of 8-byte signed integers.

Maps to "byte[]" type in Java.

This method should only be used on the valid instance.

Parameters
dstArray to store data to.
lenExpected length of array.
Returns
Actual amount of elements read. If "len" argument is less than actual array size or resulting array is set to null, nothing will be written to resulting array and returned value will contain required array length. -1 will be returned in case array in stream was null.
Exceptions
IgniteErrorclass instance in case of failure.

◆ HasNext() [1/2]

bool ignite::cache::query::QueryFieldsRow::HasNext ( )
inline

Check whether next entry exists.

This method should only be used on the valid instance.

Returns
True if next entry exists.
Exceptions
IgniteErrorclass instance in case of failure.

◆ HasNext() [2/2]

bool ignite::cache::query::QueryFieldsRow::HasNext ( IgniteError err)
inline

Check whether next entry exists.

Properly sets error param in case of failure.

This method should only be used on the valid instance.

Parameters
errUsed to set operation result.
Returns
True if next entry exists and operation resulted in success. Returns false on failure.

◆ IsValid()

bool ignite::cache::query::QueryFieldsRow::IsValid ( ) const
inline

Check if the instance is valid.

Invalid instance can be returned if some of the previous operations have resulted in a failure. For example invalid instance can be returned by not-throwing version of method in case of error. Invalid instances also often can be created using default constructor.

Returns
True if the instance is valid and can be used.

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