OmniSciDB  04ee39c94c
TestHelpers::ValuesGenerator Struct Reference

#include <TestHelpers.h>

Public Member Functions

 ValuesGenerator (const std::string &table_name)
template<typename... COL_ARGS>
std::string operator() (COL_ARGS &&... args) const

Public Attributes

const std::string table_name_

Detailed Description

Definition at line 158 of file TestHelpers.h.

Constructor & Destructor Documentation

◆ ValuesGenerator()

TestHelpers::ValuesGenerator::ValuesGenerator ( const std::string &  table_name)

Definition at line 159 of file TestHelpers.h.

159 : table_name_(table_name) {}
const std::string table_name_
Definition: TestHelpers.h:168

Member Function Documentation

◆ operator()()

template<typename... COL_ARGS>
std::string TestHelpers::ValuesGenerator::operator() ( COL_ARGS &&...  args) const

Definition at line 162 of file TestHelpers.h.

References run-benchmark-import::args, TestHelpers::convert(), and join().

162  {
163  std::vector<std::string> vals({convert(std::forward<COL_ARGS>(args))...});
164  return std::string("INSERT INTO " + table_name_ + " VALUES(" +
165  boost::algorithm::join(vals, ",") + ");");
166  }
std::string convert(const T &t)
Definition: TestHelpers.h:144
std::string join(T const &container, std::string const &delim)
const std::string table_name_
Definition: TestHelpers.h:168
+ Here is the call graph for this function:

Member Data Documentation

◆ table_name_

const std::string TestHelpers::ValuesGenerator::table_name_

Definition at line 168 of file TestHelpers.h.

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