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

Object returned by Table::ReadRows(), enumerates rows in the response. More...

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

Public Types

using iterator = internal::RowReaderIterator
 

Public Member Functions

 RowReader (std::shared_ptr< DataClient > client, std::string table_name, RowSet row_set, std::int64_t rows_limit, Filter filter, std::unique_ptr< RPCRetryPolicy > retry_policy, std::unique_ptr< RPCBackoffPolicy > backoff_policy, MetadataUpdatePolicy metadata_update_policy, std::unique_ptr< internal::ReadRowsParserFactory > parser_factory)
 
 RowReader (std::shared_ptr< DataClient > client, std::string app_profile_id, std::string table_name, RowSet row_set, std::int64_t rows_limit, Filter filter, std::unique_ptr< RPCRetryPolicy > retry_policy, std::unique_ptr< RPCBackoffPolicy > backoff_policy, MetadataUpdatePolicy metadata_update_policy, std::unique_ptr< internal::ReadRowsParserFactory > parser_factory)
 
 RowReader (RowReader &&) noexcept=default
 
 ~RowReader ()
 
iterator begin ()
 Input iterator over rows in the response. More...
 
iterator end ()
 End iterator over the rows in the response. More...
 
void Cancel ()
 Gracefully terminate a streaming read. More...
 

Static Public Attributes

static std::int64_t constexpr NO_ROWS_LIMIT = 0
 A constant for the magic value that means "no limit, get all rows". More...
 

Detailed Description

Object returned by Table::ReadRows(), enumerates rows in the response.

Iterate over the results of ReadRows() using the STL idioms.

Definition at line 42 of file row_reader.h.

Member Typedef Documentation

◆ iterator

using google::cloud::bigtable::v0::RowReader::iterator = internal::RowReaderIterator

Definition at line 70 of file row_reader.h.

Constructor & Destructor Documentation

◆ RowReader() [1/3]

google::cloud::bigtable::v0::RowReader::RowReader ( std::shared_ptr< DataClient client,
std::string  table_name,
RowSet  row_set,
std::int64_t  rows_limit,
Filter  filter,
std::unique_ptr< RPCRetryPolicy retry_policy,
std::unique_ptr< RPCBackoffPolicy backoff_policy,
MetadataUpdatePolicy  metadata_update_policy,
std::unique_ptr< internal::ReadRowsParserFactory >  parser_factory 
)

Definition at line 62 of file row_reader.cc.

◆ RowReader() [2/3]

google::cloud::bigtable::v0::RowReader::RowReader ( std::shared_ptr< DataClient client,
std::string  app_profile_id,
std::string  table_name,
RowSet  row_set,
std::int64_t  rows_limit,
Filter  filter,
std::unique_ptr< RPCRetryPolicy retry_policy,
std::unique_ptr< RPCBackoffPolicy backoff_policy,
MetadataUpdatePolicy  metadata_update_policy,
std::unique_ptr< internal::ReadRowsParserFactory >  parser_factory 
)

Definition at line 74 of file row_reader.cc.

◆ RowReader() [3/3]

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

◆ ~RowReader()

google::cloud::bigtable::v0::RowReader::~RowReader ( )

Definition at line 248 of file row_reader.cc.

Member Function Documentation

◆ begin()

RowReader::iterator google::cloud::bigtable::v0::RowReader::begin ( )

Input iterator over rows in the response.

The returned iterator is a single-pass input iterator that reads rows from the RowReader when incremented. The first row may be read when the iterator is constructed.

Creating, and particularly incrementing, multiple iterators on the same RowReader is unsupported and can produce incorrect results.

Retry and backoff policies are honored.

Exceptions
std::runtime_errorif the read failed after retries.

Definition at line 99 of file row_reader.cc.

◆ Cancel()

void google::cloud::bigtable::v0::RowReader::Cancel ( )

Gracefully terminate a streaming read.

Invalidates iterators.

Definition at line 232 of file row_reader.cc.

◆ end()

RowReader::iterator google::cloud::bigtable::v0::RowReader::end ( )

End iterator over the rows in the response.

Definition at line 105 of file row_reader.cc.

Member Data Documentation

◆ NO_ROWS_LIMIT

std::int64_t constexpr google::cloud::bigtable::v0::RowReader::NO_ROWS_LIMIT = 0
static

A constant for the magic value that means "no limit, get all rows".

Zero is used as a magic value that means "get all rows" in the Cloud Bigtable RPC protocol.

Definition at line 50 of file row_reader.h.