|
pg_async
|
#include <resultset.hpp>


Public Member Functions | |
| size_type | row_index () const |
| Index of owner row. More... | |
| row::size_type | field_index () const |
| Index of field in the row. More... | |
| std::string const & | name () const |
| Name of field. More... | |
| field_description const & | description () const |
| Field description. More... | |
| bool | is_null () const |
| Is field value null. More... | |
| bool | empty () const |
| Is field value empty (not null) More... | |
| template<typename T > | |
| bool | to (T &val) const |
| template<typename T > | |
| bool | to (boost::optional< T > &val) const |
| template<typename T > | |
| std::decay< T >::type | as () const |
| template<typename T > | |
| std::decay< T >::type | coalesce (T const &default_val) |
Protected Member Functions | |
| field (result_pointer res, size_type row, row::size_type col) | |
Protected Attributes | |
| result_pointer | result_ |
| size_type | row_index_ |
| row::size_type | field_index_ |
Friends | |
| class | resultset |
| class | row |
Represents a single field in the result set. Provides access to underlying data and functions for converting the data into various datatypes.
Definition at line 331 of file resultset.hpp.
|
inlineprotected |
Definition at line 454 of file resultset.hpp.
|
inline |
Cast the field value to the type requested.
| T | requested data type |
| tip::db::pg::value_is_null | if the value is null and the type requested is not 'nullable'. |
Definition at line 404 of file resultset.hpp.

|
inline |
Cast the field value to the type requested. If the field is null value passed as the parameter to the function will be returned.
| T | requested data type |
| default_val | Value to return if the field is null |
Definition at line 419 of file resultset.hpp.

| field_description const& tip::db::pg::resultset::field::description | ( | ) | const |
Field description.
| bool tip::db::pg::resultset::field::empty | ( | ) | const |
Is field value empty (not null)
|
inline |
| bool tip::db::pg::resultset::field::is_null | ( | ) | const |
Is field value null.
| std::string const& tip::db::pg::resultset::field::name | ( | ) | const |
Name of field.
|
inline |
|
inline |
Parse the value buffer to the type specified by value passed as target. Will throw a value_is_null exception if the field is null.
| T | type of target variable |
| val | Target variable for the field value. |
| tip::db::pg::value_is_null |
Definition at line 362 of file resultset.hpp.

|
inline |
Parse the value buffer to the type specified by value passed as target. boost::optional is used as to specify a 'nullable' type concept.
| T | type of target variable. |
| val | Target variable for the field value. |
| tip::db::pg::value_is_null |
Definition at line 381 of file resultset.hpp.

|
friend |
Definition at line 452 of file resultset.hpp.
|
friend |
Definition at line 453 of file resultset.hpp.
|
protected |
Definition at line 459 of file resultset.hpp.
|
protected |
Definition at line 457 of file resultset.hpp.
|
protected |
Definition at line 458 of file resultset.hpp.
1.8.6