libpqxx
The C++ client library for PostgreSQL
result-connection.hxx
Go to the documentation of this file.
2 
3 namespace pqxx::internal::gate
4 {
5 class PQXX_PRIVATE result_connection final : callgate<result const>
6 {
7  friend class pqxx::connection;
8 
9  constexpr result_connection(reference x) noexcept : super(x) {}
10 
11  [[nodiscard]] operator bool() const noexcept { return bool(home()); }
12  [[nodiscard]] bool operator!() const noexcept { return not home(); }
13 };
14 } // namespace pqxx::internal::gate
Connection to a database.
Definition: connection.hxx:269
Base class for call gates.
Definition: callgate.hxx:55
result const & reference
A reference to the host class. Helps keep constructors easy.
Definition: callgate.hxx:60
Definition: result-connection.hxx:6
#define PQXX_PRIVATE
Definition: header-pre.hxx:206
Definition: connection.hxx:94