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

Method UpdateTableMetaForAddField

src/client/tablet_client.cc:243–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243bool TabletClient::UpdateTableMetaForAddField(
244 uint32_t tid, const std::vector<fedb::common::ColumnDesc>& cols,
245 const fedb::common::VersionPair& pair, std::string& msg) {
246 ::fedb::api::UpdateTableMetaForAddFieldRequest request;
247 ::fedb::api::GeneralResponse response;
248 request.set_tid(tid);
249 for (const auto& col : cols) {
250 ::fedb::common::ColumnDesc* column_desc_ptr = request.add_column_descs();
251 column_desc_ptr->CopyFrom(col);
252 }
253 fedb::common::VersionPair* new_pair = request.mutable_version_pair();
254 new_pair->CopyFrom(pair);
255 bool ok = client_.SendRequest(
256 &::fedb::api::TabletServer_Stub::UpdateTableMetaForAddField, &request,
257 &response, FLAGS_request_timeout_ms, 1);
258 if (ok && response.code() == 0) {
259 return true;
260 }
261 msg = response.msg();
262 return false;
263}
264
265bool TabletClient::Put(
266 uint32_t tid, uint32_t pid, uint64_t time, const std::string& value,

Callers

nothing calls this directly

Calls 3

SendRequestMethod · 0.80
codeMethod · 0.80
msgMethod · 0.80

Tested by

no test coverage detected