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, specifically detailing its use in the mutation API."],["The `Mutation` class allows for data modification descriptions using data structures, as opposed to SQL statements, and is created via builders like `InsertMutationBuilder` or `UpdateMutationBuilder`."],["The documentation lists various versions of the `Mutation` class, ranging from 2.11.0 up to the latest release candidate 2.37.0-rc, as well as defining methods to help with its usage."],["The page explains that empty `Mutation` objects are not usable with the Cloud Spanner mutation API and provides details on constructors and operators such as `operator=` for move and copy assignments."],["It also includes information on the `as_proto()` function, which facilitates the conversion of the `Mutation` object to the underlying protocol buffer type `google::spanner::v1::Mutation`."]]],[]]