In Spanner batched commands are executed sequentially in the order they are received.
If one command fails then the following commands won't be executed.
This exception contains the error code and error message corresponding to the command that failed.
It also contains the number of rows modified by each of the commands that executed successfully.
Properties
SuccessfulCommandResults
public IEnumerable<long> SuccessfulCommandResults { get; }
Returns the affected rows for each of the batch commands that executed succesfully.
[[["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-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSpannerBatchNonQueryException\u003c/code\u003e class represents errors that occur during batch non-query operations in the Spanner database.\u003c/p\u003e\n"],["\u003cp\u003eThis exception inherits from \u003ccode\u003eSpannerException\u003c/code\u003e and implements the \u003ccode\u003eISerializable\u003c/code\u003e interface, providing functionalities for error handling and serialization.\u003c/p\u003e\n"],["\u003cp\u003eIn batch commands, when one command fails, the following commands are not executed, and this exception captures the specific error code and message of the failed command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSuccessfulCommandResults\u003c/code\u003e property is available to see how many rows were modified by the batch commands that successfully completed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransientFaultDetector.IsTransientSpannerFault(Exception)\u003c/code\u003e extension method can be used to detect if the error is transient.\u003c/p\u003e\n"]]],[],null,[]]