OmniSciDB  85c2d10cdc
 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 256 of file QueryRunner.cpp.

References apply_shim(), and run_benchmark_import::result.

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

256  {
257  auto result = query_str;
258  {
259  boost::regex copy_to{R"(COPY\s*\(([^#])(.+)\)\s+TO\s)",
260  boost::regex::extended | boost::regex::icase};
261  apply_shim(result, copy_to, [](std::string& result, const boost::smatch& what) {
262  result.replace(
263  what.position(), what.length(), "COPY (#~#" + what[1] + what[2] + "#~#) TO ");
264  });
265  }
266  return result;
267 }
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: