OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{ResultSetIteration.cpp}::GeoLazyFetchHandler Struct Reference

Static Public Member Functions

template<typename... T>
static auto fetch (const ResultSet::GeoReturnType return_type, T &&...vals)
 

Detailed Description

Definition at line 949 of file ResultSetIteration.cpp.

Member Function Documentation

template<typename... T>
static auto anonymous_namespace{ResultSetIteration.cpp}::GeoLazyFetchHandler::fetch ( const ResultSet::GeoReturnType  return_type,
T &&...  vals 
)
inlinestatic

Definition at line 951 of file ResultSetIteration.cpp.

References anonymous_namespace{ResultSetIteration.cpp}::lazy_fetch_chunk(), and anonymous_namespace{ResultSetIteration.cpp}::make_vals_vector().

951  {
952  constexpr int num_vals = sizeof...(vals);
953  static_assert(
954  num_vals % 2 == 0,
955  "Must have consistent pointer/size pairs for lazy fetch of geo target values.");
956  const auto vals_vector = make_vals_vector(std::make_index_sequence<num_vals / 2>{},
957  std::make_tuple(vals...));
958  std::array<VarlenDatumPtr, num_vals / 2> ad_arr;
959  size_t ctr = 0;
960  for (const auto& col_pair : vals_vector) {
961  ad_arr[ctr++] = lazy_fetch_chunk(col_pair.first, col_pair.second);
962  }
963  return ad_arr;
964  }
std::unique_ptr< ArrayDatum > lazy_fetch_chunk(const int8_t *ptr, const int64_t varlen_ptr)
std::vector< std::pair< const int8_t *, const int64_t > > make_vals_vector(std::index_sequence< indices...>, const Tuple &tuple)
std::unique_ptr< VarlenDatum > VarlenDatumPtr

+ Here is the call graph for this function:


The documentation for this struct was generated from the following file: