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:
[legend]

## Public Types

using | iterator_category = std::random_access_iterator_tag
using | value_type = const field
using | pointer = const field *
using | size_type = row_size_type
using | difference_type = row_difference_type
using | reference = field
Public Types inherited from pqxx::field
using | size_type = field_size_type

## Public Member Functions

| const_row_iterator (const row &T, row_size_type C) noexcept
| const_row_iterator (const field &F) noexcept
Dereferencing operators
pointer | operator-> () const
reference | operator* () const
Manipulations
const_row_iterator | operator++ (int)
const_row_iterator & | operator++ ()
const_row_iterator | operator-- (int)
const_row_iterator & | operator-- ()
const_row_iterator & | operator+= (difference_type i)
const_row_iterator & | operator-= (difference_type i)
Comparisons
bool | operator== (const const_row_iterator &i) const
bool | operator!= (const const_row_iterator &i) const
bool | operator< (const const_row_iterator &i) const
bool | operator<= (const const_row_iterator &i) const
bool | operator> (const const_row_iterator &i) const
bool | operator>= (const const_row_iterator &i) const
Public Member Functions inherited from pqxx::field
| field (const row &R, row_size_type C) noexcept
| Constructor. More...
template<>
bool | to (const char *&Obj) const
| Specialization: `to(const char *&)`. More...
bool | operator== (const field &) const
| Byte-by-byte comparison of two fields (all nulls are considered equal) More...
bool | operator!= (const field &rhs) const
| Byte-by-byte comparison (all nulls are considered equal) More...
const char * | name () const
| Column name. More...
oid | type () const
| Column type. More...
oid | table () const
| What table did this column come from? More...
row_size_type | num () const
row_size_type | table_column () const
| What column number in its originating table did this column come from? More...
const char * | c_str () const
| Read as plain C string. More...
bool | is_null () const noexcept
| Is this field's value null? More...
size_type | size () const noexcept
| Return number of bytes taken up by the field's value. More...
template<typename T >
auto | to (T &Obj) const -> typename std::enable_if<(not std::is_pointer< T >::value or std::is_same< T, const char * >::value), bool >::type
| Read value into Obj; or leave Obj untouched and return `false` if null. More...
template<typename T >
bool | operator>> (T &Obj) const
| Read value into Obj; or leave Obj untouched and return `false` if null. More...
template<typename T >
auto | to (T &Obj, const T &Default) const -> typename std::enable_if<(not std::is_pointer< T >::value or std::is_same< T, const char * >::value), bool >::type
| Read value into Obj; or use Default & return `false` if null. More...
template<typename T >
T | as (const T &Default) const
| Return value as object of given type, or Default if null. More...
template<typename T >
T | as () const
| Return value as object of given type, or throw exception if null. More...
template<typename T , template< typename > class O>
constexpr O< T > | get () const
| Return value wrapped in some optional type (empty for nulls) More...
array_parser | as_array () const
| Parse the field as an SQL array. More...

## Arithmetic operators

const_row_iterator | operator+ (difference_type) const
const_row_iterator | operator- (difference_type) const
difference_type | operator- (const_row_iterator) const
const_row_iterator | operator+ (difference_type, const_row_iterator)

## Additional Inherited Members

Protected Member Functions inherited from pqxx::field
const result & | home () const noexcept
size_t | idx () const noexcept
row_size_type | col () const noexcept
Protected Attributes inherited from pqxx::field
long | m_col

## Detailed Description

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

## Member Typedef Documentation

## difference_type

using pqxx::const_row_iterator::difference_type = row_difference_type

## iterator_category

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

## pointer

using pqxx::const_row_iterator::pointer = const field *

## reference

using pqxx::const_row_iterator::reference = field

## size_type

using pqxx::const_row_iterator::size_type = row_size_type

## value_type

using pqxx::const_row_iterator::value_type = const field

## Constructor & Destructor Documentation

## const_row_iterator() [1/2]

pqxx::const_row_iterator::const_row_iterator | ( | const row & | T,
|  | row_size_type | C
| ) |  |

noexcept

## const_row_iterator() [2/2]

pqxx::const_row_iterator::const_row_iterator | ( | const field & | F | ) |

noexcept

## Member Function Documentation

## operator!=()

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

## operator*()

reference pqxx::const_row_iterator::operator* | ( |  | ) | const

## operator+()

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

## operator++() [1/2]

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

## operator++() [2/2]

pqxx::const_row_iterator pqxx::const_row_iterator::operator++ | ( | int |  | ) |

## operator+=()

const_row_iterator& pqxx::const_row_iterator::operator+= | ( | difference_type | i | ) |

## operator-() [1/2]

const_row_iterator::difference_type pqxx::const_row_iterator::operator- | ( | const_row_iterator | i | ) | const

References pqxx::field::num().

## operator-() [2/2]

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

## operator--() [1/2]

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

## operator--() [2/2]

pqxx::const_row_iterator pqxx::const_row_iterator::operator-- | ( | int |  | ) |

## operator-=()

const_row_iterator& pqxx::const_row_iterator::operator-= | ( | difference_type | i | ) |

## operator->()

pointer pqxx::const_row_iterator::operator-> | ( |  | ) | const

## operator<()

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

## operator<=()

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

## operator==()

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

## operator>()

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

## operator>=()

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

## Friends And Related Function Documentation

## operator+

const_row_iterator operator+ | ( | const_row_iterator::difference_type | o,
|  | const_row_iterator | i
| ) |  |

friend

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

- row.hxx
- row.cxx