15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_QUERY_OPTIONS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_QUERY_OPTIONS_H
18#include "google/cloud/spanner/request_priority.h"
19#include "google/cloud/spanner/version.h"
20#include "google/cloud/optional.h"
21#include "google/cloud/options.h"
22#include "absl/types/optional.h"
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
31
32
33
34
35
36
46
47
48
52
53
54
59 return optimizer_version_;
63
64
65
66
68 optimizer_version_ = std::move(version);
74 return optimizer_statistics_package_;
78
79
80
82 absl::optional<std::string> stats_package) {
83 optimizer_statistics_package_ = std::move(stats_package);
89 return request_priority_;
94 request_priority_ = std::move(priority);
99 absl::optional<std::string>
const&
request_tag()
const {
105 request_tag_ = std::move(tag);
110 return a.request_priority_ == b.request_priority_ &&
111 a.request_tag_ == b.request_tag_ &&
112 a.optimizer_version_ == b.optimizer_version_ &&
113 a.optimizer_statistics_package_ == b.optimizer_statistics_package_;
121 absl::optional<std::string> optimizer_version_;
122 absl::optional<std::string> optimizer_statistics_package_;
124 absl::optional<std::string> request_tag_;
127GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
These QueryOptions allow users to configure features about how their SQL queries executes on the serv...
Definition: query_options.h:37
QueryOptions & set_optimizer_version(absl::optional< std::string > version)
Sets the optimizer version to the specified integer string.
Definition: query_options.h:67
absl::optional< RequestPriority > const & request_priority() const
Returns the request priority.
Definition: query_options.h:88
QueryOptions(QueryOptions &&)=default
QueryOptions(Options const &opts)
Constructs from the new, recommended way to represent options of all varieties, google::cloud::Option...
QueryOptions(QueryOptions const &)=default
absl::optional< std::string > const & request_tag() const
Returns the request tag.
Definition: query_options.h:99
QueryOptions & operator=(QueryOptions const &)=default
QueryOptions & set_request_tag(absl::optional< std::string > tag)
Sets the request tag.
Definition: query_options.h:104
absl::optional< std::string > const & optimizer_statistics_package() const
Returns the optimizer statistics package.
Definition: query_options.h:73
friend bool operator==(QueryOptions const &a, QueryOptions const &b)
Definition: query_options.h:109
friend bool operator!=(QueryOptions const &a, QueryOptions const &b)
Definition: query_options.h:116
QueryOptions & operator=(QueryOptions &&)=default
absl::optional< std::string > const & optimizer_version() const
Returns the optimizer version.
Definition: query_options.h:58
QueryOptions & set_optimizer_statistics_package(absl::optional< std::string > stats_package)
Sets the optimizer statistics package to the specified string.
Definition: query_options.h:81
QueryOptions & set_request_priority(absl::optional< RequestPriority > priority)
Sets the request priority.
Definition: query_options.h:93
operator Options() const
Converts to the new, recommended way to represent options of all varieties, google::cloud::Options.
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
RequestPriority
Definition: request_priority.h:26