6 static const char* kCommit =
"COMMIT";
7 static const char* kRollback =
"ROLLBACK";
8 static const char* kBegginings[3] = {
"BEGIN DEFERRED",
"BEGIN IMMEDIATE",
"BEGIN EXCLUSIVE"};
12 m_connection(connection),
15 const char*
begin = kBegginings[
static_cast<int>(type)];
virtual ~transaction() noexcept
Destructor.
int execute(const dbconnection &connection, const std::string &text, Values &&...values)
Executes an SQL query on a database connection.
transaction(dbconnection &connection, const transactiontype type)
Implements a strictly scope-based SQLite transaction.
Encapsulation of the error code and message from SQLite3, based on std::runtime_error.
virtual void commit()
Commit the transaction.
row_iterator begin(const statement &statement) noexcept
Returns an iterator to the first row of a statement.
Class that represents a connection to a database.
transactiontype
Used to specify the different types of SQLite transactions.