libpqxx
The C++ client library for PostgreSQL
Loading...
Searching...
No Matches
connection-transaction.hxx
1#include <pqxx/internal/callgate.hxx>
2
3namespace pqxx
4{
5class connection;
6}
7
8namespace pqxx::internal::gate
9{
10class PQXX_PRIVATE connection_transaction : callgate<connection>
11{
12 friend class pqxx::transaction_base;
13
15
16 template<typename STRING> result exec(STRING query, std::string_view desc)
17 {
18 return home().exec(query, desc);
19 }
20
21 void register_transaction(transaction_base *t)
22 {
23 home().register_transaction(t);
24 }
25 void unregister_transaction(transaction_base *t) noexcept
26 {
27 home().unregister_transaction(t);
28 }
29
30 auto read_copy_line() { return home().read_copy_line(); }
31 void write_copy_line(std::string_view line) { home().write_copy_line(line); }
32 void end_copy_write() { home().end_copy_write(); }
33
34 result exec_prepared(zview statement, internal::c_params const &args)
35 {
36 return home().exec_prepared(statement, args);
37 }
38
39 result exec_params(zview query, internal::c_params const &args)
40 {
41 return home().exec_params(query, args);
42 }
43};
44} // namespace pqxx::internal::gate
Base class for call gates.
Definition callgate.hxx:55
connection & reference
A reference to the host class. Helps keep constructors easy.
Definition callgate.hxx:60
Definition connection-transaction.hxx:11
Result set containing data returned by a query or command.
Definition result.hxx:73
Marker-type wrapper: zero-terminated std::string_view.
Definition zview.hxx:38
The home of all libpqxx classes, functions, templates, etc.
Definition array.cxx:27
Internal type: encode statement parameters.
Definition statement_parameters.hxx:113