#include <Transaction.h>
Definition at line 24 of file Transaction.h.
cet::sqlite::Transaction::Transaction |
( |
sqlite3 * |
db | ) |
|
|
explicitnoexcept |
Definition at line 20 of file Transaction.cc.
23 int const rc{sqlite3_exec(
db_,
"BEGIN;",
nullptr,
nullptr,
nullptr)};
24 if (
rc != SQLITE_OK) {
26 <<
"Failed to start SQLite transaction due to status code " <<
rc <<
":\n" 27 << sqlite3_errmsg(
db_) <<
'\n';
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
cet::sqlite::Transaction::~Transaction |
( |
| ) |
|
|
noexcept |
Definition at line 31 of file Transaction.cc.
36 sqlite3_exec(
db_,
"ROLLBACK;",
nullptr,
nullptr,
nullptr);
37 std::cerr <<
"Transaction d'tor called before commit was called.\n";
cet::sqlite::Transaction::Transaction |
( |
Transaction const & |
| ) |
|
|
delete |
cet::sqlite::Transaction::Transaction |
( |
Transaction && |
| ) |
|
|
delete |
void cet::sqlite::Transaction::commit |
( |
| ) |
|
|
noexcept |
Definition at line 42 of file Transaction.cc.
45 set_to_null_when_done sentry{
db_};
46 int const rc{sqlite3_exec(
db_,
"COMMIT;",
nullptr,
nullptr,
nullptr)};
47 if (
rc != SQLITE_OK) {
49 <<
"Failed to commit SQLite transaction due to status code " <<
rc 51 << sqlite3_errmsg(
db_) <<
'\n';
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
sqlite3* cet::sqlite::Transaction::db_ |
|
private |
The documentation for this class was generated from the following files: