libpqxx  7.7.0
dbtransaction.hxx
1 /* Definition of the pqxx::dbtransaction abstract base class.
2  *
3  * pqxx::dbransaction defines a real transaction on the database.
4  *
5  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
6  *
7  * Copyright (c) 2000-2022, Jeroen T. Vermeulen.
8  *
9  * See COPYING for copyright license. If you did not receive a file called
10  * COPYING with this source code, please notify the distributor of this
11  * mistake, or contact the author.
12  */
13 #ifndef PQXX_H_DBTRANSACTION
14 #define PQXX_H_DBTRANSACTION
15 
16 #include "pqxx/transaction_base.hxx"
17 
18 namespace pqxx
19 {
21 
49 class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
50 {
51 protected:
55  dbtransaction(connection &c, std::string_view tname) :
56  transaction_base{c, tname}
57  {}
60  connection &c, std::string_view tname,
61  std::shared_ptr<std::string> rollback_cmd) :
62  transaction_base{c, tname, rollback_cmd}
63  {}
64 };
65 } // namespace pqxx
66 #endif
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:72
Abstract transaction base class: bracket transactions on the database.
Definition: dbtransaction.hxx:49
dbtransaction(connection &c)
Begin transaction.
Definition: dbtransaction.hxx:53
Connection to a database.
Definition: connection.hxx:180
dbtransaction(connection &c, std::string_view tname, std::shared_ptr< std::string > rollback_cmd)
Begin transaction.
Definition: dbtransaction.hxx:59
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:22
dbtransaction(connection &c, std::string_view tname)
Begin transaction.
Definition: dbtransaction.hxx:55