userver: storages::mysql::CursorResultSet< T > Class Template Reference
Loading...
Searching...
No Matches
storages::mysql::CursorResultSet< T > Class Template Referencefinal

#include </data/code/userver/mysql/include/userver/storages/mysql/cursor_result_set.hpp>

Detailed Description

template<typename T>
class storages::mysql::CursorResultSet< T >

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.
 

Constructor & Destructor Documentation

◆ CursorResultSet()

template<typename T >
storages::mysql::CursorResultSet< T >::CursorResultSet ( StatementResultSet && result_set)
explicit

Definition at line 38 of file cursor_result_set.hpp.

Member Function Documentation

◆ ForEach()

template<typename T >
template<typename RowCallback >
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.


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