libpqxx
The C++ client library for PostgreSQL
icursor_iterator-icursorstream.hxx
Go to the documentation of this file.
1 #ifndef PQXX_INTERNAL_GATES_ICURSOR_ITERATOR_ICURSORSTREAM_HXX
2 #define PQXX_INTERNAL_GATES_ICURSOR_ITERATOR_ICURSORSTREAM_HXX
3 
5 
6 namespace pqxx::internal::gate
7 {
9  : callgate<icursor_iterator>
10 {
11  friend class pqxx::icursorstream;
12 
13  explicit constexpr icursor_iterator_icursorstream(reference x) noexcept :
14  super(x)
15  {}
16 
17  [[nodiscard]] icursor_iterator::difference_type pos() const noexcept
18  {
19  return home().pos();
20  }
21 
22  [[nodiscard]] icursor_iterator *get_prev() const noexcept
23  {
24  return home().m_prev;
25  }
26  void set_prev(icursor_iterator *i) noexcept { home().m_prev = i; }
27 
28  [[nodiscard]] icursor_iterator *get_next() const noexcept
29  {
30  return home().m_next;
31  }
32  void set_next(icursor_iterator *i) { home().m_next = i; }
33 
34  void fill(result const &r) { home().fill(r); }
35 };
36 } // namespace pqxx::internal::gate
37 #endif
Approximate istream_iterator for icursorstream.
Definition: cursor.hxx:483
istream_type::difference_type difference_type
Definition: cursor.hxx:491
Simple read-only cursor represented as a stream of results.
Definition: cursor.hxx:326
Base class for call gates.
Definition: callgate.hxx:55
Definition: icursor_iterator-icursorstream.hxx:10
#define PQXX_PRIVATE
Definition: header-pre.hxx:207
Definition: connection.hxx:94