mutate による列の削除

変更を使用して行内の列を削除します。

コードサンプル

C++

Bigtable 用のクライアント ライブラリをインストールして使用する方法については、Bigtable クライアント ライブラリをご覧ください。

Bigtable で認証を行うには、アプリケーションのデフォルト認証情報を設定します。詳細については、ローカル開発環境の認証の設定をご覧ください。

namespace cbt = ::google::cloud::bigtable;
[](cbt::Table table, std::string const& key,
   std::vector<std::pair<std::string, std::string>> const& columns) {
  cbt::SingleRowMutation mutation(key);
  for (auto const& c : columns) {
    mutation.emplace_back(cbt::DeleteFromColumn(c.first, c.second));
  }
  google::cloud::Status status = table.Apply(std::move(mutation));
  if (!status.ok()) throw std::runtime_error(status.message());
  std::cout << "Columns successfully deleted from row\n";
}

次のステップ

他の Google Cloud プロダクトに関連するコードサンプルの検索およびフィルタ検索を行うには、Google Cloud のサンプルをご覧ください。