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-08-22 UTC."],[[["\u003cp\u003eThis webpage details the \u003ccode\u003eMutation\u003c/code\u003e class within the Google Cloud Spanner C++ client library, serving as a wrapper for different types of mutations used in the Cloud Spanner Mutation API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is \u003ccode\u003e2.37.0-rc\u003c/code\u003e, and the page provides access to documentation for a range of prior versions, from \u003ccode\u003e2.36.0\u003c/code\u003e down to \u003ccode\u003e2.11.0\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class supports creating empty mutations, although they are not directly usable with the API, and also contains methods to convert the mutation to its underlying proto representation using \u003ccode\u003eas_proto()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe page documents the constructors, \u003ccode\u003eMutation()\u003c/code\u003e and copy/move, as well as copy/move assignment operators, \u003ccode\u003eoperator=\u003c/code\u003e, of the class.\u003c/p\u003e\n"],["\u003cp\u003eThe content on this page is related to using Data Manipulation Language (DML) based APIs, the application describes data modification using a data structure instead of a SQL statement, through the use of mutation API.\u003c/p\u003e\n"]]],[],null,[]]