OmniSciDB  343343d194
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 225 of file StringOpsIR.cpp.

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

Referenced by CodeGenerator::codegenDictStrCmp().

227  {
228  std::vector<int> ret;
229  switch (compare_operator) {
230  case kLT:
231  ret = dict->getCompare(pattern, "<");
232  break;
233  case kLE:
234  ret = dict->getCompare(pattern, "<=");
235  break;
236  case kEQ:
237  case kBW_EQ:
238  ret = dict->getCompare(pattern, "=");
239  break;
240  case kGT:
241  ret = dict->getCompare(pattern, ">");
242  break;
243  case kGE:
244  ret = dict->getCompare(pattern, ">=");
245  break;
246  case kNE:
247  ret = dict->getCompare(pattern, "<>");
248  break;
249  default:
250  std::runtime_error("unsuported operator for string comparision");
251  }
252  return ret;
253 }
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: