public sealed class KeySet : IMessage<KeySet>, IEquatable<KeySet>, IDeepCloneable<KeySet>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Spanner v1 API class KeySet.
KeySet defines a collection of Cloud Spanner keys and/or key ranges. All
the keys are expected to be in the same table or index. The keys need
not be sorted in any particular way.
If the same key is specified multiple times in the set (for example
if two ranges, two keys, or a key and a range overlap), Cloud Spanner
behaves as if the key were only specified once.
For convenience all can be set to true to indicate that this
KeySet matches all keys in the table or index. Note that any keys
specified in keys or ranges are only yielded once.
A list of specific keys. Entries in keys should have exactly as
many elements as there are columns in the primary or index key
with which this KeySet is used. Individual key values are
encoded as described [here][google.spanner.v1.TypeCode].
[[["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 document provides reference information for the \u003ccode\u003eKeySet\u003c/code\u003e class within the Google Cloud Spanner v1 API, specifically for version 4.1.0, and details the class's role in defining collections of Cloud Spanner keys and key ranges.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKeySet\u003c/code\u003e class is designed to work with keys that belong to the same table or index, and duplicate keys are treated as a single entry.\u003c/p\u003e\n"],["\u003cp\u003eThe class has multiple constructors, such as \u003ccode\u003eKeySet()\u003c/code\u003e and \u003ccode\u003eKeySet(KeySet other)\u003c/code\u003e, allowing for the creation of a \u003ccode\u003eKeySet\u003c/code\u003e object either from scratch or from an existing \u003ccode\u003eKeySet\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKeySet\u003c/code\u003e includes properties like \u003ccode\u003eAll\u003c/code\u003e, which can specify that the set matches all keys, \u003ccode\u003eKeys\u003c/code\u003e for listing specific keys, and \u003ccode\u003eRanges\u003c/code\u003e to define key ranges.\u003c/p\u003e\n"],["\u003cp\u003eThe document lists a range of available versions of the \u003ccode\u003eKeySet\u003c/code\u003e API, including several from version 3 and 4, and also lists a beta version labeled \u003ccode\u003e5.0.0-beta05\u003c/code\u003e as the latest.\u003c/p\u003e\n"]]],[],null,[]]