libpqxx 3.1.1

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

nontransaction.hxx
1 /*-------------------------------------------------------------------------
2 *
3 * FILE
4 * pqxx/nontransaction.hxx
5 *
6 * DESCRIPTION
7 * definition of the pqxx::nontransaction class.
8 * pqxx::nontransaction provides nontransactional database access
9 * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction instead.
10 *
11 * Copyright (c) 2002-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_NONTRANSACTION
20 #define PQXX_H_NONTRANSACTION
21
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24
25 #include "pqxx/connection_base"
26 #include "pqxx/result"
27 #include "pqxx/transaction_base"
28
29 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
30 */
31
32
33 namespace pqxx
34 {
35
37
62 class PQXX_LIBEXPORT nontransaction : public transaction_base
63 {
64 public:
66
71 explicit nontransaction(connection_base &C,
72 const PGSTD::string &Name=PGSTD::string()) : //[t14]
73 namedclass("nontransaction", Name), transaction_base(C) { Begin(); }
74
75 virtual ~nontransaction(); //[t14]
76
77 private:
78 virtual void do_begin() {} //[t14]
79 virtual result do_exec(const char C[]); //[t14]
80 virtual void do_commit() {} //[t14]
81 virtual void do_abort() {} //[t14]
82 };
83
84
85 } // namespace pqxx
86
87
88 #include "pqxx/compiler-internal-post.hxx"
89
90 #endif
91