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."],[[["This page details the `Connection` interface for Spanner database interactions, providing pure-virtual methods that correspond to each user-facing method set in the `Client` class."],["The `Connection` interface enables users to inject custom behaviors into a `Client` object, such as mocking, for testing purposes."],["It includes methods for performing various Spanner operations such as reading, executing queries and DML, profiling, analyzing SQL, partitioning, committing, and batch writing."],["The latest release candidate for this interface is version 2.37.0-rc, with a number of previous versions going as far back as 2.11.0."],["The `MakeConnection()` method can be used to create a concrete instance that connects to a real Spanner Database."]]],[]]