Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
google::cloud::bigtable::RowRange Class Reference

Define the interfaces to create row key ranges. More...

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

Public Member Functions

 RowRange (::google::bigtable::v2::RowRange rhs)
 
 RowRange (RowRange &&)=default
 
RowRangeoperator= (RowRange &&)=default
 
 RowRange (RowRange const &)=default
 
RowRangeoperator= (RowRange const &)=default
 
bool IsEmpty () const
 Return true if the range is empty. More...
 
template<typename T >
bool Contains (T const &key) const
 Return true if key is in the range. More...
 
std::pair< bool, RowRangeIntersect (RowRange const &range) const
 Compute the intersection against another RowRange. More...
 
::google::bigtable::v2::RowRange const & as_proto () const &
 Return the filter expression as a protobuf. More...
 
::google::bigtable::v2::RowRange && as_proto () &&
 Move out the underlying protobuf value. More...
 

Static Public Member Functions

static RowRange InfiniteRange ()
 Return the infinite range, i.e., a range including all possible keys. More...
 
template<typename T >
static RowRange StartingAt (T &&begin)
 Return the range starting at begin (included), with no upper limit. More...
 
template<typename T >
static RowRange EndingAt (T &&end)
 Return the range ending at end (included), with no lower limit. More...
 
static RowRange Empty ()
 Return an empty range. More...
 
template<typename T , typename U >
static RowRange Range (T &&begin, U &&end)
 Return the range representing the interval [begin, end). More...
 
template<typename T >
static RowRange Prefix (T &&prefix)
 Return a range that contains all the keys starting with prefix. More...
 
Less common, yet sometimes useful, ranges.

Return a range representing the interval [begin, end).

template<typename T , typename U >
static RowRange RightOpen (T &&begin, U &&end)
 Return a range representing the interval (begin, end]. More...
 
template<typename T , typename U >
static RowRange LeftOpen (T &&begin, U &&end)
 Return a range representing the interval (begin, end]. More...
 
template<typename T , typename U >
static RowRange Open (T &&begin, U &&end)
 Return a range representing the interval (begin, end). More...
 
template<typename T , typename U >
static RowRange Closed (T &&begin, U &&end)
 Return a range representing the interval [begin, end]. More...
 

Detailed Description

Define the interfaces to create row key ranges.

Example:

// Create a range for the keys starting with the given prefix.
auto range = bigtable::RowRange("foo/");
Define the interfaces to create row key ranges.
Definition: row_range.h:38

Constructor & Destructor Documentation

◆ RowRange() [1/3]

google::cloud::bigtable::RowRange::RowRange ( ::google::bigtable::v2::RowRange  rhs)
inlineexplicit

◆ RowRange() [2/3]

google::cloud::bigtable::RowRange::RowRange ( RowRange &&  )
default

◆ RowRange() [3/3]

google::cloud::bigtable::RowRange::RowRange ( RowRange const &  )
default

Member Function Documentation

◆ as_proto() [1/2]

::google::bigtable::v2::RowRange && google::cloud::bigtable::RowRange::as_proto ( ) &&
inline

Move out the underlying protobuf value.

◆ as_proto() [2/2]

::google::bigtable::v2::RowRange const & google::cloud::bigtable::RowRange::as_proto ( ) const &
inline

Return the filter expression as a protobuf.

◆ Closed()

template<typename T , typename U >
static RowRange google::cloud::bigtable::RowRange::Closed ( T &&  begin,
U &&  end 
)
inlinestatic

Return a range representing the interval [begin, end].

◆ Contains()

template<typename T >
bool google::cloud::bigtable::RowRange::Contains ( T const &  key) const
inline

Return true if key is in the range.

◆ Empty()

static RowRange google::cloud::bigtable::RowRange::Empty ( )
inlinestatic

Return an empty range.

◆ EndingAt()

template<typename T >
static RowRange google::cloud::bigtable::RowRange::EndingAt ( T &&  end)
inlinestatic

Return the range ending at end (included), with no lower limit.

◆ InfiniteRange()

static RowRange google::cloud::bigtable::RowRange::InfiniteRange ( )
inlinestatic

Return the infinite range, i.e., a range including all possible keys.

◆ Intersect()

std::pair< bool, RowRange > google::cloud::bigtable::RowRange::Intersect ( RowRange const &  range) const

Compute the intersection against another RowRange.

Returns
a 2-tuple, the first element is a boolean, with value true if there is some intersection, the second element is the intersection. If there is no intersection the first element is false and the second element has a valid, but unspecified value.

◆ IsEmpty()

bool google::cloud::bigtable::RowRange::IsEmpty ( ) const

Return true if the range is empty.

Note that some ranges (such as ["", ""]) are not empty but only include invalid row keys.

◆ LeftOpen()

template<typename T , typename U >
static RowRange google::cloud::bigtable::RowRange::LeftOpen ( T &&  begin,
U &&  end 
)
inlinestatic

Return a range representing the interval (begin, end].

◆ Open()

template<typename T , typename U >
static RowRange google::cloud::bigtable::RowRange::Open ( T &&  begin,
U &&  end 
)
inlinestatic

Return a range representing the interval (begin, end).

◆ operator=() [1/2]

RowRange & google::cloud::bigtable::RowRange::operator= ( RowRange &&  )
default

◆ operator=() [2/2]

RowRange & google::cloud::bigtable::RowRange::operator= ( RowRange const &  )
default

◆ Prefix()

template<typename T >
static RowRange google::cloud::bigtable::RowRange::Prefix ( T &&  prefix)
inlinestatic

Return a range that contains all the keys starting with prefix.

◆ Range()

template<typename T , typename U >
static RowRange google::cloud::bigtable::RowRange::Range ( T &&  begin,
U &&  end 
)
inlinestatic

Return the range representing the interval [begin, end).

◆ RightOpen()

template<typename T , typename U >
static RowRange google::cloud::bigtable::RowRange::RightOpen ( T &&  begin,
U &&  end 
)
inlinestatic

Return a range representing the interval (begin, end].

◆ StartingAt()

template<typename T >
static RowRange google::cloud::bigtable::RowRange::StartingAt ( T &&  begin)
inlinestatic

Return the range starting at begin (included), with no upper limit.