Google Cloud Spanner C++ Client
A C++ Client Library for Google Cloud Spanner
partition_options.h
Go to the documentation of this file.
1 // Copyright 2019 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_PARTITION_OPTIONS_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_PARTITION_OPTIONS_H
17 
19 #include "google/cloud/optional.h"
20 #include <google/spanner/v1/spanner.pb.h>
21 
22 namespace google {
23 namespace cloud {
24 namespace spanner {
25 inline namespace SPANNER_CLIENT_NS {
26 
43  optional<std::int64_t> partition_size_bytes;
44 
53  optional<std::int64_t> max_partitions;
54 };
55 
56 inline bool operator==(PartitionOptions const& a, PartitionOptions const& b) {
59 }
60 
61 inline bool operator!=(PartitionOptions const& a, PartitionOptions const& b) {
62  return !(a == b);
63 }
64 
65 namespace internal {
66 google::spanner::v1::PartitionOptions ToProto(PartitionOptions const&);
67 } // namespace internal
68 
69 } // namespace SPANNER_CLIENT_NS
70 } // namespace spanner
71 } // namespace cloud
72 } // namespace google
73 
74 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_PARTITION_OPTIONS_H
bool operator!=(PartitionOptions const &a, PartitionOptions const &b)
optional< std::int64_t > max_partitions
The desired maximum number of partitions to return.
Contains all the Cloud Spanner C++ client types and functions.
optional< std::int64_t > partition_size_bytes
The desired data size for each partition generated.
#define SPANNER_CLIENT_NS
Definition: version.h:22
bool operator==(PartitionOptions const &a, PartitionOptions const &b)
Options passed to Client::PartitionRead or Client::PartitionQuery.