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

#include <FullyQualifiedTableName.h>

+ Collaboration diagram for shared::FullyQualifiedTableName:

Public Member Functions

 FullyQualifiedTableName (const std::string &db_name, const std::string &table_name)
 
bool operator== (const FullyQualifiedTableName &other) const
 
bool operator!= (const FullyQualifiedTableName &other) const
 
bool operator< (const FullyQualifiedTableName &other) const
 
size_t hash () const
 
std::string getSqlReference () const
 

Public Attributes

std::string db_name
 
std::string table_name
 

Friends

std::ostream & operator<< (std::ostream &os, const FullyQualifiedTableName &table_name)
 
size_t hash_value (const FullyQualifiedTableName &table_name)
 

Detailed Description

Definition at line 25 of file FullyQualifiedTableName.h.

Constructor & Destructor Documentation

shared::FullyQualifiedTableName::FullyQualifiedTableName ( const std::string &  db_name,
const std::string &  table_name 
)
inline

Member Function Documentation

std::string shared::FullyQualifiedTableName::getSqlReference ( ) const

Definition at line 54 of file FullyQualifiedTableName.cpp.

References db_name, and table_name.

54  {
55  return db_name + "." + table_name;
56 }
size_t shared::FullyQualifiedTableName::hash ( ) const

Definition at line 43 of file FullyQualifiedTableName.cpp.

References db_name, and table_name.

Referenced by shared::hash_value(), and std::hash< shared::FullyQualifiedTableName >::operator()().

43  {
44  size_t hash{0};
45  boost::hash_combine(hash, db_name);
46  boost::hash_combine(hash, table_name);
47  return hash;
48 }

+ Here is the caller graph for this function:

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

Definition at line 26 of file FullyQualifiedTableName.cpp.

26  {
27  return !(*this == other);
28 }
bool shared::FullyQualifiedTableName::operator< ( const FullyQualifiedTableName other) const

Definition at line 30 of file FullyQualifiedTableName.cpp.

References db_name, and table_name.

30  {
31  if (db_name != other.db_name) {
32  return db_name < other.db_name;
33  }
34  return table_name < other.table_name;
35 }
bool shared::FullyQualifiedTableName::operator== ( const FullyQualifiedTableName other) const

Definition at line 22 of file FullyQualifiedTableName.cpp.

References db_name, and table_name.

22  {
23  return db_name == other.db_name && table_name == other.table_name;
24 }

Friends And Related Function Documentation

size_t hash_value ( const FullyQualifiedTableName table_name)
friend

Definition at line 50 of file FullyQualifiedTableName.cpp.

50  {
51  return table_name.hash();
52 }
std::ostream& operator<< ( std::ostream &  os,
const FullyQualifiedTableName table_name 
)
friend

Definition at line 37 of file FullyQualifiedTableName.cpp.

37  {
38  os << "(db_name: " << table_name.db_name << ", table_name: " << table_name.table_name
39  << ")";
40  return os;
41 }

Member Data Documentation

std::string shared::FullyQualifiedTableName::db_name
std::string shared::FullyQualifiedTableName::table_name

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