libpqxx  5.0
dbtransaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/dbtransaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::dbtransaction abstract base class.
8  * pqxx::dbransaction defines a real transaction on the database
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
10  *
11  * Copyright (c) 2004-2015, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_DBTRANSACTION
20 #define PQXX_H_DBTRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/transaction_base"
26 
27 namespace pqxx
28 {
29 
31 {
34 };
35 
36 
38 
68 class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
69 {
70 public:
71  virtual ~dbtransaction();
72 
73 protected:
76  const std::string &IsolationString,
78 
79  explicit dbtransaction(
81  bool direct=true,
83 
84 
86  void start_backend_transaction();
87 
89  virtual void do_begin(); //[t1]
91  virtual result do_exec(const char Query[]);
93  virtual void do_commit() =0;
95 
101  virtual void do_abort() PQXX_OVERRIDE; //[t13]
102 
103  static std::string fullname(const std::string &ttype,
104  const std::string &isolation);
105 
106 private:
108  std::string m_StartCmd;
109 };
110 
111 
112 } // namespace pqxx
113 
114 #include "pqxx/compiler-internal-post.hxx"
115 
116 #endif
117 
connection_base abstract base class; represents a connection to a database.
Definition: connection_base.hxx:149
Definition: dbtransaction.hxx:33
readwrite_policy
Definition: dbtransaction.hxx:30
Definition: dbtransaction.hxx:32
Definition: dbtransaction.hxx:68
Result set containing data returned by a query or command.
Definition: result.hxx:78
Definition: transaction_base.hxx:133