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 Cloud Spanner C++ library, offering a comprehensive reference across multiple versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class serves as a wrapper for Cloud Spanner mutations, providing an alternative to Data Manipulation Language (DML) for describing data modifications.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available in this reference is 2.37.0-rc, and it is also possible to view earlier versions of the Mutation class down to 2.11.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class supports several constructors and operators, including move and copy constructors, as well as move and copy assignment operators.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class allows conversion to the underlying protocol buffer format via the \u003ccode\u003eas_proto()\u003c/code\u003e method, available in both move and const versions.\u003c/p\u003e\n"]]],[],null,[]]