9 #ifndef TIP_DB_PG_RESULT_HPP_
10 #define TIP_DB_PG_RESULT_HPP_
165 operator bool()
const
302 template <
typename ... T >
304 to( std::tuple< T ... >& )
const;
306 template <
typename ... T >
308 to( std::tuple< T& ... > )
const;
310 template <
typename ... T >
360 template <
typename T >
379 template <
typename T >
381 to( boost::optional< T >& val )
const
384 val = boost::optional< T >();
387 typename std::decay<T>::type tmp;
389 val = boost::optional< T > (tmp);
402 template <
typename T >
403 typename std::decay<T>::type
406 typename std::decay<T>::type val;
417 template <
typename T >
418 typename std::decay<T>::type
426 template <
typename T >
428 to_impl( T& val, std::true_type
const& )
const
433 io::protocol_read< TEXT_DATA_FORMAT >(b.begin(), b.end(), val);
435 io::protocol_read< BINARY_DATA_FORMAT >(b.begin(), b.end(), val);
440 template <
typename T >
442 to_impl( T& val, std::false_type
const& )
const
445 io::protocol_read< TEXT_DATA_FORMAT >(b.begin(), b.end(), val);
450 input_buffer()
const;
504 operator bool()
const
508 {
return !(this->
operator bool()); }
514 {
return advance(1); }
525 {
return advance(-1); }
537 {
return advance(distance); }
540 {
return advance(-distance); }
547 {
return compare(rhs) == 0; }
551 {
return !(*
this == rhs); }
555 {
return compare(rhs) < 0; }
558 {
return compare(rhs) <= 0; }
561 {
return compare(rhs) > 0; }
564 {
return compare(rhs) >= 0; }
617 operator bool()
const
623 {
return !(this->
operator bool()); }
629 {
return advance(1); }
640 {
return advance(-1); }
652 {
return advance(distance); }
655 {
return advance(-distance); }
662 {
return compare(rhs) == 0; }
666 {
return !(*
this == rhs); }
670 {
return compare(rhs) < 0; }
673 {
return compare(rhs) <= 0; }
676 {
return compare(rhs) > 0; }
679 {
return compare(rhs) >= 0; }
684 :
field(res, row, col) {}
694 typedef std::shared_ptr<const detail::result_impl> const_result_impl_ptr;
695 const_result_impl_ptr pimpl_;
reference operator[](size_type index) const
const value_type reference
const_row_iterator & operator+=(difference_type distance)
size_type row_index() const
const_row_iterator & operator-=(difference_type distance)
bool operator!=(const_row_iterator const &rhs) const
tip::util::input_iterator_buffer field_buffer
bool operator>(const_row_iterator const &rhs) const
std::reverse_iterator< const_field_iterator > const_reverse_field_iterator
pointer operator->() const
field(result_pointer res, size_type row, row::size_type col)
bool operator==(const_field_iterator const &rhs) const
const_field_iterator operator++(int)
std::shared_ptr< detail::result_impl > result_impl_ptr
const_row_iterator operator--(int)
const_iterator end() const
bool operator>=(const_field_iterator const &rhs) const
size_type row_index() const
Index of owner row.
reference at(size_type index) const
reference operator*() const
std::random_access_iterator_tag iterator_category
const_reverse_iterator rend() const
resultset::difference_type difference_type
value_type const * pointer
boost::int_t< 32 >::exact integer
4-byte integer, to match PostgreSQL integer and serial types
value_type const * pointer
reference operator[](size_type index) const
const_field_iterator & operator+=(difference_type distance)
const_reverse_field_iterator const_reverse_iterator
bool operator>=(const_row_iterator const &rhs) const
row(result_pointer res, resultset::size_type idx)
std::decay< T >::type coalesce(T const &default_val)
bool operator<(const_row_iterator const &rhs) const
const_field_iterator const_iterator
row_description_type const & row_description() const
std::random_access_iterator_tag iterator_category
const_row_iterator & operator--()
resultset::row::difference_type operator-(resultset::row const &a, resultset::row const &b)
const_field_iterator operator--(int)
bool operator<(const_field_iterator const &rhs) const
protocol_data_format format_code
The format code being used for the field. Currently will be zero (text) or one (binary). In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero.
const_reverse_iterator rbegin() const
size_type index_of_name(std::string const &name) const
static const size_type npos
Not-a-position constant.
bool operator<=(const_row_iterator const &rhs) const
std::decay< T >::type as() const
const_iterator begin() const
std::string const & name() const
Name of field.
const_field_iterator & operator++()
const_reverse_iterator rend() const
bool operator!=(const_field_iterator const &rhs) const
resultset::difference_type difference_type
reference operator*() const
void to(std::tuple< T... > &) const
bool is_null() const
Is field value null.
bool to(boost::optional< T > &val) const
pointer operator->() const
boost::uint_t< 32 >::exact uinteger
4-byte unsigned integer
const_row_iterator const_iterator
An attempt to extract a value from a null field was made.
boost::int_t< 16 >::exact smallint
2-byte integer, to match PostgreSQL smallint and smallserial types
Description of a field returned by the backend.
field_description const & description() const
Field description.
std::reverse_iterator< const_iterator > const_reverse_iterator
const_field_iterator & operator--()
resultset::size_type row_index_
bool empty() const
Is field value empty (not null)
const_reverse_iterator rbegin() const
bool operator<=(const_field_iterator const &rhs) const
std::vector< field_description > row_description_type
Result set's row description.
const_field_iterator & operator-=(difference_type distance)
static const size_type npos
bool operator>(const_field_iterator const &rhs) const
std::string const & field_name(size_type col_index) const
const_iterator begin() const
const_iterator end() const
resultset()
Construct an empty resultset.
const_row_iterator operator++(int)
bool operator==(const_row_iterator const &rhs) const
row::size_type field_index_
const_row_iterator & operator++()
size_type columns_size() const
row::size_type field_index() const
Index of field in the row.
resultset::difference_type difference_type