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 as a range for parsing \u003ccode\u003eTuple\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTupleStream\u003c/code\u003e class, accessible across multiple versions ranging from 2.11.0 to the latest release candidate 2.37.0-rc, is created using the \u003ccode\u003eStreamOf<T>(range)\u003c/code\u003e factory function.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTupleStream\u003c/code\u003e instances can be used in range-for loops to iterate over and process rows of data, handling potential errors within the loop, through the use of two iterators.\u003c/p\u003e\n"],["\u003cp\u003eDespite the name, \u003ccode\u003eTupleStream\u003c/code\u003e is not related to C++ I/O streams, but is defined as a range bounded by \u003ccode\u003eTupleStreamIterator\u003c/code\u003e objects, with \u003ccode\u003ebegin()\u003c/code\u003e and \u003ccode\u003eend()\u003c/code\u003e functions returning iterators.\u003c/p\u003e\n"],["\u003cp\u003eThe latest release candidate version is 2.37.0-rc, and the current version being documented is 2.36.0.\u003c/p\u003e\n"]]],[],null,[]]