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 provides documentation for the \u003ccode\u003eMutation\u003c/code\u003e class within the Google Cloud Spanner C++ library, which serves as a wrapper for various types of data modifications in Cloud Spanner.\u003c/p\u003e\n"],["\u003cp\u003eThe latest release candidate for the C++ library is version 2.37.0-rc, and the page lists available documentation for multiple previous versions, down to 2.11.0, allowing users to select the documentation of the specific version they require.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class can be used to modify data using the mutation API instead of using Data Manipulation Language (DML) based APIs.\u003c/p\u003e\n"],["\u003cp\u003eUsers can construct \u003ccode\u003eMutation\u003c/code\u003e objects using builders like \u003ccode\u003eInsertMutationBuilder\u003c/code\u003e or \u003ccode\u003eUpdateMutationBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class includes constructors for creating an empty mutation, moving, and copying, as well as operators for assignment, and functions for converting to the underlying proto.\u003c/p\u003e\n"]]],[],null,[]]