Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::result_set Class Reference

#include <result_set.h>

Public Member Functions

 result_set (std::shared_ptr< detail::result_set_impl > impl)
IGNITE_API const result_set_metadatametadata () const
IGNITE_API bool has_rowset () const
IGNITE_API std::int64_t affected_rows () const
IGNITE_API bool was_applied () const
IGNITE_API bool close_async (std::function< void(ignite_result< void >)> callback)
IGNITE_API bool close ()
IGNITE_API std::vector< ignite_tuplecurrent_page () &&
IGNITE_API const std::vector< ignite_tuple > & current_page () const &
IGNITE_API bool has_more_pages ()
IGNITE_API void fetch_next_page_async (std::function< void(ignite_result< void >)> callback)
IGNITE_API void fetch_next_page ()

Detailed Description

Query result set.

Constructor & Destructor Documentation

◆ result_set()

ignite::result_set::result_set ( std::shared_ptr< detail::result_set_impl > impl)
inlineexplicit

Constructor

Parameters
implImplementation

Member Function Documentation

◆ affected_rows()

std::int64_t ignite::result_set::affected_rows ( ) const
nodiscard

Gets the number of rows affected by the DML statement execution (such as "INSERT", "UPDATE", etc.), or 0 if the statement returns nothing (such as "ALTER TABLE", etc), or -1 if not applicable.

Returns
The number of rows affected by the DML statement execution.

◆ close()

bool ignite::result_set::close ( )

Close result set synchronously.

Returns
true if the request was sent, and false if the result set was already closed.

◆ close_async()

bool ignite::result_set::close_async ( std::function< void(ignite_result< void >)> callback)

Close result set asynchronously.

Parameters
callbackCallback to call on completion.
Returns
true if the request was sent, and false if the result set was already closed.

◆ current_page() [1/2]

std::vector< ignite_tuple > ignite::result_set::current_page ( ) &&
nodiscard

Retrieves current page. Result set is left empty after this operation and will return empty page on subsequent request unless there are more available pages and you call fetch_next_page().

Returns
Current page.

◆ current_page() [2/2]

const std::vector< ignite_tuple > & ignite::result_set::current_page ( ) const &
nodiscard

Gets current page.

Returns
Current page.

◆ fetch_next_page()

IGNITE_API void ignite::result_set::fetch_next_page ( )
inline

Fetch the next page of results synchronously. The current page is changed after the operation is complete.

◆ fetch_next_page_async()

void ignite::result_set::fetch_next_page_async ( std::function< void(ignite_result< void >)> callback)

Fetch the next page of results asynchronously. The current page is changed after the operation is complete.

Parameters
callbackCallback to call on completion.

◆ has_more_pages()

bool ignite::result_set::has_more_pages ( )
nodiscard

Checks whether there are more pages of results.

Returns
true if there are more pages with results and false otherwise.

◆ has_rowset()

bool ignite::result_set::has_rowset ( ) const
nodiscard

Gets a value indicating whether this result set contains a collection of rows.

Returns
A value indicating whether this result set contains a collection of rows.

◆ metadata()

const result_set_metadata & ignite::result_set::metadata ( ) const
nodiscard

Gets metadata.

Returns
Metadata.

◆ was_applied()

bool ignite::result_set::was_applied ( ) const
nodiscard

Gets a value indicating whether a conditional query (such as "CREATE TABLE IF NOT EXISTS") was applied successfully.

Returns
A value indicating whether a conditional query was applied successfully.

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