OmniSciDB  6686921089
 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 232 of file StringOpsIR.cpp.

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

Referenced by CodeGenerator::codegenDictStrCmp().

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