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:
pqxx::field pqxx::const_reverse_row_iterator

List of all members.

Public Types

typedef row::size_type size_type
typedef row::difference_type difference_type
typedef field reference

Public Member Functions

 const_row_iterator (const row &T, row::size_type C) PQXX_NOEXCEPT
 const_row_iterator (const field &F) PQXX_NOEXCEPT
Dereferencing operators



pointer operator-> () const
reference operator* () const
Manipulations



const_row_iterator operator++ (int)
const_row_iteratoroperator++ ()
const_row_iterator operator-- (int)
const_row_iteratoroperator-- ()
const_row_iteratoroperator+= (difference_type i)
const_row_iteratoroperator-= (difference_type i)
Comparisons



bool operator== (const const_row_iterator &i) const
 Byte-by-byte comparison of two fields (all nulls are considered equal).
bool operator!= (const const_row_iterator &i) const
 Byte-by-byte comparison (all nulls are considered equal).
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

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)

Detailed Description

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


Member Typedef Documentation

Reimplemented from pqxx::field.


Constructor & Destructor Documentation

pqxx::const_row_iterator::const_row_iterator ( const row T,
row::size_type  C 
)

Referenced by operator+(), and operator-().

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

Member Function Documentation

bool pqxx::const_row_iterator::operator!= ( const const_row_iterator rhs  )  const

Byte-by-byte comparison (all nulls are considered equal).

Warning:
See operator==() for important information about this operator

Reimplemented from pqxx::field.

Reimplemented in pqxx::const_reverse_row_iterator.

reference pqxx::const_row_iterator::operator* (  )  const
const_row_iterator pqxx::const_row_iterator::operator+ ( difference_type  o  )  const
const_row_iterator& pqxx::const_row_iterator::operator++ (  ) 
pqxx::const_row_iterator pqxx::const_row_iterator::operator++ ( int   ) 
const_row_iterator& pqxx::const_row_iterator::operator+= ( difference_type  i  ) 
const_row_iterator::difference_type pqxx::const_row_iterator::operator- ( const_row_iterator  i  )  const

References pqxx::field::num().

const_row_iterator pqxx::const_row_iterator::operator- ( difference_type  o  )  const
const_row_iterator& pqxx::const_row_iterator::operator-- (  ) 
pqxx::const_row_iterator pqxx::const_row_iterator::operator-- ( int   ) 
const_row_iterator& pqxx::const_row_iterator::operator-= ( difference_type  i  ) 
pointer pqxx::const_row_iterator::operator-> (  )  const
bool pqxx::const_row_iterator::operator< ( const const_row_iterator i  )  const
bool pqxx::const_row_iterator::operator<= ( const const_row_iterator i  )  const
bool pqxx::const_row_iterator::operator== ( const const_row_iterator rhs  )  const

Byte-by-byte comparison of two fields (all nulls are considered equal).

Warning:
null handling is still open to discussion and change!

Handling of null values differs from that in SQL where a comparison involving a null value yields null, so nulls are never considered equal to one another or even to themselves.

Null handling also probably differs from the closest equivalent in C++, which is the NaN (Not-a-Number) value, a singularity comparable to SQL's null. This is because the builtin == operator demands that a == a.

The usefulness of this operator is questionable. No interpretation whatsoever is imposed on the data; 0 and 0.0 are considered different, as are null vs. the empty string, or even different (but possibly equivalent and equally valid) encodings of the same Unicode character etc.

Reimplemented from pqxx::field.

Reimplemented in pqxx::const_reverse_row_iterator.

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

Friends And Related Function Documentation

const_row_iterator operator+ ( difference_type  ,
const_row_iterator   
) [friend]

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

Generated on 17 Mar 2017 for libpqxx by  doxygen 1.6.1