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-14 UTC."],[[["This webpage provides documentation for the `Mutation` class in the Cloud Spanner C++ API, specifically covering versions from 2.20.0 up to the latest release candidate 2.37.0-rc."],["The `Mutation` class serves as a wrapper for the Cloud Spanner mutation API, enabling users to describe data modifications using a data structure, which differs from using SQL statements."],["The documentation details various constructors and operators for the `Mutation` class, including move and copy constructors/assignment operators, and notes that empty mutations created with the default constructor are not usable with the Cloud Spanner API."],["It also includes functions `as_proto()`, which allows conversion of a mutation object into its underlying protocol buffer representation, for both rvalue reference and constant lvalue reference."],["The Mutation API is an alternative to Data Manipulation Language (DML) based APIs for data modification, as indicated by a link to more information about the API."]]],[]]