libpqxx
The C++ client library for PostgreSQL
pqxx::const_row_iterator Class Reference

Iterator for fields in a row. Use as row::const_iterator. More...

#include <row.hxx>

+ Inheritance diagram for pqxx::const_row_iterator:

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = field_ref const
 
using pointer = field_ref const *
 
using size_type = row_size_type
 
using difference_type = row_difference_type
 
using reference = field_ref
 

Public Member Functions

 const_row_iterator () noexcept=default
 
 const_row_iterator (row_ref const &t, row_size_type c) noexcept
 
 const_row_iterator (field_ref const &f) noexcept
 
 const_row_iterator (const_row_iterator const &) noexcept=default
 
 const_row_iterator (const_row_iterator &&) noexcept=default
 
 ~const_row_iterator ()=default
 
PQXX_PURE size_type col () const noexcept
 Current column number, if the iterator is pointing at a valid field. More...
 
Dereferencing operators
PQXX_PURE constexpr PQXX_RETURNS_NONNULL pointer operator-> () const noexcept
 
PQXX_PURE reference operator* () const noexcept
 
Manipulations
const_row_iteratoroperator= (const_row_iterator const &) noexcept=default
 
const_row_iteratoroperator= (const_row_iterator &&) noexcept=default
 
const_row_iterator operator++ (int) &noexcept
 
const_row_iteratoroperator++ () noexcept
 
const_row_iterator operator-- (int) &noexcept
 
const_row_iteratoroperator-- () noexcept
 
const_row_iteratoroperator+= (difference_type n) noexcept
 
const_row_iteratoroperator-= (difference_type n) noexcept
 
Comparisons
bool operator== (const_row_iterator const &i) const noexcept
 
bool operator!= (const_row_iterator const &i) const noexcept
 
bool operator< (const_row_iterator const &i) const noexcept
 
bool operator<= (const_row_iterator const &i) const noexcept
 
bool operator> (const_row_iterator const &i) const noexcept
 
bool operator>= (const_row_iterator const &i) const noexcept
 

Arithmetic operators

const_row_iterator operator+ (difference_type) const noexcept
 
const_row_iterator operator- (difference_type) const noexcept
 
difference_type operator- (const_row_iterator const &) const noexcept
 
field_ref operator[] (difference_type offset) const noexcept
 
const_row_iterator operator+ (difference_type, const_row_iterator const &) noexcept
 

Detailed Description

Iterator for fields in a row. Use as row::const_iterator.

Warning
Do not destroy or move the result object while you're iterating it. It will invalidate all iterators on the entire result. They will no longer refer to valid memory, and your application may crash, or worse, read the wrong data.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

using pqxx::const_row_iterator::iterator_category = std::random_access_iterator_tag

◆ pointer

◆ reference

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ const_row_iterator() [1/5]

pqxx::const_row_iterator::const_row_iterator ( )
defaultnoexcept

◆ const_row_iterator() [2/5]

pqxx::const_row_iterator::const_row_iterator ( row_ref const &  t,
row_size_type  c 
)
inlinenoexcept

◆ const_row_iterator() [3/5]

pqxx::const_row_iterator::const_row_iterator ( field_ref const &  f)
inlineexplicitnoexcept

◆ const_row_iterator() [4/5]

pqxx::const_row_iterator::const_row_iterator ( const_row_iterator const &  )
defaultnoexcept

◆ const_row_iterator() [5/5]

pqxx::const_row_iterator::const_row_iterator ( const_row_iterator &&  )
defaultnoexcept

◆ ~const_row_iterator()

pqxx::const_row_iterator::~const_row_iterator ( )
default

Member Function Documentation

◆ col()

PQXX_PURE size_type pqxx::const_row_iterator::col ( ) const
inlinenoexcept

Current column number, if the iterator is pointing at a valid field.

◆ operator!=()

bool pqxx::const_row_iterator::operator!= ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator*()

PQXX_PURE reference pqxx::const_row_iterator::operator* ( ) const
inlinenoexcept

◆ operator+()

const_row_iterator pqxx::const_row_iterator::operator+ ( difference_type  o) const
inlinenoexcept

◆ operator++() [1/2]

const_row_iterator& pqxx::const_row_iterator::operator++ ( )
inlinenoexcept

◆ operator++() [2/2]

pqxx::const_row_iterator pqxx::const_row_iterator::operator++ ( int  ) &
noexcept

◆ operator+=()

const_row_iterator& pqxx::const_row_iterator::operator+= ( difference_type  n)
inlinenoexcept

◆ operator-() [1/2]

const_row_iterator::difference_type pqxx::const_row_iterator::operator- ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator-() [2/2]

const_row_iterator pqxx::const_row_iterator::operator- ( difference_type  o) const
inlinenoexcept

◆ operator--() [1/2]

const_row_iterator& pqxx::const_row_iterator::operator-- ( )
inlinenoexcept

◆ operator--() [2/2]

pqxx::const_row_iterator pqxx::const_row_iterator::operator-- ( int  ) &
noexcept

◆ operator-=()

const_row_iterator& pqxx::const_row_iterator::operator-= ( difference_type  n)
inlinenoexcept

◆ operator->()

PQXX_PURE constexpr PQXX_RETURNS_NONNULL pointer pqxx::const_row_iterator::operator-> ( ) const
inlineconstexprnoexcept

◆ operator<()

bool pqxx::const_row_iterator::operator< ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator<=()

bool pqxx::const_row_iterator::operator<= ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator=() [1/2]

const_row_iterator& pqxx::const_row_iterator::operator= ( const_row_iterator &&  )
defaultnoexcept

◆ operator=() [2/2]

const_row_iterator& pqxx::const_row_iterator::operator= ( const_row_iterator const &  )
defaultnoexcept

◆ operator==()

bool pqxx::const_row_iterator::operator== ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator>()

bool pqxx::const_row_iterator::operator> ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator>=()

bool pqxx::const_row_iterator::operator>= ( const_row_iterator const &  i) const
inlinenoexcept

◆ operator[]()

field_ref pqxx::const_row_iterator::operator[] ( difference_type  offset) const
inlinenoexcept

Friends And Related Function Documentation

◆ operator+


The documentation for this class was generated from the following files: