mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
28 lines
412 B
C++
28 lines
412 B
C++
|
#ifndef OPENMW_COMPONENTS_SQLITE3_TRANSACTION_H
|
||
|
#define OPENMW_COMPONENTS_SQLITE3_TRANSACTION_H
|
||
|
|
||
|
#include <memory>
|
||
|
|
||
|
struct sqlite3;
|
||
|
|
||
|
namespace Sqlite3
|
||
|
{
|
||
|
struct Rollback
|
||
|
{
|
||
|
void operator()(sqlite3* handle) const;
|
||
|
};
|
||
|
|
||
|
class Transaction
|
||
|
{
|
||
|
public:
|
||
|
Transaction(sqlite3& db);
|
||
|
|
||
|
void commit();
|
||
|
|
||
|
private:
|
||
|
std::unique_ptr<sqlite3, Rollback> mDb;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|