Loading...
Searching...
No Matches
subtransaction.hxx
/* Definition of the pqxx::subtransaction class.
*
* pqxx::subtransaction is a nested transaction, i.e. one within a transaction.
*
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead.
*
* Copyright (c) 2000-2024, Jeroen T. Vermeulen.
*
* See COPYING for copyright license. If you did not receive a file called
* COPYING with this source code, please notify the distributor of this
* mistake, or contact the author.
*/
#ifndef PQXX_H_SUBTRANSACTION
#define PQXX_H_SUBTRANSACTION
#if !defined(PQXX_HEADER_PRE)
# error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
#endif
#include "pqxx/dbtransaction.hxx"
namespace pqxx
{
class PQXX_LIBEXPORT subtransaction : public transaction_focus,
public dbtransaction
{
public:
explicit subtransaction(dbtransaction &t, std::string_view tname = ""sv);
explicit subtransaction(subtransaction &t, std::string_view name = ""sv);
virtual ~subtransaction() noexcept override;
private:
std::string quoted_name() const
{
return quote_name(transaction_focus::name());
}
virtual void do_commit() override;
};
} // namespace pqxx
#endif
pqxx::transaction_focus
Base class for things that monopolise a transaction's attention.
Definition transaction_focus.hxx:29
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition array.cxx:27