Belle II Software
release-08-01-10
|
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 &¶m) |
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 ¶m) |
bind a string parameter | |
int | bind (int index, const std::vector< std::byte > ¶m) |
bind a bytestream | |
template<class T > | |
int | bind (int index, const std::optional< T > ¶m) |
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 | |
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.