public sealed class TransactionSelector : IMessage<TransactionSelector>, IEquatable<TransactionSelector>, IDeepCloneable<TransactionSelector>, IBufferMessage, IMessage
This message is used to select the transaction in which a
[Read][google.spanner.v1.Spanner.Read] or
[ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.
See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions.
Begin a new transaction and execute this read or SQL query in
it. The transaction ID of the new transaction is returned in
[ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction].
[[["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-07 UTC."],[[["\u003cp\u003eThis webpage details the \u003ccode\u003eTransactionSelector\u003c/code\u003e class, which is used to specify the transaction context for \u003ccode\u003eRead\u003c/code\u003e or \u003ccode\u003eExecuteSql\u003c/code\u003e operations in Google Cloud Spanner.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionSelector\u003c/code\u003e class offers multiple transaction options, including starting a new transaction (\u003ccode\u003eBegin\u003c/code\u003e), using a previously-started transaction (\u003ccode\u003eId\u003c/code\u003e), or employing a temporary transaction for single SQL queries (\u003ccode\u003eSingleUse\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe content lists numerous versions of the \u003ccode\u003eGoogle.Cloud.Spanner.V1\u003c/code\u003e library, ranging from the latest beta release (5.0.0-beta05) to older versions (3.5.0), providing access to the \u003ccode\u003eTransactionSelector\u003c/code\u003e class across these releases.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionSelector\u003c/code\u003e class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, making it a robust component within the Google Cloud Spanner library.\u003c/p\u003e\n"],["\u003cp\u003eThe TransactionSelector class has two constructors: one which is a simple default constructor, and the other which creates a new TransactionSelector based on another existing TransactionSelector object.\u003c/p\u003e\n"]]],[],null,[]]