15 #include "google/cloud/bigtable/table_config.h" 26 ::google::bigtable::admin::v2::CreateTableRequest tmp;
27 auto& table = *tmp.mutable_table();
29 auto& families = *table.mutable_column_families();
30 for (
auto const& kv : column_families_) {
31 families[kv.first].mutable_gc_rule()->Clear();
34 tmp.mutable_initial_splits()->Reserve(
35 static_cast<
int>(initial_splits_.size()));
37 table.set_granularity(timestamp_granularity());
40 for (
auto& kv : column_families_) {
41 *families[kv.first].mutable_gc_rule() = std::move(kv.second).as_proto();
43 for (
auto& split : initial_splits_) {
44 tmp.add_initial_splits()->set_key(std::move(split));
46 initial_splits_.clear();
47 column_families_.clear();
48 granularity_ = TIMESTAMP_GRANULARITY_UNSPECIFIED;
static constexpr TimestampGranularity TIMESTAMP_GRANULARITY_UNSPECIFIED
::google::bigtable::admin::v2::CreateTableRequest as_proto() &&
Move the contents to the proto to create tables.
#define BIGTABLE_CLIENT_NS
static constexpr TimestampGranularity MILLIS
Specify the initial schema for a new table.
Contains all the Cloud Bigtable C++ client APIs.