libpqxx
subtransaction.hxx
1 
13 #ifndef PQXX_H_SUBTRANSACTION
14 #define PQXX_H_SUBTRANSACTION
15 
16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/compiler-internal-pre.hxx"
18 
19 #include "pqxx/dbtransaction.hxx"
20 
21 
22 /* Methods tested in eg. self-test program test1 are marked with "//[t01]"
23  */
24 
25 
26 namespace pqxx
27 {
28 
32 
79 class PQXX_LIBEXPORT subtransaction :
81  public dbtransaction
82 {
83 public:
85  explicit subtransaction( //[t88]
86  dbtransaction &T, const std::string &Name=std::string());
87 
89  explicit subtransaction(
90  subtransaction &T, const std::string &Name=std::string());
91 
92  virtual ~subtransaction() noexcept
93  { End(); }
94 
95 private:
96  virtual void do_begin() override; //[t88]
97  virtual void do_commit() override; //[t88]
98  virtual void do_abort() override; //[t88]
99 
100  dbtransaction &m_parent;
101 };
102 
103 }
104 
105 
106 #include "pqxx/compiler-internal-post.hxx"
107 
108 #endif
virtual ~subtransaction() noexcept
Definition: subtransaction.hxx:92
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:22
Definition: transaction_base.hxx:42
"Transaction" nested within another transaction
Definition: subtransaction.hxx:79
Abstract base class responsible for bracketing a backend transaction.
Definition: dbtransaction.hxx:62