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 document details the `Connection` interface for Spanner database interactions, providing pure-virtual methods that correspond to each user-facing overload in the `Client` class."],["The `Connection` interface facilitates the injection of custom behaviors into `Client` objects, making it useful for testing and mocking purposes."],["This document outlines various functions available within the `Connection` interface, such as `Read`, `PartitionRead`, `ExecuteQuery`, `ExecuteDml`, `Commit`, `Rollback`, and more, each with its own set of parameters and return types."],["The document shows you can create a real Spanner database connection with the `MakeConnection()` function."],["This page contains the documentation for the version 2.32.0, but you can also access the documentation for previous versions, all the way back to version 2.11.0, or the most current release candidate version, 2.37.0-rc."]]],[]]