15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_KEYS_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_KEYS_H
18 #include "google/cloud/spanner/value.h"
19 #include "google/cloud/spanner/version.h"
20 #include <google/spanner/v1/keys.pb.h>
26 namespace spanner_internal {
28 struct KeySetInternals;
50 template <
typename... Ts>
52 return Key{
Value(std::forward<Ts>(ts))...};
95 Key
const&
key()
const& {
return key_; }
98 Key&&
key() && {
return std::move(key_); }
123 template <
typename... Ts>
135 template <
typename... Ts>
167 ks.proto_.set_all(
true);
204 explicit KeySet(
google::spanner::v1::KeySet proto)
205 : proto_(std::move(proto)) {}
207 google::spanner::v1::KeySet proto_;
213 namespace spanner_internal {
215 struct KeySetInternals {
217 return std::move(ks.proto_);
226 return KeySetInternals::ToProto(std::move(ks));
230 return KeySetInternals::FromProto(std::move(ks));