dbtransaction.hxx
/* Definition of the pqxx::dbtransaction abstract base class.
*
* pqxx::dbransaction defines a real transaction on the database.
*
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
*
* Copyright (c) 2000-2023, 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_DBTRANSACTION
#define PQXX_H_DBTRANSACTION
#if !defined(PQXX_HEADER_PRE)
# error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
#endif
#include "pqxx/transaction_base.hxx"
namespace pqxx
{
class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
{
protected:
explicit dbtransaction(connection &c) : transaction_base{c} {}
dbtransaction(connection &c, std::string_view tname) :
transaction_base{c, tname}
{}
dbtransaction(
connection &c, std::string_view tname,
std::shared_ptr<std::string> rollback_cmd) :
transaction_base{c, tname, rollback_cmd}
{}
};
} // namespace pqxx
#endif
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition array.hxx:33
pqxx::connection
Connection to a database.
Definition connection.hxx:253
pqxx::dbtransaction
Abstract transaction base class: bracket transactions on the database.
Definition dbtransaction.hxx:54
pqxx::dbtransaction::dbtransaction
dbtransaction(connection &c, std::string_view tname, std::shared_ptr< std::string > rollback_cmd)
Begin transaction.
Definition dbtransaction.hxx:63
pqxx::dbtransaction::dbtransaction
dbtransaction(connection &c)
Begin transaction.
Definition dbtransaction.hxx:57
pqxx::dbtransaction::dbtransaction
dbtransaction(connection &c, std::string_view tname)
Begin transaction.
Definition dbtransaction.hxx:59
pqxx::transaction_base
Interface definition (and common code) for "transaction" classes.
Definition transaction_base.hxx:88