| 1120 | } |
| 1121 | |
| 1122 | bool NsClient::ShowCatalogVersion(std::map<std::string, uint64_t>* version_map, std::string* msg) { |
| 1123 | if (version_map == nullptr || msg == nullptr) { |
| 1124 | return false; |
| 1125 | } |
| 1126 | version_map->clear(); |
| 1127 | ::fedb::nameserver::ShowCatalogRequest request; |
| 1128 | ::fedb::nameserver::ShowCatalogResponse response; |
| 1129 | bool ok = client_.SendRequest(&::fedb::nameserver::NameServer_Stub::ShowCatalog, &request, &response, |
| 1130 | FLAGS_request_timeout_ms, 1); |
| 1131 | int code = response.code(); |
| 1132 | if (ok && code == 0) { |
| 1133 | for (const auto& catalog_info : response.catalog()) { |
| 1134 | version_map->emplace(catalog_info.endpoint(), catalog_info.version()); |
| 1135 | } |
| 1136 | return true; |
| 1137 | } |
| 1138 | *msg = response.msg(); |
| 1139 | return false; |
| 1140 | } |
| 1141 | |
| 1142 | bool NsClient::TransformToTableDef( |
| 1143 | ::hybridse::node::CreatePlanNode* create_node, |
no test coverage detected