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::RowSet Class Reference

Represent a (possibly non-continuous) set of row keys. More...

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

Public Member Functions

 RowSet ()
 Create an empty set. More...
 
 RowSet (RowSet &&) noexcept=default
 
RowSetoperator= (RowSet &&) noexcept=default
 
 RowSet (RowSet const &)=default
 
RowSetoperator= (RowSet const &)=default
 
template<typename... Arg>
 RowSet (Arg &&... a)
 
void Append (RowRange range)
 Add range to the set. More...
 
template<typename T >
void Append (T &&row_key)
 Add row_key to the set, minimize copies when possible. More...
 
RowSet Intersect (bigtable::RowRange const &range) const
 Modify this object to contain the ranges and keys inside range. More...
 
bool IsEmpty () const
 Returns true if the set is empty. More...
 
::google::bigtable::v2::RowSet const & as_proto () const &
 
::google::bigtable::v2::RowSet && as_proto () &&
 

Detailed Description

Represent a (possibly non-continuous) set of row keys.

Cloud Bigtable can scan non-continuous sets of rows, these sets can include a mix of specific row keys and ranges as defined by bigtable::RowRange.

Definition at line 32 of file row_set.h.

Constructor & Destructor Documentation

◆ RowSet() [1/4]

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

Create an empty set.

Definition at line 35 of file row_set.h.

◆ RowSet() [2/4]

google::cloud::bigtable::v0::RowSet::RowSet ( RowSet &&  )
defaultnoexcept

◆ RowSet() [3/4]

google::cloud::bigtable::v0::RowSet::RowSet ( RowSet const &  )
default

◆ RowSet() [4/4]

template<typename... Arg>
google::cloud::bigtable::v0::RowSet::RowSet ( Arg &&...  a)
inline

Definition at line 43 of file row_set.h.

Member Function Documentation

◆ Append() [1/2]

void google::cloud::bigtable::v0::RowSet::Append ( RowRange  range)
inline

Add range to the set.

Definition at line 48 of file row_set.h.

◆ Append() [2/2]

template<typename T >
void google::cloud::bigtable::v0::RowSet::Append ( T &&  row_key)
inline

Add row_key to the set, minimize copies when possible.

Definition at line 56 of file row_set.h.

◆ as_proto() [1/2]

::google::bigtable::v2::RowSet const& google::cloud::bigtable::v0::RowSet::as_proto ( ) const &
inline

Definition at line 81 of file row_set.h.

◆ as_proto() [2/2]

::google::bigtable::v2::RowSet&& google::cloud::bigtable::v0::RowSet::as_proto ( ) &&
inline

Definition at line 82 of file row_set.h.

◆ Intersect()

RowSet google::cloud::bigtable::v0::RowSet::Intersect ( bigtable::RowRange const &  range) const

Modify this object to contain the ranges and keys inside range.

This function removes any rowkeys outside range, it removes any row ranges that do not insersect with range, and keeps only the intersection for those ranges that do intersect range.

Definition at line 21 of file row_set.cc.

◆ IsEmpty()

bool google::cloud::bigtable::v0::RowSet::IsEmpty ( ) const

Returns true if the set is empty.

A row set is empty iff passing it to a ReadRows call would never cause it to return rows. This is true if the set consists of only empty ranges.

Note that a default constructed RowSet is not empty, since it matches all rows in the table.

Definition at line 49 of file row_set.cc.

◆ operator=() [1/2]

RowSet& google::cloud::bigtable::v0::RowSet::operator= ( RowSet &&  )
defaultnoexcept

◆ operator=() [2/2]

RowSet& google::cloud::bigtable::v0::RowSet::operator= ( RowSet const &  )
default