OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringDictionaryProxy.cpp File Reference
+ Include dependency graph for StringDictionaryProxy.cpp:

Go to the source code of this file.




int32_t truncate_to_generation (const int32_t id, const size_t generation)
bool anonymous_namespace{StringDictionaryProxy.cpp}::is_like (const std::string &str, const std::string &pattern, const bool icase, const bool is_simple, const char escape)
bool anonymous_namespace{StringDictionaryProxy.cpp}::do_compare (const std::string &str, const std::string &pattern, const std::string &comp_operator)
bool anonymous_namespace{StringDictionaryProxy.cpp}::is_regexp_like (const std::string &str, const std::string &pattern, const char escape)
bool operator== (const StringDictionaryProxy &sdp1, const StringDictionaryProxy &sdp2)
bool operator!= (const StringDictionaryProxy &sdp1, const StringDictionaryProxy &sdp2)

Function Documentation

bool operator!= ( const StringDictionaryProxy sdp1,
const StringDictionaryProxy sdp2 

Definition at line 255 of file StringDictionaryProxy.cpp.

255  {
256  return !(sdp1 == sdp2);
257 }
bool operator== ( const StringDictionaryProxy sdp1,
const StringDictionaryProxy sdp2 

Definition at line 243 of file StringDictionaryProxy.cpp.

References StringDictionaryProxy::string_dict_id_, and StringDictionaryProxy::transient_int_to_str_.

243  {
244  if (sdp1.string_dict_id_ != sdp2.string_dict_id_) {
245  return false;
246  }
247  if (sdp1.transient_int_to_str_.size() != sdp2.transient_int_to_str_.size()) {
248  return false;
249  }
250  return std::equal(sdp1.transient_int_to_str_.begin(),
251  sdp1.transient_int_to_str_.end(),
252  sdp2.transient_int_to_str_.begin());
253 }
std::map< int32_t, std::string > transient_int_to_str_
int32_t truncate_to_generation ( const int32_t  id,
const size_t  generation 

Definition at line 33 of file StringDictionaryProxy.cpp.

References CHECK_GE, and StringDictionary::INVALID_STR_ID.

Referenced by StringDictionaryProxy::getIdOfString(), and StringDictionaryProxy::getOrAddTransient().

33  {
35  return id;
36  }
37  CHECK_GE(id, 0);
38  return static_cast<size_t>(id) >= generation ? StringDictionary::INVALID_STR_ID : id;
39 }
#define CHECK_GE(x, y)
Definition: Logger.h:224
static constexpr int32_t INVALID_STR_ID

+ Here is the caller graph for this function: