MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / ShowCatalogVersion

Method ShowCatalogVersion

src/client/ns_client.cc:1122–1140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1120}
1121
1122bool 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
1142bool NsClient::TransformToTableDef(
1143 ::hybridse::node::CreatePlanNode* create_node,

Callers 1

Calls 4

clearMethod · 0.80
SendRequestMethod · 0.80
codeMethod · 0.80
msgMethod · 0.80

Tested by

no test coverage detected