8 #ifndef TIP_DB_PG_RESULTSET_INL_
9 #define TIP_DB_PG_RESULTSET_INL_
12 #include <tip/util/meta_helpers.hpp>
21 template <
size_t Index,
typename T >
34 return row[index].template as<T>();
46 template <
typename IndexTuple,
typename ... T >
47 struct row_data_extractor_base;
49 template <
size_t ... Indexes,
typename ... T >
50 struct row_data_extractor_base< util::indexes_tuple< Indexes ... >, T ... > {
58 std::tuple< T ... > tmp( nth_field< Indexes, T >(row).value() ... );
65 util::expand(nth_field< Indexes, T >(row).to(val) ...);
69 template <
typename ... T >
70 struct row_data_extractor :
71 row_data_extractor_base < typename util::index_builder< sizeof ... (T) >::type, T ... > {
76 template <
typename ... T >
80 detail::row_data_extractor< T ... >::get_tuple(*
this, val);
83 template <
typename ... T >
87 std::tuple<T ... > non_ref;
88 detail::row_data_extractor< T ... >::get_tuple(*
this, non_ref);
92 template <
typename ... T >
96 detail::row_data_extractor< T ... >::get_values(val ...);
void to(std::tuple< T... > &) const