OmniSciDB  0264ff685a
QueryRunner Namespace Reference

Namespaces

 anonymous_namespace{QueryRunner.cpp}
 

Classes

class  ImportDriver
 
class  QueryRunner
 

Functions

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

Function Documentation

◆ apply_copy_to_shim()

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

Definition at line 232 of file QueryRunner.cpp.

References apply_shim(), and run_benchmark_import::result.

Referenced by DBHandler::create_query_state(), and QueryRunner::QueryRunner::runDDLStatement().

232  {
233  auto result = query_str;
234  {
235  boost::regex copy_to{R"(COPY\s*\(([^#])(.+)\)\s+TO\s)",
236  boost::regex::extended | boost::regex::icase};
237  apply_shim(result, copy_to, [](std::string& result, const boost::smatch& what) {
238  result.replace(
239  what.position(), what.length(), "COPY (#~#" + what[1] + what[2] + "#~#) TO ");
240  });
241  }
242  return result;
243 }
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: