libpqxx
The C++ client library for PostgreSQL
result-creation.hxx
Go to the documentation of this file.
1 #ifndef PQXX_INTERNAL_GATES_RESULT_CREATION_HXX
2 #define PQXX_INTERNAL_GATES_RESULT_CREATION_HXX
3 
5 
6 namespace pqxx::internal::gate
7 {
8 class PQXX_PRIVATE result_creation final : callgate<result const>
9 {
10  friend class pqxx::connection;
11  friend class pqxx::pipeline;
12 
13  explicit constexpr result_creation(reference x) noexcept : super(x) {}
14 
15  [[nodiscard]] static result create(
16  std::shared_ptr<internal::pq::PGresult> const &rhs,
17  std::shared_ptr<std::string> const &query,
18  std::shared_ptr<pqxx::internal::notice_waiters> &notice_waiters,
19  encoding_group enc)
20  {
21  return {rhs, query, notice_waiters, enc};
22  }
23 
24  void check_status(std::string_view desc, sl loc) const
25  {
26  return home().check_status(desc, loc);
27  }
28 
29  void check_status(sl loc) const { return home().check_status("", loc); }
30 };
31 } // namespace pqxx::internal::gate
32 #endif
Connection to a database.
Definition: connection.hxx:273
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-creation.hxx:9
Processes several queries in FIFO manner, optimized for high throughput.
Definition: pipeline.hxx:51
Result set containing data returned by a query or command.
Definition: result.hxx:101
#define PQXX_PRIVATE
Definition: header-pre.hxx:207
Definition: connection.hxx:94
std::source_location sl
Convenience alias for std::source_location. It's just too long.
Definition: types.hxx:38
encoding_group
Definition: encoding_group.hxx:40
Various callbacks waiting for a notice to come in.
Definition: result.hxx:57