Required. The transaction to use. Must be a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction.
Required. The list of statements to execute in this batch. Statements are executed serially, such that the effects of statementiare visible to statementi+1. Each statement must be a DML statement. Execution stops at the first failed statement; the remaining statements are not executed. Callers must provide at least one statement.
↳ seqno
int|string
Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution.
Optional. If set to true, this request marks the end of the transaction. The transaction should be committed or aborted after these statements execute, and attempts to execute any other requests against this transaction (including reads and queries) will be rejected. Setting this option may cause some error reporting to be deferred until commit time (e.g. validation of unique constraints). Given this, successful execution of statements should not be assumed until a subsequent Commit call completes successfully.
getSession
Required. The session in which the DML statements should be performed.
Returns
Type
Description
string
setSession
Required. The session in which the DML statements should be performed.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTransaction
Required. The transaction to use. Must be a read-write transaction.
To protect against replays, single-use transactions are not supported. The
caller must either supply an existing transaction ID or begin a new
transaction.
Required. The transaction to use. Must be a read-write transaction.
To protect against replays, single-use transactions are not supported. The
caller must either supply an existing transaction ID or begin a new
transaction.
Required. The list of statements to execute in this batch. Statements are
executed serially, such that the effects of statementiare visible to
statementi+1. Each statement must be a DML statement. Execution stops at
the first failed statement; the remaining statements are not executed.
Required. The list of statements to execute in this batch. Statements are
executed serially, such that the effects of statementiare visible to
statementi+1. Each statement must be a DML statement. Execution stops at
the first failed statement; the remaining statements are not executed.
Required. A per-transaction sequence number used to identify this request.
This field makes each request idempotent such that if the request is
received multiple times, at most one will succeed.
The sequence number must be monotonically increasing within the
transaction. If a request arrives for the first time with an out-of-order
sequence number, the transaction may be aborted. Replays of previously
handled requests will yield the same response as the first execution.
Returns
Type
Description
int|string
setSeqno
Required. A per-transaction sequence number used to identify this request.
This field makes each request idempotent such that if the request is
received multiple times, at most one will succeed.
The sequence number must be monotonically increasing within the
transaction. If a request arrives for the first time with an out-of-order
sequence number, the transaction may be aborted. Replays of previously
handled requests will yield the same response as the first execution.
Optional. If set to true, this request marks the end of the transaction.
The transaction should be committed or aborted after these statements
execute, and attempts to execute any other requests against this
transaction (including reads and queries) will be rejected.
Setting this option may cause some error reporting to be deferred until
commit time (e.g. validation of unique constraints). Given this, successful
execution of statements should not be assumed until a subsequent Commit
call completes successfully.
Returns
Type
Description
bool
setLastStatements
Optional. If set to true, this request marks the end of the transaction.
The transaction should be committed or aborted after these statements
execute, and attempts to execute any other requests against this
transaction (including reads and queries) will be rejected.
Setting this option may cause some error reporting to be deferred until
commit time (e.g. validation of unique constraints). Given this, successful
execution of statements should not be assumed until a subsequent Commit
call completes successfully.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Spanner V1 Client - Class ExecuteBatchDmlRequest (1.104.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.104.0 (latest)](/php/docs/reference/cloud-spanner/latest/V1.ExecuteBatchDmlRequest)\n- [1.103.0](/php/docs/reference/cloud-spanner/1.103.0/V1.ExecuteBatchDmlRequest)\n- [1.102.0](/php/docs/reference/cloud-spanner/1.102.0/V1.ExecuteBatchDmlRequest)\n- [1.101.0](/php/docs/reference/cloud-spanner/1.101.0/V1.ExecuteBatchDmlRequest)\n- [1.100.0](/php/docs/reference/cloud-spanner/1.100.0/V1.ExecuteBatchDmlRequest)\n- [1.98.0](/php/docs/reference/cloud-spanner/1.98.0/V1.ExecuteBatchDmlRequest)\n- [1.97.0](/php/docs/reference/cloud-spanner/1.97.0/V1.ExecuteBatchDmlRequest)\n- [1.96.0](/php/docs/reference/cloud-spanner/1.96.0/V1.ExecuteBatchDmlRequest)\n- [1.95.0](/php/docs/reference/cloud-spanner/1.95.0/V1.ExecuteBatchDmlRequest)\n- [1.94.0](/php/docs/reference/cloud-spanner/1.94.0/V1.ExecuteBatchDmlRequest)\n- [1.93.1](/php/docs/reference/cloud-spanner/1.93.1/V1.ExecuteBatchDmlRequest)\n- [1.92.1](/php/docs/reference/cloud-spanner/1.92.1/V1.ExecuteBatchDmlRequest)\n- [1.91.0](/php/docs/reference/cloud-spanner/1.91.0/V1.ExecuteBatchDmlRequest)\n- [1.90.0](/php/docs/reference/cloud-spanner/1.90.0/V1.ExecuteBatchDmlRequest)\n- [1.89.0](/php/docs/reference/cloud-spanner/1.89.0/V1.ExecuteBatchDmlRequest)\n- [1.88.0](/php/docs/reference/cloud-spanner/1.88.0/V1.ExecuteBatchDmlRequest)\n- [1.87.0](/php/docs/reference/cloud-spanner/1.87.0/V1.ExecuteBatchDmlRequest)\n- [1.86.0](/php/docs/reference/cloud-spanner/1.86.0/V1.ExecuteBatchDmlRequest)\n- [1.85.0](/php/docs/reference/cloud-spanner/1.85.0/V1.ExecuteBatchDmlRequest)\n- [1.84.0](/php/docs/reference/cloud-spanner/1.84.0/V1.ExecuteBatchDmlRequest)\n- [1.83.0](/php/docs/reference/cloud-spanner/1.83.0/V1.ExecuteBatchDmlRequest)\n- [1.82.0](/php/docs/reference/cloud-spanner/1.82.0/V1.ExecuteBatchDmlRequest)\n- [1.81.0](/php/docs/reference/cloud-spanner/1.81.0/V1.ExecuteBatchDmlRequest)\n- [1.80.0](/php/docs/reference/cloud-spanner/1.80.0/V1.ExecuteBatchDmlRequest)\n- [1.79.0](/php/docs/reference/cloud-spanner/1.79.0/V1.ExecuteBatchDmlRequest)\n- [1.78.0](/php/docs/reference/cloud-spanner/1.78.0/V1.ExecuteBatchDmlRequest)\n- [1.77.0](/php/docs/reference/cloud-spanner/1.77.0/V1.ExecuteBatchDmlRequest)\n- [1.76.1](/php/docs/reference/cloud-spanner/1.76.1/V1.ExecuteBatchDmlRequest)\n- [1.68.0](/php/docs/reference/cloud-spanner/1.68.0/V1.ExecuteBatchDmlRequest)\n- [1.67.0](/php/docs/reference/cloud-spanner/1.67.0/V1.ExecuteBatchDmlRequest)\n- [1.66.0](/php/docs/reference/cloud-spanner/1.66.0/V1.ExecuteBatchDmlRequest)\n- [1.65.0](/php/docs/reference/cloud-spanner/1.65.0/V1.ExecuteBatchDmlRequest)\n- [1.64.0](/php/docs/reference/cloud-spanner/1.64.0/V1.ExecuteBatchDmlRequest)\n- [1.63.2](/php/docs/reference/cloud-spanner/1.63.2/V1.ExecuteBatchDmlRequest)\n- [1.62.1](/php/docs/reference/cloud-spanner/1.62.1/V1.ExecuteBatchDmlRequest)\n- [1.61.0](/php/docs/reference/cloud-spanner/1.61.0/V1.ExecuteBatchDmlRequest)\n- [1.60.0](/php/docs/reference/cloud-spanner/1.60.0/V1.ExecuteBatchDmlRequest)\n- [1.59.0](/php/docs/reference/cloud-spanner/1.59.0/V1.ExecuteBatchDmlRequest)\n- [1.58.4](/php/docs/reference/cloud-spanner/1.58.4/V1.ExecuteBatchDmlRequest)\n- [1.57.0](/php/docs/reference/cloud-spanner/1.57.0/V1.ExecuteBatchDmlRequest)\n- [1.56.0](/php/docs/reference/cloud-spanner/1.56.0/V1.ExecuteBatchDmlRequest)\n- [1.55.0](/php/docs/reference/cloud-spanner/1.55.0/V1.ExecuteBatchDmlRequest)\n- [1.54.2](/php/docs/reference/cloud-spanner/1.54.2/V1.ExecuteBatchDmlRequest) \nReference documentation and code samples for the Cloud Spanner V1 Client class ExecuteBatchDmlRequest.\n\nThe request for ExecuteBatchDml.\n\nGenerated from protobuf message `google.spanner.v1.ExecuteBatchDmlRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Spanner \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSession\n\nRequired. The session in which the DML statements should be performed.\n\n### setSession\n\nRequired. The session in which the DML statements should be performed.\n\n### getTransaction\n\nRequired. The transaction to use. Must be a read-write transaction.\n\nTo protect against replays, single-use transactions are not supported. The\ncaller must either supply an existing transaction ID or begin a new\ntransaction.\n\n### hasTransaction\n\n### clearTransaction\n\n### setTransaction\n\nRequired. The transaction to use. Must be a read-write transaction.\n\nTo protect against replays, single-use transactions are not supported. The\ncaller must either supply an existing transaction ID or begin a new\ntransaction.\n\n### getStatements\n\nRequired. The list of statements to execute in this batch. Statements are\nexecuted serially, such that the effects of statement `i` are visible to\nstatement `i+1`. Each statement must be a DML statement. Execution stops at\nthe first failed statement; the remaining statements are not executed.\n\nCallers must provide at least one statement.\n\n### setStatements\n\nRequired. The list of statements to execute in this batch. Statements are\nexecuted serially, such that the effects of statement `i` are visible to\nstatement `i+1`. Each statement must be a DML statement. Execution stops at\nthe first failed statement; the remaining statements are not executed.\n\nCallers must provide at least one statement.\n\n### getSeqno\n\nRequired. A per-transaction sequence number used to identify this request.\n\nThis field makes each request idempotent such that if the request is\nreceived multiple times, at most one will succeed.\nThe sequence number must be monotonically increasing within the\ntransaction. If a request arrives for the first time with an out-of-order\nsequence number, the transaction may be aborted. Replays of previously\nhandled requests will yield the same response as the first execution.\n\n### setSeqno\n\nRequired. A per-transaction sequence number used to identify this request.\n\nThis field makes each request idempotent such that if the request is\nreceived multiple times, at most one will succeed.\nThe sequence number must be monotonically increasing within the\ntransaction. If a request arrives for the first time with an out-of-order\nsequence number, the transaction may be aborted. Replays of previously\nhandled requests will yield the same response as the first execution.\n\n### getRequestOptions\n\nCommon options for this request.\n\n### hasRequestOptions\n\n### clearRequestOptions\n\n### setRequestOptions\n\nCommon options for this request.\n\n### getLastStatements\n\nOptional. If set to true, this request marks the end of the transaction.\n\nThe transaction should be committed or aborted after these statements\nexecute, and attempts to execute any other requests against this\ntransaction (including reads and queries) will be rejected.\nSetting this option may cause some error reporting to be deferred until\ncommit time (e.g. validation of unique constraints). Given this, successful\nexecution of statements should not be assumed until a subsequent Commit\ncall completes successfully.\n\n### setLastStatements\n\nOptional. If set to true, this request marks the end of the transaction.\n\nThe transaction should be committed or aborted after these statements\nexecute, and attempts to execute any other requests against this\ntransaction (including reads and queries) will be rejected.\nSetting this option may cause some error reporting to be deferred until\ncommit time (e.g. validation of unique constraints). Given this, successful\nexecution of statements should not be assumed until a subsequent Commit\ncall completes successfully."]]