OmniSciDB  04ee39c94c
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 935 of file ResultSetIteration.cpp.

Member Function Documentation

◆ fetch()

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

Definition at line 937 of file ResultSetIteration.cpp.

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

937  {
938  constexpr int num_vals = sizeof...(vals);
939  static_assert(
940  num_vals % 2 == 0,
941  "Must have consistent pointer/size pairs for lazy fetch of geo target values.");
942  const auto vals_vector = make_vals_vector(std::make_index_sequence<num_vals / 2>{},
943  std::make_tuple(vals...));
944  std::array<VarlenDatumPtr, num_vals / 2> ad_arr;
945  size_t ctr = 0;
946  for (const auto& col_pair : vals_vector) {
947  ad_arr[ctr++] = lazy_fetch_chunk(col_pair.first, col_pair.second);
948  }
949  return ad_arr;
950  }
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: