1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/components/sqlite3/transaction.hpp

28 lines
412 B
C++
Raw Normal View History

2021-10-16 11:03:15 +00:00
#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