more on database
This commit is contained in:
parent
5e5ba3b31f
commit
caa35b36ac
2 changed files with 12 additions and 0 deletions
|
@ -18,4 +18,14 @@ void Database::exec(const std::string& sql)
|
|||
if (errCode) {
|
||||
throw std::runtime_error("Error in SQL execution.");
|
||||
}
|
||||
}
|
||||
|
||||
void Database::beginTransaction()
|
||||
{
|
||||
exec("BEGIN TRANSACTION");
|
||||
}
|
||||
|
||||
void Database::endTransaction()
|
||||
{
|
||||
exec("END TRANSACTION");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue