subtransaction.hxx
#ifndef PQXX_H_SUBTRANSACTION
#define PQXX_H_SUBTRANSACTION
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/dbtransaction.hxx"
/* Methods tested in eg. self-test program test1 are marked with "//[t01]"
*/
namespace pqxx
{
class PQXX_LIBEXPORT subtransaction :
public internal::transactionfocus,
public dbtransaction
{
public:
explicit subtransaction( //[t88]
dbtransaction &T, const std::string &Name=std::string{});
explicit subtransaction(
subtransaction &T, const std::string &Name=std::string{});
virtual ~subtransaction() noexcept
{ End(); }
private:
virtual void do_begin() override; //[t88]
virtual void do_commit() override; //[t88]
virtual void do_abort() override; //[t88]
dbtransaction &m_parent;
};
}
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::subtransaction::subtransaction
subtransaction(dbtransaction &T, const std::string &Name=std::string{})
Nest a subtransaction nested in another transaction.
Definition: subtransaction.cxx:23
pqxx::connection_base::adorn_name
std::string adorn_name(const std::string &)
Suffix unique number to name to make it unique within session context.
Definition: connection_base.cxx:1380
pqxx::internal
Private namespace for libpqxx's internal use; do not access.
Definition: connection_base.hxx:43
pqxx::subtransaction
"Transaction" nested within another transaction
Definition: subtransaction.hxx:79
pqxx::transaction_base::conn
connection_base & conn() const
Connection this transaction is running in.
Definition: transaction_base.hxx:492
pqxx::internal::namedclass
Helper base class: object descriptions for error messages and such.
Definition: util.hxx:233
pqxx::internal::transactionfocus
Definition: transaction_base.hxx:43
pqxx::dbtransaction
Abstract base class responsible for bracketing a backend transaction.
Definition: dbtransaction.hxx:62
pqxx::subtransaction::~subtransaction
virtual ~subtransaction() noexcept
Definition: subtransaction.hxx:92
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25