Creates a spanner::Row with the specified column names and values.
This overload accepts a vector of pairs, allowing the caller to specify both the column names and the spanner::Value that goes in each column.
This function is intended for application developers who are mocking the results of a Client::ExecuteQuery call.
Parameter
Name
Description
pairs
Returns
Type
Description
spanner::Row
MakeRow(Ts &&...)
Creates a spanner::Row with spanner::Values created from the given arguments and with auto-generated column names.
This overload accepts a variadic list of arguments that will be used to create the spanner::Values in the row. The column names will be implicitly generated, the first column being "0", the second "1", and so on, corresponding to the argument's position.
This function is intended for application developers who are mocking the results of a Client::ExecuteQuery call.
[[["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 document provides documentation for mocking the Cloud Spanner C++ client APIs, including various versioned releases ranging from 2.11.0 to the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003enamespacegoogle_1_1cloud_1_1spanner__mocks\u003c/code\u003e namespace includes classes such as \u003ccode\u003eMockConnection\u003c/code\u003e, \u003ccode\u003eMockDatabaseAdminConnection\u003c/code\u003e, and \u003ccode\u003eMockInstanceAdminConnection\u003c/code\u003e for mocking different aspects of the Spanner API connections.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMockResultSetSource\u003c/code\u003e class is designed to mock the results from operations like \u003ccode\u003eExecuteQuery()\u003c/code\u003e or \u003ccode\u003eRead()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe document details two versions of the \u003ccode\u003eMakeRow\u003c/code\u003e function, which are intended for use in application development when mocking the results of a \u003ccode\u003eClient::ExecuteQuery\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMakeRow\u003c/code\u003e function can create a \u003ccode\u003espanner::Row\u003c/code\u003e either by using a vector of column names and \u003ccode\u003espanner::Value\u003c/code\u003e pairs, or by using variadic arguments to automatically generate the column names and create the \u003ccode\u003espanner::Value\u003c/code\u003es.\u003c/p\u003e\n"]]],[],null,[]]