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-03-21 UTC."],[[["This page documents various versions of the `TupleStream` class, specifically within the Google Cloud Spanner C++ library, with the latest being version 2.37.0-rc."],["`TupleStream` is a class that defines a range for parsing `Tuple` objects from a given range of `RowStreamIterator`s."],["Users typically utilize the `StreamOf\u003cT\u003e(range)` factory function to create `TupleStream` instances for iterating through rows, in a range-for loop."],["The term \"stream\" within the name `TupleStream` refers to the nature of the data source, not to be confused with C++ I/O streams."],["`TupleStream` includes an iterator type alias and `begin()` and `end()` methods to facilitate range-based operations."]]],[]]