lintel 0.2.0
Loading...
Searching...
No Matches
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"
8
9namespace lintel {
10namespace postgresql {
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:
33
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
59 };
60}// namespace postgresql
61
62}// namespace lintel
63#endif// LINTEL_POSTGRESQL_TRANSACTION_H
Definition Connection.h:31
Definition Transaction.h:15
Transaction(Transaction &transaction)=delete
Transaction(const Connection &tempConnection)
void rollbackTo(const std::string &savepoint) const
void save(const std::string &savepoint) const
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9