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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["This document outlines the Cloud Spanner Mutation API wrapper for C++, allowing data modification through a data structure rather than SQL statements."],["The latest version of the API documented is 2.37.0-rc, with a history of versions available, ranging from 2.36.0 down to 2.11.0."],["The `Mutation` class provides constructors for creating empty mutations or moving/copying existing ones, along with overloaded assignment operators."],["The `as_proto()` functions allow conversion of the mutation to its underlying `google::spanner::v1::Mutation` protocol buffer representation."],["Builders such as `InsertMutationBuilder` and `UpdateMutationBuilder` should be used to create the `Mutation` class objects for use in the Cloud Spanner mutation API."]]],[]]