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

Function HandleClientDelete

src/cmd/fedb.cc:4805–4827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4803}
4804
4805void HandleClientDelete(const std::vector<std::string>& parts,
4806 ::fedb::client::TabletClient* client) {
4807 if (parts.size() < 4) {
4808 std::cout << "Bad delete format" << std::endl;
4809 return;
4810 }
4811 try {
4812 uint32_t tid = boost::lexical_cast<uint32_t>(parts[1]);
4813 uint32_t pid = boost::lexical_cast<uint32_t>(parts[2]);
4814 std::string msg;
4815 std::string idx_name;
4816 if (parts.size() > 4) {
4817 idx_name = parts[4];
4818 }
4819 if (client->Delete(tid, pid, parts[3], idx_name, msg)) {
4820 std::cout << "Delete ok" << std::endl;
4821 } else {
4822 std::cout << "Delete failed" << std::endl;
4823 }
4824 } catch (std::exception const& e) {
4825 std::cout << "Invalid args, tid pid should be uint32_t" << std::endl;
4826 }
4827}
4828
4829void HandleClientBenScan(const std::vector<std::string>& parts,
4830 ::fedb::client::TabletClient* client) {

Callers 1

StartClientFunction · 0.85

Calls 2

sizeMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected