OmniSciDB  dfae7c3b14
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 225 of file QueryRunner.cpp.

References apply_shim(), and run_benchmark_import::result.

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

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