Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
|
Define classes to mock the Cloud Spanner C++ client APIs. More...
Classes | |
class | MockConnection |
An inlined versioned namespace to avoid dependency diamonds. More... | |
class | MockDatabaseAdminConnection |
A class to mock google::cloud::spanner::DatabaseAdminConnection . More... | |
class | MockInstanceAdminConnection |
A class to mock google::cloud::spanner::InstanceAdminConnection . More... | |
class | MockResultSetSource |
Mock the results of a ExecuteQuery() or Read() operation. More... | |
Functions | |
spanner::Row | MakeRow (std::vector< std::pair< std::string, spanner::Value > > pairs) |
Creates a spanner::Row with the specified column names and values. More... | |
template<typename... Ts> | |
spanner::Row | MakeRow (Ts &&... ts) |
Creates a spanner::Row with spanner::Value s created from the given arguments and with auto-generated column names. More... | |
Define classes to mock the Cloud Spanner C++ client APIs.
|
inline |
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.
spanner::Row google::cloud::spanner_mocks::MakeRow | ( | Ts &&... | ts | ) |
Creates a spanner::Row
with spanner::Value
s 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::Value
s 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.