Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
google::cloud::spanner::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
 
 QueryOptions (Options const &opts)
 Constructs from the new, recommended way to represent options of all varieties, google::cloud::Options. More...
 
 operator Options () const
 Converts to the new, recommended way to represent options of all varieties, google::cloud::Options. More...
 
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

Constructor & Destructor Documentation

◆ QueryOptions() [1/4]

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

◆ QueryOptions() [2/4]

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

◆ QueryOptions() [3/4]

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

◆ QueryOptions() [4/4]

google::cloud::spanner::QueryOptions::QueryOptions ( Options const &  opts)
explicit

Constructs from the new, recommended way to represent options of all varieties, google::cloud::Options.

Member Function Documentation

◆ operator Options()

google::cloud::spanner::QueryOptions::operator Options ( ) const
explicit

Converts to the new, recommended way to represent options of all varieties, google::cloud::Options.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ optimizer_statistics_package()

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

Returns the optimizer statistics package.

◆ optimizer_version()

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

Returns the optimizer version.

◆ request_priority()

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

Returns the request priority.

◆ request_tag()

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

Returns the request tag.

◆ set_optimizer_statistics_package()

QueryOptions & google::cloud::spanner::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.

◆ set_optimizer_version()

QueryOptions & google::cloud::spanner::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.

◆ set_request_priority()

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

Sets the request priority.

◆ set_request_tag()

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

Sets the request tag.

Friends And Related Function Documentation

◆ operator!=

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

◆ operator==

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