Users create instances using the StreamOf<T>(range) non-member factory function (defined below). The following is a typical usage of this class in a range-for loop.
auto row_range = ...
using RowType = std::tuple<std::int64_t, std::string, bool>;
for (auto const& row : StreamOf<RowType>(row_range)) {
if (!row) {
// Handle error;
}
std::int64_t x = std::get<0>(*row);
...
}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This page provides documentation for the `TupleStream` class in the Google Cloud Spanner C++ library, covering versions from 2.11.0 to the latest release candidate 2.37.0-rc."],["`TupleStream` is used to parse `Tuple` objects from a range of `RowStreamIterator`s and is typically used in range-based for loops."],["The `StreamOf\u003cT\u003e(range)` non-member factory function is used to create instances of `TupleStream`."],["`TupleStream` is a range defined by two `TupleStreamIterator` objects and is conceptually a data source, not a C++ I/O stream."],["It contains functions, such as `begin()` and `end()` which return the iterator, and a `iterator` type alias for `TupleStreamIterator\u003c Tuple \u003e`."]]],[]]