Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
google::cloud::spanner::RowStreamIterator Class Reference

A RowStreamIterator is an Input Iterator (see below) that returns a sequence of StatusOr<Row> objects. More...

#include <google/cloud/spanner/row.h>

Public Types

using Source = std::function< StatusOr< Row >()>
 A function that returns a sequence of StatusOr<Row> objects. More...
 
Iterator type aliases
using iterator_category = std::input_iterator_tag
 
using value_type = StatusOr< Row >
 
using difference_type = std::ptrdiff_t
 
using pointer = value_type *
 
using reference = value_type &
 
using const_pointer = value_type const *
 
using const_reference = value_type const &
 

Public Member Functions

 RowStreamIterator ()
 Default constructs an "end" iterator. More...
 
 RowStreamIterator (Source source)
 Constructs a RowStreamIterator that will consume rows from the given source, which must not be nullptr. More...
 
reference operator* ()
 
pointer operator-> ()
 
const_reference operator* () const
 
const_pointer operator-> () const
 
RowStreamIteratoroperator++ ()
 
RowStreamIterator operator++ (int)
 

Friends

bool operator== (RowStreamIterator const &, RowStreamIterator const &)
 
bool operator!= (RowStreamIterator const &, RowStreamIterator const &)
 

Detailed Description

A RowStreamIterator is an Input Iterator (see below) that returns a sequence of StatusOr<Row> objects.

As an Input Iterator, the sequence may only be consumed once. Default constructing a RowStreamIterator creates an instance that represents "end".

Note
The term "stream" in this name refers to the general nature of the data source, and is not intended to suggest any similarity to C++'s I/O streams library. Syntactically, this class is an "iterator".

Member Typedef Documentation

◆ const_pointer

◆ const_reference

◆ difference_type

◆ iterator_category

◆ pointer

◆ reference

◆ Source

A function that returns a sequence of StatusOr<Row> objects.

Returning an empty Row indicates that there are no more rows to be returned.

◆ value_type

Constructor & Destructor Documentation

◆ RowStreamIterator() [1/2]

google::cloud::spanner::RowStreamIterator::RowStreamIterator ( )

Default constructs an "end" iterator.

◆ RowStreamIterator() [2/2]

google::cloud::spanner::RowStreamIterator::RowStreamIterator ( Source  source)
explicit

Constructs a RowStreamIterator that will consume rows from the given source, which must not be nullptr.

Member Function Documentation

◆ operator*() [1/2]

reference google::cloud::spanner::RowStreamIterator::operator* ( )
inline

◆ operator*() [2/2]

const_reference google::cloud::spanner::RowStreamIterator::operator* ( ) const
inline

◆ operator++() [1/2]

RowStreamIterator & google::cloud::spanner::RowStreamIterator::operator++ ( )

◆ operator++() [2/2]

RowStreamIterator google::cloud::spanner::RowStreamIterator::operator++ ( int  )

◆ operator->() [1/2]

pointer google::cloud::spanner::RowStreamIterator::operator-> ( )
inline

◆ operator->() [2/2]

const_pointer google::cloud::spanner::RowStreamIterator::operator-> ( ) const
inline

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( RowStreamIterator const &  ,
RowStreamIterator const &   
)
friend

◆ operator==

bool operator== ( RowStreamIterator const &  ,
RowStreamIterator const &   
)
friend