Class Cell (2.23.0)

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.

Constructors

Cell(KeyType &&, std::string, ColumnType &&, std::int64_t, ValueType &&, std::vector< std::string >)

Creates a Cell and fill it with data.

This function does not participate in overload resolution if ValueType is not an integral type. The case for integral types is handled by a separate overload.

Parameters
Name Description
row_key KeyType &&
family_name std::string
column_qualifier ColumnType &&
timestamp std::int64_t
value ValueType &&
labels std::vector< std::string >
typename KeyType
typename ColumnType
typename ValueType

Cell(KeyType &&, std::string, ColumnType &&, std::int64_t, std::int64_t, std::vector< std::string >)

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

Parameters
Name Description
row_key KeyType &&
family_name std::string
column_qualifier ColumnType &&
timestamp std::int64_t
value std::int64_t
labels std::vector< std::string >
typename KeyType
typename ColumnType

Cell(KeyType &&, std::string, ColumnType &&, std::int64_t, ValueType &&)

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

Parameters
Name Description
row_key KeyType &&
family_name std::string
column_qualifier ColumnType &&
timestamp std::int64_t
value ValueType &&
typename KeyType
typename ColumnType
typename ValueType

Functions

row_key() const

Return the row key this cell belongs to.

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

Returns
Type Description
RowKeyType const &

family_name() const

Return the family this cell belongs to.

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

Returns
Type Description
std::string const &

column_qualifier() const

Return the column this cell belongs to.

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

Returns
Type Description
ColumnQualifierType const &

timestamp() const

Return the timestamp of this cell.

Returns
Type Description
std::chrono::microseconds

value() const &

Return the contents of this cell.

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

Returns
Type Description
CellValueType const &

value() &&

Return the contents of this cell.

Returns
Type Description
CellValueType &&

decode_big_endian_integer() const

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.

Parameter
Name Description
typename T
Returns
Type Description
StatusOr< T >

labels() const

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

Returns
Type Description
std::vector< std::string > const &