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"]],[["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-07-02 UTC."],[[["The document provides documentation for various versions of the `google::cloud::spanner::Connection` class, with version 2.37.0-rc being the latest and 2.23.0 as the version focused on within the content."],["The `Connection` class serves as an interface with pure-virtual methods that mirror the user-facing overload sets found in the `Client` class, allowing for custom behavior injection during testing."],["`Connection` is designed to facilitate interactions with a Spanner database, with a virtual `options()` function that allows the user to see the Options utilized by the Connection."],["The `Connection` interface defines methods for operations like `Read`, `PartitionRead`, `ExecuteQuery`, `ExecuteDml`, `ProfileQuery`, and several others that interact with Spanner databases."],["The provided documentation has various interfaces that specify the parameters and the returns for the methods used to connect to a Spanner database, including, `ReadParams`, `SqlParams`, `CommitParams`, and more."]]],[]]