Belle II Software  release-08-01-10
ParameterBinder Class Reference

Bind the given parameter to the sqlite statement. More...

#include <sqlite.h>

Public Member Functions

 ParameterBinder (sqlite3_stmt *statement)
 Create a new object for the given statement.
 
template<class T >
void operator() (int index, T &&param)
 Bind the parameter with the given index to the statement.
 

Private Member Functions

int bind (int index, int param)
 bind an integer parameter
 
int bind (int index, int64_t param)
 bind a 64bit integer parameter
 
int bind (int index, double param)
 bind a double parameter
 
int bind (int index, const std::string &param)
 bind a string parameter
 
int bind (int index, const std::vector< std::byte > &param)
 bind a bytestream
 
template<class T >
int bind (int index, const std::optional< T > &param)
 bind an optional: if it doesn't have a value we bind NULL
 

Private Attributes

sqlite3_stmt * m_stmt
 statement on which to work on
 

Detailed Description

Bind the given parameter to the sqlite statement.

This functor object only serves the purpose to bind the values of the given parameters to a sqlite statement. So given a tuple of parameters it can be used to bind all the values in the tuple to the statement with the correct type.

Definition at line 110 of file sqlite.h.


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