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 document outlines the various versions of the Cloud Spanner `Mutation` class, with version 2.37.0-rc being the latest release candidate."],["The `Mutation` class is a wrapper for all mutation types, used to describe data modifications in Cloud Spanner."],["Users can build `Mutation` objects using builders like `InsertMutationBuilder` or `UpdateMutationBuilder`."],["The `Mutation` class provides constructors for creating empty or copied mutations, but empty mutations cannot be used in the Cloud Spanner mutation API."],["The class also allows conversion to the underlying proto using the `as_proto()` function, available in both rvalue and const lvalue reference versions."]]],[]]