This interface defines pure-virtual methods for each of the user-facing overload sets in Client. That is, all of Client's Read() overloads will forward to the one pure-virtual Read() method declared in this interface, and similar for Client's other methods. This allows users to inject custom behavior (e.g., with a Google Mock object) in a Client object for use in their own tests.
To create a concrete instance that connects you to a real Spanner database, see MakeConnection().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The page provides documentation for various versions of the Google Cloud Spanner C++ client `Connection` class, with version 2.37.0-rc being the latest release candidate and 2.11.0 the current version displayed."],["The `Connection` class offers pure-virtual methods that correspond to user-facing overload sets within the `Client` class, allowing for the injection of custom behaviors, such as with Google Mock objects, for testing."],["`Connection` acts as an interface for interacting with a Spanner database, including functions for reading data, executing queries and DML statements, partitioning operations, committing transactions, and rolling back transactions."],["The documentation details various virtual functions available within the `Connection` class, which include methods such as `Read`, `ExecuteQuery`, `Commit`, and `Rollback`, each outlining parameters and return types."],["The `MakeConnection()` method, mentioned in the context, allows for the creation of a real connection to a Spanner database."]]],[]]