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-08-22 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eTupleStream\u003c/code\u003e class in the Google Cloud Spanner C++ library, detailing its functionality and usage across various versions.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is \u003ccode\u003e2.37.0-rc\u003c/code\u003e, while the current version of the documentation in view is \u003ccode\u003e2.15.1\u003c/code\u003e, which has links to all the versions in between.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTupleStream\u003c/code\u003e defines a range that parses \u003ccode\u003eTuple\u003c/code\u003e objects from a range of \u003ccode\u003eRowStreamIterator\u003c/code\u003es, allowing users to iterate through rows in a range-for loop, as demonstrated by the provided code example.\u003c/p\u003e\n"],["\u003cp\u003eThe class is considered a "range" defined by \u003ccode\u003eTupleStreamIterator\u003c/code\u003e objects, despite the use of "stream" in its name, which is not related to C++'s I/O streams library.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes details on the \u003ccode\u003ebegin()\u003c/code\u003e and \u003ccode\u003eend()\u003c/code\u003e functions, as well as a type alias \u003ccode\u003eiterator\u003c/code\u003e that refers to \u003ccode\u003eTupleStreamIterator<Tuple>\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]