Inheritance diagram for pqxx::result::field:
Public Types | |
typedef size_t | size_type |
Public Member Functions | |
field (const tuple &R, tuple::size_type C) | |
Constructor. | |
const char * | c_str () const |
Read as plain C string. | |
const char * | name () const |
Column name. | |
oid | type () const |
Column type. | |
template<typename T> bool | to (T &Obj) const |
Read value into Obj; or leave Obj untouched & return false if null. | |
template<typename T> bool | to (T &Obj, const T &Default) const |
Read value into Obj; or use Default & return false if null. | |
template<typename T> T | as (const T &Default) const |
Return value as object of given type, or Default if null. | |
bool | is_null () const |
size_type | size () const |
A field represents one entry in a tuple. It represents an actual value in the result set, and can be converted to various types.
|
Reimplemented from pqxx::result::tuple. |
|
Constructor. Create field as reference to a field in a result set.
|
|
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. |
|
Read as plain C string. Since the field's data is stored internally in the form of a zero-terminated C string, this is the fastest way to read it. Use the to() or as() functions to convert the string to other types such as int, or to C++ strings. |
|
|
|
Column name.
|
|
Reimplemented from pqxx::result::tuple. |
|
Read value into Obj; or use Default & return false if null.
|
|
Read value into Obj; or leave Obj untouched & return false if null.
|
|
Column type.
|