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++ client library, offering a wrapper for Cloud Spanner's mutation API.\u003c/p\u003e\n"],["\u003cp\u003eThe page lists various versions of the library, starting from version 2.11.0 up to the latest release candidate 2.37.0-rc, each linking to the corresponding \u003ccode\u003eMutation\u003c/code\u003e class documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class is designed to facilitate data modifications in Cloud Spanner using a data structure, as an alternative to Data Manipulation Language (DML).\u003c/p\u003e\n"],["\u003cp\u003eThe documentation details the constructors, operators, and functions of the \u003ccode\u003eMutation\u003c/code\u003e class, including methods to create empty mutations, move or copy, assign mutations, and convert a mutation to its underlying protocol buffer representation.\u003c/p\u003e\n"],["\u003cp\u003eThe Mutation API allows the application to describe data modification using a data structure instead of a SQL statement, and the class' builders such as InsertMutationBuilder or UpdateMutationBuilder should be used to create objects.\u003c/p\u003e\n"]]],[],null,[]]