libpqxx
The C++ client library for PostgreSQL
Toggle main menu visibility
Loading...
Searching...
No Matches
subtransaction.hxx
Go to the documentation of this file.
1
/* Definition of the pqxx::subtransaction class.
2
*
3
* pqxx::subtransaction is a nested transaction, i.e. one within a transaction.
4
*
5
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead.
6
*
7
* Copyright (c) 2000-2025, 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_SUBTRANSACTION
14
#define PQXX_H_SUBTRANSACTION
15
16
#if !defined(PQXX_HEADER_PRE)
17
# error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
18
#endif
19
20
#include "
pqxx/dbtransaction.hxx
"
21
22
namespace
pqxx
23
{
28
76
class
PQXX_LIBEXPORT
subtransaction :
public
transaction_focus
,
77
public
dbtransaction
78
{
79
public
:
81
explicit
subtransaction(dbtransaction &t, std::string_view tname =
""
sv);
82
84
explicit
subtransaction(subtransaction &t, std::string_view name =
""
sv);
85
86
virtual
~subtransaction() noexcept override;
87
88
private:
89
std::
string
quoted_name()
const
90
{
91
return
quote_name(transaction_focus::name());
92
}
93
virtual
void
do_commit()
override
;
94
};
95
}
// namespace pqxx
96
#endif
pqxx::transaction_focus
Base class for things that monopolise a transaction's attention.
Definition
transaction_focus.hxx:29
dbtransaction.hxx
PQXX_LIBEXPORT
#define PQXX_LIBEXPORT
Definition
header-pre.hxx:157
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition
array.cxx:27
include
pqxx
subtransaction.hxx
Generated by
1.17.0