13 #ifndef PQXX_INTERNAL_RESULT_ITERATOR_HXX
14 #define PQXX_INTERNAL_RESULT_ITERATOR_HXX
58 m_row{r.home(), r.row_number()}
116 std::swap(m_row, other.m_row);
126 return (&m_row.home() == &i.m_row.
home()) and
131 return not(*
this == i);
136 return m_row.row_number() < i.m_row.
row_number();
141 return m_row.row_number() <= i.m_row.
row_number();
145 return m_row.row_number() > i.m_row.
row_number();
149 return m_row.row_number() >= i.m_row.
row_number();
231 iterator_type::operator--();
237 iterator_type::operator++();
243 iterator_type::operator-=(i);
248 iterator_type::operator+=(i);
271 [[nodiscard]] difference_type
274 return rhs.const_result_iterator::operator-(*this);
295 return iterator_type::operator>(rhs);
299 return iterator_type::operator>=(rhs);
303 return iterator_type::operator<(rhs);
307 return iterator_type::operator<=(rhs);
313 inline const_result_iterator
342 return {*
this,
size()};
Iterator for rows in a result. Use as result::const_iterator.
Definition: result_iterator.hxx:35
const_result_iterator(row_ref const &r) noexcept
Create an iterator pointing at a row.
Definition: result_iterator.hxx:57
~const_result_iterator()=default
void swap(const_result_iterator &other) noexcept
Interchange two iterators in an exception-safe manner.
Definition: result_iterator.hxx:114
PQXX_INLINE_ONLY const_result_iterator & operator--()
Definition: result_iterator.hxx:96
const_result_iterator & operator=(const_result_iterator const &)=default
const_result_iterator operator+(difference_type) const
Definition: result_iterator.hxx:314
std::random_access_iterator_tag iterator_category
Definition: result_iterator.hxx:37
const_result_iterator operator-(difference_type) const
Definition: result_iterator.hxx:327
bool operator<(const_result_iterator const &i) const
Definition: result_iterator.hxx:133
bool operator==(const_result_iterator const &i) const
Definition: result_iterator.hxx:124
bool operator<=(const_result_iterator const &i) const
Definition: result_iterator.hxx:138
reference operator*() const noexcept
Dereference the iterator.
Definition: result_iterator.hxx:78
bool operator>(const_result_iterator const &i) const
Definition: result_iterator.hxx:143
bool operator!=(const_result_iterator const &i) const
Definition: result_iterator.hxx:129
reference operator[](difference_type d) const
Definition: result_iterator.hxx:63
bool operator>=(const_result_iterator const &i) const
Definition: result_iterator.hxx:147
const_result_iterator & operator+=(difference_type i)
Definition: result_iterator.hxx:102
const_result_iterator() noexcept=default
Create an iterator, but in an unusable state.
const_result_iterator & operator-=(difference_type i)
Definition: result_iterator.hxx:107
row_ref const value_type
Definition: result_iterator.hxx:38
result_difference_type difference_type
Definition: result_iterator.hxx:42
result_size_type size_type
Definition: result_iterator.hxx:41
row_ref const * pointer
Definition: result_iterator.hxx:39
PQXX_INLINE_ONLY const_result_iterator & operator++()
Definition: result_iterator.hxx:90
const_result_iterator & operator=(const_result_iterator &&)=default
PQXX_RETURNS_NONNULL pointer operator->() const noexcept
Dereference the iterator.
Definition: result_iterator.hxx:72
Reverse iterator for result. Use as result::const_reverse_iterator.
Definition: result_iterator.hxx:173
bool operator<(const_reverse_result_iterator const &rhs) const
Definition: result_iterator.hxx:293
bool operator>=(const_reverse_result_iterator const &rhs) const
Definition: result_iterator.hxx:305
const_result_iterator base() const noexcept
Return the underlying "regular" iterator (as per standard library).
Definition: result.cxx:682
const_reverse_result_iterator & operator-=(difference_type i)
Definition: result_iterator.hxx:246
const_reverse_result_iterator & operator+=(difference_type i)
Definition: result_iterator.hxx:241
const_reverse_result_iterator operator+(difference_type i) const
Definition: result_iterator.hxx:263
bool operator==(const_reverse_result_iterator const &rhs) const noexcept
Definition: result_iterator.hxx:283
bool operator>(const_reverse_result_iterator const &rhs) const
Definition: result_iterator.hxx:301
const_reverse_result_iterator() noexcept=default
Create an iterator, but in an unusable state.
~const_reverse_result_iterator()=default
void swap(const_reverse_result_iterator &other) noexcept
Definition: result_iterator.hxx:252
difference_type operator-(const_reverse_result_iterator const &rhs) const
Definition: result_iterator.hxx:272
const_reverse_result_iterator operator-(difference_type i)
Definition: result_iterator.hxx:267
bool operator<=(const_reverse_result_iterator const &rhs) const
Definition: result_iterator.hxx:297
bool operator!=(const_reverse_result_iterator const &rhs) const noexcept
Definition: result_iterator.hxx:288
const_reverse_result_iterator & operator--()
Definition: result_iterator.hxx:235
Definition: row_ref-const_result_iterator.hxx:15
Result set containing data returned by a query or command.
Definition: result.hxx:101
PQXX_PURE const_iterator end() const noexcept
Definition: result_iterator.hxx:340
result_difference_type difference_type
Definition: result.hxx:104
PQXX_PURE size_type size() const noexcept
Definition: result.cxx:137
PQXX_PURE const_iterator cend() const noexcept
Definition: result_iterator.hxx:346
Lightweight reference to one row in a result.
Definition: row.hxx:57
constexpr PQXX_PURE result::size_type row_number() const noexcept
Row number, assuming this is a real row and not end()/rend().
Definition: row.hxx:197
PQXX_PURE result const & home() const noexcept
The result object to which this row_ref refers.
Definition: row.hxx:324
The home of all libpqxx classes, functions, templates, etc.
Definition: array.cxx:26
int result_difference_type
Difference between result sizes.
Definition: types.hxx:80
const_result_iterator operator+(result::difference_type o, const_result_iterator const &i)
Definition: result_iterator.hxx:321
int result_size_type
Number of rows in a result set.
Definition: types.hxx:77
std::remove_cvref_t< std::ranges::range_value_t< CONTAINER > > value_type
The type of a container's elements.
Definition: types.hxx:138
constexpr bool operator==(char const lhs[], pqxx::zview rhs) noexcept
Disambiguating comparison operator: leave it to std::string_view.
Definition: zview.hxx:203