src/serverFunctionalities/source/CatalogClient.cc
std::string CatalogClient::getObjectType(std::string databaseName,
                                         std::string setName,
                                         std::string &errMsg) {

  return simpleRequest<CatSetObjectTypeRequest, CatTypeNameSearchResult, std::string>(
      myLogger, port, address, "", 1024,
      [&](Handle<CatTypeNameSearchResult> result) {
        if (result != nullptr) {
          auto success = result->wasSuccessful();
          if (!success.first) {
            errMsg = "Error getting type name: " + success.second;
            myLogger->error("Error getting type name: " + success.second);
          } else
            return result->getTypeName();
        }
        errMsg = "Error getting type name: got nothing back from catalog";
        return std::string("");
      },
      databaseName, setName);
}
// sends a request to obtain the TypeId of a Type, given a database and set
sends a request to obtain the TypeId of a Type, given a database and set
sends a request to obtain the TypeId of a Type given a database and set
std::string CatalogClient::getObjectType(std::string databaseName,
                                         std::string setName,
                                         std::string &errMsg) {
  return simpleRequest<CatSetObjectTypeRequest, CatTypeNameSearchResult, std::string>(
      myLogger, port, address, "", 1024,
      [&](Handle<CatTypeNameSearchResult> result) {
        if (result != nullptr) {
          auto success = result->wasSuccessful();
          if (!success.first) {
            errMsg = "Error getting type name: " + success.second;
            myLogger->error("Error getting type name: " + success.second);
          } else
            return result->getTypeName();
        }
        errMsg = "Error getting type name: got nothing back from catalog";
        return std::string("");
      },
      databaseName, setName);
}
std :: string CatalogClient :: getObjectType ( std :: string databaseName , std :: string setName , std :: string & errMsg ) { return simpleRequest < CatSetObjectTypeRequest , CatTypeNameSearchResult , std :: string > ( myLogger , port , address , " " , 1024 , [ & ] ( Handle < CatTypeNameSearchResult > result ) { if ( result != nullptr ) { auto success = result -> wasSuccessful ( ) ; if ( ! success . first ) { errMsg = " " + success . second ; myLogger -> error ( " " + success . second ) ; } else return result -> getTypeName ( ) ; } errMsg = " " ; return std :: string ( " " ) ; } , databaseName , setName ) ; }
sends a request to obtain the TypeId of a Type, given a database and set
sends a request to obtain the TypeId of a Type given a database and set