HFSQtLi 0.0.1
A Qt/C++ wrapper for SQLite3.
Public Member Functions | Protected Attributes | List of all members
HFSQtLi::Call< T > Struct Template Reference

Template struct used to pass a callback that will be called upon fetching values. More...

#include <HFSQtLi.h>

Public Member Functions

 Call (const Helper::TypeUnusedRefBoolFunction< T... > &&f)
 
constexpr auto const & function () const
 

Protected Attributes

Helper::TypeUnusedRefBoolFunction< T... > m_function
 

Detailed Description

template<typename ... T>
struct HFSQtLi::Call< T >

Template struct used to pass a callback that will be called upon fetching values.

This struct will be instantiated with a list of types. Passing it to a function fetching data it will read that set of data and upon succesfully fetching it call the callback given to the constructor. Callback should have a signature:

The callback will have to return true on success or false on error

Example usage:

db->executeSingleAll(
"SELECT 1,2,3,4",
Call<int, UnusedN<2>, int> ([](int a, const int &b){ qDebug()<<a<<b; return true; }
)); // Will print 1, 4

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