libpqxx 3.1.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

subtransaction.hxx
1 /*-------------------------------------------------------------------------
2 *
3 * FILE
4 * pqxx/subtransaction.hxx
5 *
6 * DESCRIPTION
7 * definition of the pqxx::subtransaction class.
8 * pqxx::subtransaction is a nested transaction, i.e. one within a transaction
9 * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead.
10 *
11 * Copyright (c) 2005-2008, 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_SUBTRANSACTION
20 #define PQXX_H_SUBTRANSACTION
21
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24
25 #include "pqxx/dbtransaction"
26
27
28
29 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
30 */
31
32
33 namespace pqxx
34 {
35
39
40
81 class PQXX_LIBEXPORT subtransaction :
82 public internal::transactionfocus,
83 public dbtransaction
84 {
85 public:
86 explicit subtransaction(dbtransaction &T,
87 const PGSTD::string &Name=PGSTD::string()); //[t88]
88
89 private:
90 virtual void do_begin(); //[t88]
91 virtual void do_commit(); //[t88]
92 virtual void do_abort(); //[t88]
93
94 void check_backendsupport() const;
95
96 dbtransaction &m_parent;
97 };
98
99 }
100
101
102 #include "pqxx/compiler-internal-post.hxx"
103
104 #endif
105