OmniSciDB  a5dc49c757
 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 731 of file StringOpsIR.cpp.

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

Referenced by CodeGenerator::codegenDictStrCmp().

733  {
734  std::vector<int> ret;
735  switch (compare_operator) {
736  case kLT:
737  ret = dict->getCompare(pattern, "<");
738  break;
739  case kLE:
740  ret = dict->getCompare(pattern, "<=");
741  break;
742  case kEQ:
743  case kBW_EQ:
744  ret = dict->getCompare(pattern, "=");
745  break;
746  case kGT:
747  ret = dict->getCompare(pattern, ">");
748  break;
749  case kGE:
750  ret = dict->getCompare(pattern, ">=");
751  break;
752  case kNE:
753  ret = dict->getCompare(pattern, "<>");
754  break;
755  default:
756  std::runtime_error("unsuported operator for string comparision");
757  }
758  return ret;
759 }
Definition: sqldefs.h:37
Definition: sqldefs.h:38
Definition: sqldefs.h:32
std::vector< int32_t > getCompare(const std::string &pattern, const std::string &comp_operator) const
Definition: sqldefs.h:36
Definition: sqldefs.h:34
Definition: sqldefs.h:33
Definition: sqldefs.h:35

+ Here is the call graph for this function:

+ Here is the caller graph for this function: