Class Cell (2.21.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
NameDescription
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
NameDescription
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
NameDescription
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
TypeDescription
RowKeyType const &

family_name() const

Return the family this cell belongs to.

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

Returns
TypeDescription
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
TypeDescription
ColumnQualifierType const &

timestamp() const

Return the timestamp of this cell.

Returns
TypeDescription
std::chrono::microseconds

value() const &

Return the contents of this cell.

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

Returns
TypeDescription
CellValueType const &

value() &&

Return the contents of this cell.

Returns
TypeDescription
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
NameDescription
typename T
Returns
TypeDescription
StatusOr< T >

labels() const

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

Returns
TypeDescription
std::vector< std::string > const &