| 241 | } |
| 242 | |
| 243 | bool 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 | |
| 265 | bool TabletClient::Put( |
| 266 | uint32_t tid, uint32_t pid, uint64_t time, const std::string& value, |
nothing calls this directly
no test coverage detected