#include </data/code/userver/mysql/include/userver/storages/mysql/cursor_result_set.hpp>
A wrapper for read-only cursor.
Although this class can be constructed from StatementResultSet, you should always retrieve it from storages::mysql::Cluster
for correct behavior.
Definition at line 16 of file cursor_result_set.hpp.
Public Member Functions | |
CursorResultSet (StatementResultSet &&result_set) | |
CursorResultSet (const CursorResultSet &other)=delete | |
CursorResultSet (CursorResultSet &&other) noexcept | |
template<typename RowCallback > | |
void | ForEach (RowCallback &&row_callback, engine::Deadline deadline) && |
Fetches all the rows from cursor and for each new row executes row_callback. | |
|
explicit |
Definition at line 38 of file cursor_result_set.hpp.
void storages::mysql::CursorResultSet< T >::ForEach | ( | RowCallback && | row_callback, |
engine::Deadline | deadline ) && |
Fetches all the rows from cursor and for each new row executes row_callback.
Usable when the result set is expected to be big enough to put too much memory pressure if fetched as a whole.
Definition at line 48 of file cursor_result_set.hpp.