OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shared::StringDictKey Struct Reference

#include <DbObjectKeys.h>

+ Collaboration diagram for shared::StringDictKey:

Public Member Functions

 StringDictKey ()
 
 StringDictKey (int32_t db_id, int32_t dict_id)
 
bool operator== (const StringDictKey &other) const
 
bool operator!= (const StringDictKey &other) const
 
bool operator< (const StringDictKey &other) const
 
size_t hash () const
 
bool isTransientDict () const
 

Public Attributes

int32_t db_id
 
int32_t dict_id
 

Static Public Attributes

static const StringDictKey kTransientDictKey
 

Friends

std::ostream & operator<< (std::ostream &os, const StringDictKey &dict_key)
 

Detailed Description

Definition at line 28 of file DbObjectKeys.h.

Constructor & Destructor Documentation

shared::StringDictKey::StringDictKey ( )
inline

Definition at line 29 of file DbObjectKeys.h.

29 : db_id(0), dict_id(0) {}
shared::StringDictKey::StringDictKey ( int32_t  db_id,
int32_t  dict_id 
)
inline

Definition at line 31 of file DbObjectKeys.h.

Member Function Documentation

size_t shared::StringDictKey::hash ( ) const

Definition at line 44 of file DbObjectKeys.cpp.

References shared::compute_hash(), db_id, and dict_id.

Referenced by std::hash< shared::StringDictKey >::operator()().

44  {
46 }
size_t compute_hash(int32_t item_1, int32_t item_2)
Definition: misc.cpp:143

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool shared::StringDictKey::isTransientDict ( ) const

Definition at line 48 of file DbObjectKeys.cpp.

References dict_id, and TRANSIENT_DICT_ID.

Referenced by Analyzer::CaseExpr::add_cast().

48  {
49  return dict_id == TRANSIENT_DICT_ID;
50 }
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24

+ Here is the caller graph for this function:

bool shared::StringDictKey::operator!= ( const StringDictKey other) const

Definition at line 28 of file DbObjectKeys.cpp.

28  {
29  return !(*this == other);
30 }
bool shared::StringDictKey::operator< ( const StringDictKey other) const

Definition at line 32 of file DbObjectKeys.cpp.

References db_id, and dict_id.

32  {
33  if (db_id != other.db_id) {
34  return db_id < other.db_id;
35  }
36  return dict_id < other.dict_id;
37 }
bool shared::StringDictKey::operator== ( const StringDictKey other) const

Definition at line 24 of file DbObjectKeys.cpp.

References db_id, and dict_id.

24  {
25  return db_id == other.db_id && dict_id == other.dict_id;
26 }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const StringDictKey dict_key 
)
friend

Definition at line 39 of file DbObjectKeys.cpp.

39  {
40  os << "(db_id: " << dict_key.db_id << ", string_dict_id: " << dict_key.dict_id << ")";
41  return os;
42 }

Member Data Documentation


The documentation for this struct was generated from the following files: