This function is implemented using gMock's MOCK_METHOD().
Consult the gMock documentation to use this mock in your tests.
Returns
Type
Description
StatusOr< spanner::Row >
if the stream is interrupted due to a failure the StatusOr<spanner::Row> contains the error. The function returns a successful StatusOr<> with an empty spanner::Row to indicate end-of-stream.
Metadata()
Returns metadata about the result set, such as the field types and the transaction id created by the request.
[[["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 page provides documentation for the \u003ccode\u003eMockResultSetSource\u003c/code\u003e class, which is used for mocking the results of \u003ccode\u003eExecuteQuery()\u003c/code\u003e or \u003ccode\u003eRead()\u003c/code\u003e operations in Cloud Spanner's C++ client.\u003c/p\u003e\n"],["\u003cp\u003eThe page details the available versions of the \u003ccode\u003eMockResultSetSource\u003c/code\u003e class, ranging from version 2.11.0 to the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMockResultSetSource\u003c/code\u003e class offers \u003ccode\u003eNextRow()\u003c/code\u003e, \u003ccode\u003eMetadata()\u003c/code\u003e, and \u003ccode\u003eStats()\u003c/code\u003e functions, which are implemented using gMock and allow users to mock stream data, metadata, and statistics, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNextRow()\u003c/code\u003e function returns a \u003ccode\u003eStatusOr<spanner::Row>\u003c/code\u003e that will provide the next row in the stream, return the error in case of a failure, or an empty \u003ccode\u003espanner::Row\u003c/code\u003e to indicate the end-of-stream.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMetadata()\u003c/code\u003e and \u003ccode\u003eStats()\u003c/code\u003e provide information about the field types and transaction ID created, and statistics about the result set including the number of rows and query plan.\u003c/p\u003e\n"]]],[],null,[]]