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
35 exec_prepared(std::string_view statement, internal::c_params const &args)
36 {
37 return home().exec_prepared(statement, args);
38 }
39
40 result exec_params(std::string_view query, internal::c_params const &args)
41 {
42 return home().exec_params(query, args);
43 }
44};
45} // namespace pqxx::internal::gate
Base class for call gates.
Definition callgate.hxx:55
connection & reference
Definition callgate.hxx:60
Definition connection-transaction.hxx:11
Result set containing data returned by a query or command.
Definition result.hxx:92
The home of all libpqxx classes, functions, templates, etc.
Definition array.cxx:27
Internal type: encode statement parameters.
Definition statement_parameters.hxx:95