Class encapsulating the general insert statement into database.
More...
#include <DatabaseStatements.h>
|
std::shared_ptr< sqlite3 > | ptrSql3 {nullptr} |
|
std::unique_ptr< sqlite3_stmt, int(*)(sqlite3_stmt *)> | ptrStmt {nullptr, [](sqlite3_stmt* pStmt) {return sqlite3_finalize(pStmt);}} |
|
std::string | buffer |
|
size_t | id_position {0} |
|
Class encapsulating the general insert statement into database.
§ GeneralStatement() [1/3]
agroeye::handlers::GeneralStatement::GeneralStatement |
( |
| ) |
|
|
inlineprotected |
§ GeneralStatement() [2/3]
agroeye::handlers::GeneralStatement::GeneralStatement |
( |
std::shared_ptr< sqlite3 > |
aPtrSql3 | ) |
|
|
inlineprotected |
§ GeneralStatement() [3/3]
§ flush()
void agroeye::handlers::GeneralStatement::flush |
( |
| ) |
|
Performs flush by destroying insert statement and creates a new one
§ operator=()
§ prepare()
void agroeye::handlers::GeneralStatement::prepare |
( |
| ) |
|
|
protected |
Prepares SQL statemnt to bind data with binary statement
§ process()
void agroeye::handlers::GeneralStatement::process |
( |
| ) |
|
Proceeds with already bind values
§ setId()
void agroeye::handlers::GeneralStatement::setId |
( |
const uint32_t & |
id | ) |
|
Sets id value of inserting row.
- Parameters
-
§ buffer
std::string agroeye::handlers::GeneralStatement::buffer |
|
protected |
The buffer containing SQL string used for binding for fast insertions
§ id_position
size_t agroeye::handlers::GeneralStatement::id_position {0} |
|
protected |
Position of primary key in binding SQL statement
§ ptrSql3
std::shared_ptr<sqlite3> agroeye::handlers::GeneralStatement::ptrSql3 {nullptr} |
|
protected |
Pointer to the location of SQLite3 database
§ ptrStmt
std::unique_ptr<sqlite3_stmt, int(*)(sqlite3_stmt*)> agroeye::handlers::GeneralStatement::ptrStmt {nullptr, [](sqlite3_stmt* pStmt) {return sqlite3_finalize(pStmt);}} |
|
protected |
Binded statement, only one copy allowed
The documentation for this class was generated from the following files: