Belle II Software
release-08-01-10
|
Struct to fill the different columns in a sqlite result row into a std::tuple. More...
#include <sqlite.h>
Public Member Functions | |
ColumnFiller (sqlite3_stmt *statement) | |
Create a new instance for the given statement. | |
void | operator() (int index, int &col) |
Fill integer column. | |
void | operator() (int index, int64_t &col) |
Fill 64bit integer column. | |
void | operator() (int index, double &col) |
Fill double column. | |
void | operator() (int index, std::string &col) |
Fill string column. | |
void | operator() (int index, std::vector< std::byte > &col) |
Fill blob column. | |
template<class T > | |
void | operator() (int index, std::optional< T > &col) |
Fill an possibly null column in an optional. | |
Private Attributes | |
sqlite3_stmt * | m_stmt |
statement on which to work on | |
Struct to fill the different columns in a sqlite result row into a std::tuple.
So given a sqlite statement with result values and a std::tuple to adopt all these values this class can be used to extract the values of the row into the given references with the correct types.