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::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.

Definition at line 52 of file mutations.h.

Constructor & Destructor Documentation

◆ Mutation() [1/3]

google::cloud::spanner::v1::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::v1::Mutation::Mutation ( Mutation &&  )
default

◆ Mutation() [3/3]

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

Member Function Documentation

◆ as_proto() [1/2]

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

Convert the mutation to the underlying proto.

Definition at line 72 of file mutations.h.

◆ as_proto() [2/2]

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

Definition at line 73 of file mutations.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 67 of file mutations.h.

◆ operator==

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

Definition at line 24 of file mutations.cc.

◆ 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.

Definition at line 29 of file mutations.cc.