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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["This webpage provides documentation for the `TupleStream` class in the Google Cloud Spanner C++ library, detailing its functionality across multiple versions."],["`TupleStream` is a class that defines a range, which parses `Tuple` objects from a given range of `RowStreamIterator`s."],["The latest release is `2.37.0-rc`, with many prior versions of the `TupleStream` class being accessible through the page as far back as `2.11.0`."],["The class is used in conjunction with the `StreamOf\u003cT\u003e(range)` factory function, typically within range-for loops to iterate over and process row data."],["The term \"stream\" in the class name refers to the nature of the data source rather than C++'s I/O streams library, and the class itself behaves as a range defined by `TupleStreamIterator` objects."]]],[]]