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 webpage provides documentation for the `Mutation` class within the Google Cloud Spanner C++ library, which serves as a wrapper for all types of Cloud Spanner mutations."],["The `Mutation` class offers an alternative data modification method to DML, allowing users to describe data modifications using data structures, via builders such as `InsertMutationBuilder` or `UpdateMutationBuilder`."],["The documentation includes various versions of the `Mutation` class, ranging from the latest release candidate `2.37.0-rc` down to version `2.11.0`."],["The `Mutation` class documentation includes details about its constructors, operators, and functions, including `as_proto()`, used for converting the mutation to its underlying proto."],["The creation of a `Mutation` object is possible, by using the `Mutation()` constructor, creating an empty mutation that cannot be used with the Cloud Spanner API, which is further supported by copy and move constructors, and copy and move assignment operators."]]],[]]