OmniSciDB  04ee39c94c
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

◆ get_foreign_col()

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

Definition at line 2250 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().

2252  {
2253  const auto& table_name = shared_dict_def.get_foreign_table();
2254  const auto td = cat.getMetadataForTable(table_name);
2255  CHECK(td);
2256  const auto& foreign_col_name = shared_dict_def.get_foreign_column();
2257  return cat.getMetadataForColumn(td->tableId, foreign_col_name);
2258 }
const std::string & get_foreign_column() const
Definition: ParserNode.h:912
const std::string & get_foreign_table() const
Definition: ParserNode.h:910
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUserFromId()

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

Definition at line 853 of file Catalog.cpp.

References Catalog_Namespace::SysCatalog::instance(), anonymous_namespace{DBObjectPrivilegesTest.cpp}::user, and Catalog_Namespace::UserMetadata::userName.

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

853  {
854  UserMetadata user;
855  if (SysCatalog::instance().getMetadataForUserById(id, user)) {
856  return user.userName;
857  }
858  // a user could be deleted and a dashboard still exist?
859  return "Unknown";
860 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function: