2015-11-10 16:08:06 +01:00
|
|
|
#ifndef TRANSACTION_H
|
|
|
|
|
#define TRANSACTION_H
|
|
|
|
|
|
2015-11-10 20:31:23 +01:00
|
|
|
#include <odb/database.hxx>
|
|
|
|
|
#include <odb/transaction.hxx>
|
2015-11-10 16:08:06 +01:00
|
|
|
|
2015-11-11 12:23:32 +01:00
|
|
|
#include "core_global.h"
|
|
|
|
|
|
|
|
|
|
class CORESHARED_EXPORT Transaction
|
2015-11-10 16:08:06 +01:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Transaction();
|
|
|
|
|
~Transaction();
|
2015-11-10 20:31:23 +01:00
|
|
|
|
|
|
|
|
void commit();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
odb::transaction *m_tr;
|
|
|
|
|
static bool m_inTransaction;
|
2015-11-10 16:08:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // TRANSACTION_H
|