![]() |
ATLAS Offline Software
|
SQLite prepared statement. More...
#include <Statement.h>
Public Member Functions | |
| Statement (sqlite3 *db, std::string_view sql, std::source_location call) | |
| Create a prepared statement attached to an SQLiteDBSvc This class should be constructed using the createStatement member function of SQLiteDBSvc. | |
| ~Statement () | |
| Statement ()=default | |
| Statement (const Statement &)=delete | |
| Statement & | operator= (Statement &&rhs) noexcept |
| Move assignment operator allows Statement member variables to be filled from createStatement. | |
| template<ValidColumnType... ReturnArgs, ValidParamType... ParamArgs> | |
| ResultTypeWrapper< ReturnArgs... >::type | run (ParamArgs... params) |
| Run the statement. | |
Private Member Functions | |
| void | reset () |
| Reset prepared statement for re-execution and clear bindings. | |
| bool | step () |
| Step through the prepared statement. | |
| void | bind (int index, std::int64_t value) |
| Bind an integer to a parameter. | |
| template<typename I> requires std::integral<I> | |
| void | bind (int index, I value) |
| void | bind (int index, double value) |
| Bind a double to a parameter. | |
| void | bind (int index, std::string_view value) |
| Bind a string to a parameter. | |
| template<ValidColumnType T, std::size_t I> | |
| T | column () |
| Retrieve a column. | |
| template<ValidColumnType... Ts, std::size_t... Is> | |
| std::tuple< Ts... > | columns (std::index_sequence< Is... >) |
| Retrieve columns. | |
Private Attributes | |
| std::recursive_mutex | m_stmtMutex |
| sqlite3_stmt * | m_stmt = nullptr |
| sqlite3 * | m_db = nullptr |
| std::source_location | m_creationPoint |
SQLite prepared statement.
Definition at line 50 of file Statement.h.
| SQLite::Statement::Statement | ( | sqlite3 * | db, |
| std::string_view | sql, | ||
| std::source_location | call ) |
Create a prepared statement attached to an SQLiteDBSvc This class should be constructed using the createStatement member function of SQLiteDBSvc.
Definition at line 12 of file Statement.cxx.
| SQLite::Statement::~Statement | ( | ) |
Definition at line 36 of file Statement.cxx.
|
default |
|
delete |
|
private |
Bind a double to a parameter.
Definition at line 80 of file Statement.cxx.
|
private |
|
private |
|
private |
Bind a string to a parameter.
Definition at line 87 of file Statement.cxx.
|
private |
Retrieve a column.
|
private |
Retrieve columns.
Move assignment operator allows Statement member variables to be filled from createStatement.
Definition at line 26 of file Statement.cxx.
|
private |
Reset prepared statement for re-execution and clear bindings.
Definition at line 44 of file Statement.cxx.
| ResultTypeWrapper< ReturnArgs... >::type SQLite::Statement::run | ( | ParamArgs... | params | ) |
Run the statement.
|
private |
Step through the prepared statement.
Definition at line 54 of file Statement.cxx.
|
private |
Definition at line 95 of file Statement.h.
|
private |
Definition at line 94 of file Statement.h.
|
private |
Definition at line 93 of file Statement.h.
|
private |
Definition at line 92 of file Statement.h.