-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTransaction.h
More file actions
37 lines (30 loc) · 750 Bytes
/
Transaction.h
File metadata and controls
37 lines (30 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* File: Transaction.h
* Created on 27 luglio 2018
*/
#ifndef TRANSACTION_H
#define TRANSACTION_H
#include "Attachment.h"
// forward declaration
class Statement;
class Transaction {
friend class Statement;
public:
Transaction();
void setAttachment(Attachment* attachemnt);
virtual ~Transaction();
void commit();
void commitRetain();
void connect();
void rollback();
void rollbackRetaining();
bool isConnected();
EventDispatcher<DBStateEvents> dispatcher;
private:
void release();
Attachment* attachment;
ITransaction* tra_ = nullptr;
ThrowStatusWrapper* status = nullptr;
EventDispatcher<DBStateEvents>::CBID attachmentCallbackID;
};
#endif /* TRANSACTION_H */