Iterator for fields in a tuple. Use as tuple::const_iterator.
More...
#include <tuple.hxx>
Iterator for fields in a tuple. Use as tuple::const_iterator.
pqxx::const_tuple_iterator::const_tuple_iterator |
( |
const field & |
F | ) |
throw () |
|
inline |
template<typename T >
T pqxx::field::as |
( |
const T & |
Default | ) |
const |
|
inlineinherited |
Return value as object of given type, or Default if null.
Note that unless the function is instantiated with an explicit template argument, the Default value's type also determines the result type.
template<typename T >
T pqxx::field::as |
( |
| ) |
const |
|
inlineinherited |
Return value as object of given type, or throw exception if null.
const char* pqxx::field::c_str |
( |
| ) |
const |
|
inherited |
const result* pqxx::field::home |
( |
| ) |
const throw () |
|
inlineprotectedinherited |
size_t pqxx::field::idx |
( |
| ) |
const throw () |
|
inlineprotectedinherited |
bool pqxx::field::is_null |
( |
| ) |
const throw () |
|
inherited |
const char* pqxx::field::name |
( |
| ) |
const |
|
inherited |
bool pqxx::field::operator!= |
( |
const field & |
rhs | ) |
const |
|
inlineinherited |
Byte-by-byte comparison (all nulls are considered equal)
- Warning
- See operator==() for important information about this operator
reference pqxx::const_tuple_iterator::operator* |
( |
| ) |
const |
|
inline |
pointer pqxx::const_tuple_iterator::operator-> |
( |
| ) |
const |
|
inline |
bool pqxx::field::operator== |
( |
const field & |
| ) |
const |
|
inherited |
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.
template<typename T >
bool pqxx::field::operator>> |
( |
T & |
Obj | ) |
const |
|
inlineinherited |
Read value into Obj; or leave Obj untouched and return false
if null.
size_type pqxx::field::size |
( |
| ) |
const throw () |
|
inherited |
oid pqxx::field::table |
( |
| ) |
const |
|
inherited |
What table did this column come from?
What column number in its originating table did this column come from?
template<typename T >
bool pqxx::field::to |
( |
T & |
Obj | ) |
const |
|
inlineinherited |
Read value into Obj; or leave Obj untouched and return false
if null.
References pqxx::from_string().
template<typename T >
bool pqxx::field::to |
( |
T & |
Obj, |
|
|
const T & |
Default |
|
) |
| const |
|
inlineinherited |
Read value into Obj; or use Default & return false
if null.
template<>
bool pqxx::field::to |
( |
const char *& |
Obj | ) |
const |
|
inlineinherited |
Specialization: to(const char *&)
.
The buffer has the same lifetime as the data in this result (i.e. of this result object, or the last remaining one copied from it etc.), so take care not to use it after the last result object referring to this query result is destroyed.
oid pqxx::field::type |
( |
| ) |
const |
|
inherited |
The documentation for this class was generated from the following file: