lintel
0.2.0
Loading...
Searching...
No Matches
src
include
lintel
core
persistence
postgresql
Transaction.h
Go to the documentation of this file.
1
#ifndef LINTEL_POSTGRESQL_TRANSACTION_H
2
#define LINTEL_POSTGRESQL_TRANSACTION_H
3
4
#include <string>
5
6
#include "
Connection.h
"
7
#include "
lintel/core/exceptions/SQLException.h
"
8
9
namespace
lintel
{
10
namespace
postgresql {
14
class
Transaction
15
{
16
private
:
17
const
Connection
&m_connection;
18
bool
m_finished =
false
;
19
25
void
checkState(
const
std::shared_ptr<Result> &
result
);
26
27
public
:
32
explicit
Transaction
(
const
Connection
&
tempConnection
);
33
34
Transaction
(
Transaction
&
transaction
) =
delete
;
35
37
void
start
();
38
40
void
commit
();
41
46
void
save
(
const
std::string &
savepoint
)
const
;
47
49
void
rollback
();
50
55
void
rollbackTo
(
const
std::string &
savepoint
)
const
;
56
58
~Transaction
();
59
};
60
}
// namespace postgresql
61
62
}
// namespace lintel
63
#endif
// LINTEL_POSTGRESQL_TRANSACTION_H
SQLException.h
lintel::postgresql::Connection
Definition
Connection.h:31
lintel::postgresql::Transaction
Definition
Transaction.h:15
lintel::postgresql::Transaction::Transaction
Transaction(Transaction &transaction)=delete
lintel::postgresql::Transaction::~Transaction
~Transaction()
lintel::postgresql::Transaction::start
void start()
lintel::postgresql::Transaction::rollback
void rollback()
lintel::postgresql::Transaction::Transaction
Transaction(const Connection &tempConnection)
lintel::postgresql::Transaction::rollbackTo
void rollbackTo(const std::string &savepoint) const
lintel::postgresql::Transaction::save
void save(const std::string &savepoint) const
lintel::postgresql::Transaction::commit
void commit()
lintel
Definition
BaseFeature.h:6
lintel::type_name
constexpr std::string_view type_name()
Definition
TypeName.h:9
Connection.h
Generated by
1.9.8