OmniSciDB  a47db9e897
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Catalog_Namespace::anonymous_namespace{Catalog.cpp} Namespace Reference

Functions

std::string getUserFromId (const int32_t id)
 
const ColumnDescriptorget_foreign_col (const Catalog &cat, const Parser::SharedDictionaryDef &shared_dict_def)
 

Function Documentation

const ColumnDescriptor* Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_foreign_col ( const Catalog &  cat,
const Parser::SharedDictionaryDef shared_dict_def 
)

Definition at line 2252 of file Catalog.cpp.

References CHECK(), Parser::SharedDictionaryDef::get_foreign_column(), Parser::SharedDictionaryDef::get_foreign_table(), Catalog_Namespace::Catalog::getMetadataForColumn(), Catalog_Namespace::Catalog::getMetadataForTable(), and TableDescriptor::tableId.

Referenced by Catalog_Namespace::Catalog::addReferenceToForeignDict().

2254  {
2255  const auto& table_name = shared_dict_def.get_foreign_table();
2256  const auto td = cat.getMetadataForTable(table_name);
2257  CHECK(td);
2258  const auto& foreign_col_name = shared_dict_def.get_foreign_column();
2259  return cat.getMetadataForColumn(td->tableId, foreign_col_name);
2260 }
const std::string & get_foreign_table() const
Definition: ParserNode.h:921
CHECK(cgen_state)
const std::string & get_foreign_column() const
Definition: ParserNode.h:923

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::getUserFromId ( const int32_t  id)

Definition at line 855 of file Catalog.cpp.

References Catalog_Namespace::SysCatalog::instance(), and Catalog_Namespace::UserMetadata::userName.

Referenced by Catalog_Namespace::Catalog::buildMaps().

855  {
856  UserMetadata user;
857  if (SysCatalog::instance().getMetadataForUserById(id, user)) {
858  return user.userName;
859  }
860  // a user could be deleted and a dashboard still exist?
861  return "Unknown";
862 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function: