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

The in-memory representation of a Bigtable cell. More...

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

Public Member Functions

template<typename KeyType , typename ColumnType , typename ValueType , typename std::enable_if<!std::is_integral< ValueType >::value, int >::type = 0>
 Cell (KeyType &&row_key, std::string family_name, ColumnType &&column_qualifier, std::int64_t timestamp, ValueType &&value, std::vector< std::string > labels)
 Create a Cell and fill it with data. More...
 
template<typename KeyType , typename ColumnType >
 Cell (KeyType &&row_key, std::string family_name, ColumnType &&column_qualifier, std::int64_t timestamp, std::int64_t value, std::vector< std::string > labels)
 Create a Cell and fill it with a 64-bit value encoded as big endian. More...
 
template<typename KeyType , typename ColumnType , typename ValueType >
 Cell (KeyType &&row_key, std::string family_name, ColumnType &&column_qualifier, std::int64_t timestamp, ValueType &&value)
 Create a cell and fill it with data, but with empty labels. More...
 
RowKeyType const & row_key () const
 Return the row key this cell belongs to. More...
 
std::string const & family_name () const
 Return the family this cell belongs to. More...
 
ColumnQualifierType const & column_qualifier () const
 Return the column this cell belongs to. More...
 
std::chrono::microseconds timestamp () const
 Return the timestamp of this cell. More...
 
CellValueType const & value () const
 Return the contents of this cell. More...
 
template<typename T >
StatusOr< T > decode_big_endian_integer () const
 Interpret the value as a big-endian encoded T and return it. More...
 
std::vector< std::string > const & labels () const
 Return the labels applied to this cell by label transformer read filters. More...
 

Detailed Description

The in-memory representation of a Bigtable cell.

Bigtable stores data in rows, indexes by row keys. Each row may contain multiple column families, each column family might contain multiple columns, and each column has multiple cells indexed by timestamp. Notice that the storage is sparse, column families, columns, and timestamps might contain zero cells.

The Cell class owns all its data.

Definition at line 85 of file cell.h.

Constructor & Destructor Documentation

◆ Cell() [1/3]

template<typename KeyType , typename ColumnType , typename ValueType , typename std::enable_if<!std::is_integral< ValueType >::value, int >::type = 0>
google::cloud::bigtable::v0::Cell::Cell ( KeyType &&  row_key,
std::string  family_name,
ColumnType &&  column_qualifier,
std::int64_t  timestamp,
ValueType &&  value,
std::vector< std::string >  labels 
)
inline

Create a Cell and fill it with data.

Definition at line 95 of file cell.h.

◆ Cell() [2/3]

template<typename KeyType , typename ColumnType >
google::cloud::bigtable::v0::Cell::Cell ( KeyType &&  row_key,
std::string  family_name,
ColumnType &&  column_qualifier,
std::int64_t  timestamp,
std::int64_t  value,
std::vector< std::string >  labels 
)
inline

Create a Cell and fill it with a 64-bit value encoded as big endian.

Definition at line 107 of file cell.h.

◆ Cell() [3/3]

template<typename KeyType , typename ColumnType , typename ValueType >
google::cloud::bigtable::v0::Cell::Cell ( KeyType &&  row_key,
std::string  family_name,
ColumnType &&  column_qualifier,
std::int64_t  timestamp,
ValueType &&  value 
)
inline

Create a cell and fill it with data, but with empty labels.

Definition at line 117 of file cell.h.

Member Function Documentation

◆ column_qualifier()

ColumnQualifierType const& google::cloud::bigtable::v0::Cell::column_qualifier ( ) const
inline

Return the column this cell belongs to.

The returned value is not valid after this object is deleted.

Definition at line 133 of file cell.h.

◆ decode_big_endian_integer()

template<typename T >
StatusOr<T> google::cloud::bigtable::v0::Cell::decode_big_endian_integer ( ) const
inline

Interpret the value as a big-endian encoded T and return it.

Google Cloud Bigtable stores arbitrary blobs in each cell. Some applications interpret these blobs as strings, other as encoded protos, and sometimes as big-endian integers. This is a helper function to convert the blob into a T value.

Definition at line 155 of file cell.h.

◆ family_name()

std::string const& google::cloud::bigtable::v0::Cell::family_name ( ) const
inline

Return the family this cell belongs to.

The returned value is not valid after this object is deleted.

Definition at line 129 of file cell.h.

◆ labels()

std::vector<std::string> const& google::cloud::bigtable::v0::Cell::labels ( ) const
inline

Return the labels applied to this cell by label transformer read filters.

Definition at line 160 of file cell.h.

◆ row_key()

RowKeyType const& google::cloud::bigtable::v0::Cell::row_key ( ) const
inline

Return the row key this cell belongs to.

The returned value is not valid after this object is deleted.

Definition at line 125 of file cell.h.

◆ timestamp()

std::chrono::microseconds google::cloud::bigtable::v0::Cell::timestamp ( ) const
inline

Return the timestamp of this cell.

Definition at line 138 of file cell.h.

◆ value()

CellValueType const& google::cloud::bigtable::v0::Cell::value ( ) const
inline

Return the contents of this cell.

The returned value is not valid after this object is deleted.

Definition at line 144 of file cell.h.