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::Mutation Class Reference

A wrapper for Cloud Spanner mutations. More...

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

Public Member Functions

 Mutation ()=default
 Creates an empty mutation. More...
 
 Mutation (Mutation &&)=default
 
Mutationoperator= (Mutation &&)=default
 
 Mutation (Mutation const &)=default
 
Mutationoperator= (Mutation const &)=default
 
google::spanner::v1::Mutation as_proto () &&
 Convert the mutation to the underlying proto. More...
 
google::spanner::v1::Mutation as_proto () const &
 

Friends

bool operator== (Mutation const &lhs, Mutation const &rhs)
 
bool operator!= (Mutation const &lhs, Mutation const &rhs)
 
void PrintTo (Mutation const &m, std::ostream *os)
 Allows Google Test to print internal debugging information when test assertions fail. More...
 

Detailed Description

A wrapper for Cloud Spanner mutations.

In addition to the Data Manipulation Language (DML) based APIs, Cloud Spanner supports the mutation API, where the application describes data modification using a data structure instead of a SQL statement.

This class serves as a wrapper for all mutations types. Use the builders, such as InsertMutationBuilder or UpdateMutationBuilder to create objects of this class.

See also
https://cloud.google.com/spanner/docs/modify-mutation-api for more information about the Cloud Spanner mutation API.

Constructor & Destructor Documentation

◆ Mutation() [1/3]

google::cloud::spanner::Mutation::Mutation ( )
default

Creates an empty mutation.

Note
Empty mutations are not usable with the Cloud Spanner mutation API.

◆ Mutation() [2/3]

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

◆ Mutation() [3/3]

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

Member Function Documentation

◆ as_proto() [1/2]

google::spanner::v1::Mutation google::cloud::spanner::Mutation::as_proto ( ) &&
inline

Convert the mutation to the underlying proto.

◆ as_proto() [2/2]

google::spanner::v1::Mutation google::cloud::spanner::Mutation::as_proto ( ) const &
inline

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( Mutation const &  lhs,
Mutation const &  rhs 
)
friend

◆ operator==

bool operator== ( Mutation const &  lhs,
Mutation const &  rhs 
)
friend

◆ PrintTo

void PrintTo ( Mutation const &  m,
std::ostream *  os 
)
friend

Allows Google Test to print internal debugging information when test assertions fail.

Warning
This is intended for debugging and human consumption only, not machine consumption as the output format may change without notice.