Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
Public Member Functions | Friends | List of all members
google::cloud::spanner::v1::QueryOptions Class Reference

These QueryOptions allow users to configure features about how their SQL queries executes on the server. More...

#include <google/cloud/spanner/query_options.h>

Public Member Functions

 QueryOptions ()=default
 
 QueryOptions (QueryOptions const &)=default
 
QueryOptionsoperator= (QueryOptions const &)=default
 
 QueryOptions (QueryOptions &&)=default
 
QueryOptionsoperator= (QueryOptions &&)=default
 
absl::optional< std::string > const & optimizer_version () const
 Returns the optimizer version. More...
 
QueryOptionsset_optimizer_version (absl::optional< std::string > version)
 Sets the optimizer version to the specified integer string. More...
 
absl::optional< std::string > const & optimizer_statistics_package () const
 Returns the optimizer statistics package. More...
 
QueryOptionsset_optimizer_statistics_package (absl::optional< std::string > stats_package)
 Sets the optimizer statistics package to the specified string. More...
 
absl::optional< RequestPriority > const & request_priority () const
 Returns the request priority. More...
 
QueryOptionsset_request_priority (absl::optional< RequestPriority > priority)
 Sets the request priority. More...
 
absl::optional< std::string > const & request_tag () const
 Returns the request tag. More...
 
QueryOptionsset_request_tag (absl::optional< std::string > tag)
 Sets the request tag. More...
 

Friends

bool operator== (QueryOptions const &a, QueryOptions const &b)
 
bool operator!= (QueryOptions const &a, QueryOptions const &b)
 

Detailed Description

These QueryOptions allow users to configure features about how their SQL queries executes on the server.

See also
https://cloud.google.com/spanner/docs/reference/rest/v1/QueryOptions
http://cloud/spanner/docs/query-optimizer/manage-query-optimizer

Definition at line 36 of file query_options.h.

Constructor & Destructor Documentation

◆ QueryOptions() [1/3]

google::cloud::spanner::v1::QueryOptions::QueryOptions ( )
default

◆ QueryOptions() [2/3]

google::cloud::spanner::v1::QueryOptions::QueryOptions ( QueryOptions const &  )
default

◆ QueryOptions() [3/3]

google::cloud::spanner::v1::QueryOptions::QueryOptions ( QueryOptions &&  )
default

Member Function Documentation

◆ operator=() [1/2]

QueryOptions& google::cloud::spanner::v1::QueryOptions::operator= ( QueryOptions &&  )
default

◆ operator=() [2/2]

QueryOptions& google::cloud::spanner::v1::QueryOptions::operator= ( QueryOptions const &  )
default

◆ optimizer_statistics_package()

absl::optional<std::string> const& google::cloud::spanner::v1::QueryOptions::optimizer_statistics_package ( ) const
inline

Returns the optimizer statistics package.

Definition at line 60 of file query_options.h.

◆ optimizer_version()

absl::optional<std::string> const& google::cloud::spanner::v1::QueryOptions::optimizer_version ( ) const
inline

Returns the optimizer version.

Definition at line 45 of file query_options.h.

◆ request_priority()

absl::optional<RequestPriority> const& google::cloud::spanner::v1::QueryOptions::request_priority ( ) const
inline

Returns the request priority.

Definition at line 75 of file query_options.h.

◆ request_tag()

absl::optional<std::string> const& google::cloud::spanner::v1::QueryOptions::request_tag ( ) const
inline

Returns the request tag.

Definition at line 86 of file query_options.h.

◆ set_optimizer_statistics_package()

QueryOptions& google::cloud::spanner::v1::QueryOptions::set_optimizer_statistics_package ( absl::optional< std::string >  stats_package)
inline

Sets the optimizer statistics package to the specified string.

Setting to the empty string will use the database default.

Definition at line 68 of file query_options.h.

◆ set_optimizer_version()

QueryOptions& google::cloud::spanner::v1::QueryOptions::set_optimizer_version ( absl::optional< std::string >  version)
inline

Sets the optimizer version to the specified integer string.

Setting to the empty string will use the database default. Use the string "latest" to use the latest available optimizer version.

Definition at line 54 of file query_options.h.

◆ set_request_priority()

QueryOptions& google::cloud::spanner::v1::QueryOptions::set_request_priority ( absl::optional< RequestPriority priority)
inline

Sets the request priority.

Definition at line 80 of file query_options.h.

◆ set_request_tag()

QueryOptions& google::cloud::spanner::v1::QueryOptions::set_request_tag ( absl::optional< std::string >  tag)
inline

Sets the request tag.

Definition at line 91 of file query_options.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( QueryOptions const &  a,
QueryOptions const &  b 
)
friend

Definition at line 103 of file query_options.h.

◆ operator==

bool operator== ( QueryOptions const &  a,
QueryOptions const &  b 
)
friend

Definition at line 96 of file query_options.h.