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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[[["This document outlines the class `Mutation`, a wrapper for Cloud Spanner mutations, used in the modification of data using a data structure instead of SQL statements."],["The latest release candidate version is 2.37.0-rc, with a list of stable versions ranging from 2.36.0 down to 2.11.0, all linked to their respective class documentation."],["The `Mutation` class features constructors, copy/move operators, and methods to convert to the underlying `google::spanner::v1::Mutation` protocol buffer."],["Empty mutations created with the `Mutation()` constructor are not usable with the Cloud Spanner mutation API."],["To use the mutation class, use builders such as `InsertMutationBuilder` or `UpdateMutationBuilder`."]]],[]]