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-14 UTC."],[[["The latest version of the Spanner C++ library connection interface is 2.37.0-rc, with several previous versions also available for reference, ranging down to version 2.11.0."],["The `Connection` interface provides pure-virtual methods that mirror the user-facing overload sets found in the `Client` class, facilitating the injection of custom behavior for testing."],["`Connection` defines various methods for interacting with a Spanner database, including `Read`, `PartitionRead`, `ExecuteQuery`, `ExecuteDml`, `Commit`, `Rollback`, and `BatchWrite`, each with corresponding parameter and return types."],["This interface can return `StatusOr` types for various operations, allowing for error handling and reporting of various errors."],["The `MakeConnection()` function is used to create a concrete connection to a real Spanner database."]]],[]]