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

Functions

std::vector< int32_t > get_compared_ids (const StringDictionaryProxy *dict, const SQLOps compare_operator, const std::string &pattern)
 

Function Documentation

std::vector<int32_t> anonymous_namespace{StringOpsIR.cpp}::get_compared_ids ( const StringDictionaryProxy dict,
const SQLOps  compare_operator,
const std::string &  pattern 
)

Definition at line 427 of file StringOpsIR.cpp.

References StringDictionaryProxy::getCompare(), kBW_EQ, kEQ, kGE, kGT, kLE, kLT, and kNE.

Referenced by CodeGenerator::codegenDictStrCmp().

429  {
430  std::vector<int> ret;
431  switch (compare_operator) {
432  case kLT:
433  ret = dict->getCompare(pattern, "<");
434  break;
435  case kLE:
436  ret = dict->getCompare(pattern, "<=");
437  break;
438  case kEQ:
439  case kBW_EQ:
440  ret = dict->getCompare(pattern, "=");
441  break;
442  case kGT:
443  ret = dict->getCompare(pattern, ">");
444  break;
445  case kGE:
446  ret = dict->getCompare(pattern, ">=");
447  break;
448  case kNE:
449  ret = dict->getCompare(pattern, "<>");
450  break;
451  default:
452  std::runtime_error("unsuported operator for string comparision");
453  }
454  return ret;
455 }
Definition: sqldefs.h:35
Definition: sqldefs.h:36
Definition: sqldefs.h:30
std::vector< int32_t > getCompare(const std::string &pattern, const std::string &comp_operator) const
Definition: sqldefs.h:34
Definition: sqldefs.h:32
Definition: sqldefs.h:31
Definition: sqldefs.h:33

+ Here is the call graph for this function:

+ Here is the caller graph for this function: