libpqxx
The C++ client library for PostgreSQL
connection-pipeline.hxx
Go to the documentation of this file.
1 #ifndef PQXX_INTERNAL_GATES_CONNECTION_PIPELINE_HXX
2 #define PQXX_INTERNAL_GATES_CONNECTION_PIPELINE_HXX
3 
5 
6 #include "pqxx/pipeline.hxx"
7 
8 namespace pqxx::internal::gate
9 {
10 class PQXX_PRIVATE connection_pipeline final : callgate<connection>
11 {
12  friend class pqxx::pipeline;
13 
14  explicit constexpr connection_pipeline(reference x) noexcept : super(x) {}
15 
16  PQXX_ZARGS void start_exec(char const query[]) { home().start_exec(query); }
17  [[nodiscard]] pqxx::internal::pq::PGresult *get_result()
18  {
19  return home().get_result();
20  }
21  void cancel_query(sl loc) { home().cancel_query(loc); }
22 
23  bool consume_input() noexcept { return home().consume_input(); }
24  [[nodiscard]] bool is_busy() const noexcept { return home().is_busy(); }
25 
26  [[nodiscard]] int encoding_id(sl loc) const
27  {
28  return home().encoding_id(loc);
29  }
30 
31  [[nodiscard]] auto get_notice_waiters() const
32  {
33  return home().m_notice_waiters;
34  }
35 };
36 } // namespace pqxx::internal::gate
37 #endif
Connection to a database.
Definition: connection.hxx:273
Base class for call gates.
Definition: callgate.hxx:55
Definition: connection-pipeline.hxx:11
Processes several queries in FIFO manner, optimized for high throughput.
Definition: pipeline.hxx:51
#define PQXX_ZARGS
Definition: header-pre.hxx:136
#define PQXX_PRIVATE
Definition: header-pre.hxx:207
Definition: connection.hxx:94
void PGresult
Placeholder for libpq's result type.
Definition: types.hxx:431
std::source_location sl
Convenience alias for std::source_location. It's just too long.
Definition: types.hxx:38