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."],[[["This page details the `Connection` interface for Spanner database interactions, as part of the C++ client library, with the latest version being 2.37.0-rc and the current version represented in this content is 2.34.0."],["The `Connection` interface defines pure-virtual methods corresponding to each user-facing method in the `Client` class, enabling custom behavior injection for testing purposes."],["This interface serves as an abstraction layer for actions such as `Read`, `ExecuteQuery`, `Commit`, and other spanner operations."],["The functions in this interface return the options, or handle Spanner operations like `Read`, `PartitionRead`, `ExecuteQuery`, and more."],["To make a real connection to a database, the `MakeConnection()` function can be used."]]],[]]