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-08-22 UTC."],[[["\u003cp\u003eThis document details the \u003ccode\u003eConnection\u003c/code\u003e interface for the Spanner database, which defines the pure-virtual methods for user-facing overload sets in \u003ccode\u003eClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnection\u003c/code\u003e interface allows users to inject custom behavior for testing purposes, such as using a Google Mock object within a \u003ccode\u003eClient\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eA variety of functions are available within the \u003ccode\u003eConnection\u003c/code\u003e interface, including methods for reading, querying, executing DML, and managing transactions.\u003c/p\u003e\n"],["\u003cp\u003eThe latest release candidate for the C++ Spanner API is version 2.37.0-rc, with various versions available up to 2.11.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMakeConnection()\u003c/code\u003e function can be used to create a real Spanner database connection.\u003c/p\u003e\n"]]],[],null,[]]