OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QueryRunner Namespace Reference

Namespaces

 anonymous_namespace{QueryRunner.cpp}
 

Classes

class  QueryRunner
 
class  ImportDriver
 

Functions

std::string apply_copy_to_shim (const std::string &query_str)
 

Function Documentation

std::string QueryRunner::apply_copy_to_shim ( const std::string &  query_str)

Definition at line 229 of file QueryRunner.cpp.

References apply_shim(), and run_benchmark_import::result.

Referenced by QueryRunner::QueryRunner::runDDLStatement().

229  {
230  auto result = query_str;
231  {
232  boost::regex copy_to{R"(COPY\s*\(([^#])(.+)\)\s+TO\s)",
233  boost::regex::extended | boost::regex::icase};
234  apply_shim(result, copy_to, [](std::string& result, const boost::smatch& what) {
235  result.replace(
236  what.position(), what.length(), "COPY (#~#" + what[1] + what[2] + "#~#) TO ");
237  });
238  }
239  return result;
240 }
void apply_shim(std::string &result, const boost::regex &reg_expr, const std::function< void(std::string &, const boost::smatch &)> &shim_fn)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: