Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Public Types | Public Member Functions | Static Public Attributes | List of all members
google::cloud::bigtable::v0::TableConfig Class Reference

Specify the initial schema for a new table. More...

#include <google/cloud/bigtable/table_config.h>

Public Types

using TimestampGranularity = ::google::bigtable::admin::v2::Table::TimestampGranularity
 

Public Member Functions

 TableConfig ()
 
 TableConfig (std::map< std::string, GcRule > column_families, std::vector< std::string > initial_splits)
 
::google::bigtable::admin::v2::CreateTableRequest as_proto () &&
 Move the contents to the proto to create tables. More...
 
Accessors and modifiers for all attributes
std::map< std::string, GcRule > const & column_families () const
 
void add_column_family (std::string column_family_name, GcRule gc_rule)
 
std::vector< std::string > const & initial_splits () const
 
void add_initial_split (std::string split)
 
TimestampGranularity timestamp_granularity () const
 Return the timestamp granularity parameter. More...
 
void set_timestamp_granularity (TimestampGranularity new_value)
 Set the timestamp granularity parameter. More...
 

Static Public Attributes

static constexpr TimestampGranularity MILLIS
 
static constexpr TimestampGranularity TIMESTAMP_GRANULARITY_UNSPECIFIED
 

Detailed Description

Specify the initial schema for a new table.

Definition at line 29 of file table_config.h.

Member Typedef Documentation

◆ TimestampGranularity

using google::cloud::bigtable::v0::TableConfig::TimestampGranularity = ::google::bigtable::admin::v2::Table::TimestampGranularity

Definition at line 46 of file table_config.h.

Constructor & Destructor Documentation

◆ TableConfig() [1/2]

google::cloud::bigtable::v0::TableConfig::TableConfig ( )
inline

Definition at line 31 of file table_config.h.

◆ TableConfig() [2/2]

google::cloud::bigtable::v0::TableConfig::TableConfig ( std::map< std::string, GcRule column_families,
std::vector< std::string >  initial_splits 
)
inline

Definition at line 33 of file table_config.h.

Member Function Documentation

◆ add_column_family()

void google::cloud::bigtable::v0::TableConfig::add_column_family ( std::string  column_family_name,
GcRule  gc_rule 
)
inline

Definition at line 57 of file table_config.h.

◆ add_initial_split()

void google::cloud::bigtable::v0::TableConfig::add_initial_split ( std::string  split)
inline

Definition at line 64 of file table_config.h.

◆ as_proto()

google::bigtable::admin::v2::CreateTableRequest google::cloud::bigtable::v0::TableConfig::as_proto ( ) &&

Move the contents to the proto to create tables.

Definition at line 22 of file table_config.cc.

◆ column_families()

std::map<std::string, GcRule> const& google::cloud::bigtable::v0::TableConfig::column_families ( ) const
inline

Definition at line 54 of file table_config.h.

◆ initial_splits()

std::vector<std::string> const& google::cloud::bigtable::v0::TableConfig::initial_splits ( ) const
inline

Definition at line 61 of file table_config.h.

◆ set_timestamp_granularity()

void google::cloud::bigtable::v0::TableConfig::set_timestamp_granularity ( TimestampGranularity  new_value)
inline

Set the timestamp granularity parameter.

Cloud Bigtable currently supports only millisecond granularity in the cell timestamps, both TIMESTAMP_GRANULARITY_UNSPECIFIED and MILLIS have the same effect. Creating cells with higher granularity than the supported value is rejected by the server.

Definition at line 85 of file table_config.h.

◆ timestamp_granularity()

TimestampGranularity google::cloud::bigtable::v0::TableConfig::timestamp_granularity ( ) const
inline

Return the timestamp granularity parameter.

Cloud Bigtable currently supports only millisecond granularity in the cell timestamps, both TIMESTAMP_GRANULARITY_UNSPECIFIED and MILLIS have the same effect.

Definition at line 75 of file table_config.h.

Member Data Documentation

◆ MILLIS

constexpr TableConfig::TimestampGranularity google::cloud::bigtable::v0::TableConfig::MILLIS
static
Initial value:
=
::google::bigtable::admin::v2::Table::MILLIS

Definition at line 47 of file table_config.h.

◆ TIMESTAMP_GRANULARITY_UNSPECIFIED

constexpr TableConfig::TimestampGranularity google::cloud::bigtable::v0::TableConfig::TIMESTAMP_GRANULARITY_UNSPECIFIED
static
Initial value:
=
::google::bigtable::admin::v2::Table::TIMESTAMP_GRANULARITY_UNSPECIFIED

Definition at line 49 of file table_config.h.