1 #ifndef PQXX_INTERNAL_GATES_CONNECTION_TRANSACTION_HXX
2 #define PQXX_INTERNAL_GATES_CONNECTION_TRANSACTION_HXX
19 template<
typename STRING>
22 return home().exec(
query, desc, loc);
27 return home().exec(
query,
"", loc);
32 home().register_transaction(t);
36 home().unregister_transaction(t);
39 auto read_copy_line(
sl loc) {
return home().read_copy_line(loc); }
40 void write_copy_line(std::string_view line,
sl loc)
42 home().write_copy_line(line, loc);
44 void end_copy_write(
sl loc) { home().end_copy_write(loc); }
47 std::string_view statement, internal::c_params
const &args,
sl loc)
49 return home().exec_prepared(statement, args, loc);
55 return home().exec_params(
query, args, loc);
Connection to a database.
Definition: connection.hxx:273
Base class for call gates.
Definition: callgate.hxx:55
Definition: connection-transaction.hxx:14
Result set containing data returned by a query or command.
Definition: result.hxx:101
result exec_prepared(zview statement, Args &&...args)
Execute a prepared statement, with optional arguments.
Definition: transaction_base.hxx:972
auto query(std::string_view query, sl loc=sl::current())
Execute query, read full results, then iterate rows of data.
Definition: transaction_base.hxx:678
transaction_base()=delete
void register_transaction()
Register this transaction with the connection.
Definition: transaction_base.cxx:101
result exec_params(std::string_view query, Args &&...args)
Execute an SQL statement with parameters.
Definition: transaction_base.hxx:745
result exec(std::string_view query, std::string_view desc, sl=sl::current())
Execute a command.
Definition: transaction_base.cxx:286
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:151
Definition: connection.hxx:94
The home of all libpqxx classes, functions, templates, etc.
Definition: array.cxx:26
std::source_location sl
Convenience alias for std::source_location. It's just too long.
Definition: types.hxx:38