libpqxx
nontransaction.hxx
1
13#ifndef PQXX_H_NONTRANSACTION
14#define PQXX_H_NONTRANSACTION
15
16#include "pqxx/compiler-public.hxx"
17#include "pqxx/compiler-internal-pre.hxx"
18
19#include "pqxx/connection_base.hxx"
20#include "pqxx/result.hxx"
21#include "pqxx/transaction_base.hxx"
22
23// Methods tested in eg. test module test01 are marked with "//[t01]".
24
25namespace pqxx
26{
27
29
54class PQXX_LIBEXPORT nontransaction : public transaction_base
55{
56public:
58
63 explicit nontransaction( //[t14]
65 const std::string &Name=std::string{}) :
66 namedclass{"nontransaction", Name}, transaction_base{C} { Begin(); }
67
68 virtual ~nontransaction(); //[t14]
69
70private:
71 virtual void do_begin() override {} //[t14]
72 virtual result do_exec(const char C[]) override; //[t14]
73 virtual void do_commit() override {} //[t14]
74 virtual void do_abort() override {} //[t14]
75};
76
77} // namespace pqxx
78
79#include "pqxx/compiler-internal-post.hxx"
80#endif
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
connection_base abstract base class; represents a connection to a database.
Definition: connection_base.hxx:140
Simple "transaction" class offering no transactional integrity.
Definition: nontransaction.hxx:55
nontransaction(connection_base &C, const std::string &Name=std::string{})
Constructor.
Definition: nontransaction.hxx:63
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:138