OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{StringDictionaryProxy.cpp} Namespace Reference

Functions

bool do_compare (const std::string &str, const std::string &pattern, const std::string &comp_operator)
 
bool is_regexp_like (const std::string &str, const std::string &pattern, const char escape)
 

Function Documentation

bool anonymous_namespace{StringDictionaryProxy.cpp}::do_compare ( const std::string &  str,
const std::string &  pattern,
const std::string &  comp_operator 
)

Definition at line 501 of file StringDictionaryProxy.cpp.

References run_benchmark_import::res.

Referenced by StringDictionaryProxy::getCompare().

503  {
504  int res = str.compare(pattern);
505  if (comp_operator == "<") {
506  return res < 0;
507  } else if (comp_operator == "<=") {
508  return res <= 0;
509  } else if (comp_operator == "=") {
510  return res == 0;
511  } else if (comp_operator == ">") {
512  return res > 0;
513  } else if (comp_operator == ">=") {
514  return res >= 0;
515  } else if (comp_operator == "<>") {
516  return res != 0;
517  }
518  throw std::runtime_error("unsupported string compare operator");
519 }

+ Here is the caller graph for this function:

bool anonymous_namespace{StringDictionaryProxy.cpp}::is_regexp_like ( const std::string &  str,
const std::string &  pattern,
const char  escape 
)

Definition at line 538 of file StringDictionaryProxy.cpp.

References regexp_like().

540  {
541  return regexp_like(str.c_str(), str.size(), pattern.c_str(), pattern.size(), escape);
542 }
RUNTIME_EXPORT DEVICE bool regexp_like(const char *str, const int32_t str_len, const char *pattern, const int32_t pat_len, const char escape_char)
Definition: Regexp.cpp:39

+ Here is the call graph for this function: