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-14 UTC."],[[["This webpage provides documentation for the `TupleStream` class in the Google Cloud Spanner C++ library, detailing its functionality as a range for parsing `Tuple` objects."],["The latest version available is `2.37.0-rc`, with a list of previous versions spanning down to `2.11.0` also being documented."],["The `TupleStream` class is designed to be used in range-based for loops, similar to the example provided on the page, allowing for easy iteration over rows of data."],["`TupleStream` uses `TupleStreamIterator` to define the range of data and the name 'stream' in this context does not refer to C++'s standard I/O streams."],["Key functions are `begin()` and `end()`, both returning an iterator, and `iterator` is defined as an alias of `TupleStreamIterator\u003c Tuple \u003e` type."]]],[]]