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

Method ShowDatabase

src/client/ns_client.cc:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74bool NsClient::ShowDatabase(std::vector<std::string>* dbs, std::string& msg) {
75 ::fedb::nameserver::GeneralRequest request;
76 ::fedb::nameserver::ShowDatabaseResponse response;
77 bool ok =
78 client_.SendRequest(&::fedb::nameserver::NameServer_Stub::ShowDatabase,
79 &request, &response, FLAGS_request_timeout_ms, 1);
80 for (auto db : response.db()) {
81 dbs->push_back(db);
82 }
83 msg = response.msg();
84 return ok && response.code() == 0;
85}
86
87bool NsClient::DropDatabase(const std::string& db, std::string& msg) {
88 ::fedb::nameserver::DropDatabaseRequest request;

Callers 3

HandleNSShowDBFunction · 0.45
HandleCmdFunction · 0.45
ShowDBMethod · 0.45

Calls 3

SendRequestMethod · 0.80
msgMethod · 0.80
codeMethod · 0.80

Tested by

no test coverage detected