libpqxx
The C++ client library for PostgreSQL
Toggle main menu visibility
Loading...
Searching...
No Matches
nontransaction.hxx
Go to the documentation of this file.
1
/* Definition of the pqxx::nontransaction class.
2
*
3
* pqxx::nontransaction provides nontransactional database access
4
*
5
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction 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_NONTRANSACTION
14
#define PQXX_H_NONTRANSACTION
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/connection.hxx
"
21
#include "
pqxx/result.hxx
"
22
#include "
pqxx/transaction.hxx
"
23
24
namespace
pqxx
25
{
26
using namespace
std::literals;
27
29
60
class
PQXX_LIBEXPORT
nontransaction final :
public
transaction_base
61
{
62
public
:
64
69
nontransaction(connection &cx, std::string_view tname =
""
sv) :
70
transaction_base{cx, tname, std::shared_ptr<std::string>{}}
71
{
72
register_transaction();
73
}
74
75
virtual
~nontransaction()
override
{ close(); }
76
77
private
:
78
virtual
void
do_commit()
override
{}
79
};
80
}
// namespace pqxx
81
#endif
connection.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
result.hxx
transaction.hxx
include
pqxx
nontransaction.hxx
Generated by
1.17.0