#[non_exhaustive]pub struct ExecuteBatchDmlResponse {
pub result_sets: Vec<ResultSet>,
pub status: Option<Status>,
pub precommit_token: Option<MultiplexedSessionPrecommitToken>,
/* private fields */
}Expand description
The response for ExecuteBatchDml. Contains a list of ResultSet messages, one for each DML statement that has successfully executed, in the same order as the statements in the request. If a statement fails, the status in the response body identifies the cause of the failure.
To check for DML statements that failed, use the following approach:
- Check the status in the response message. The
[google.rpc.Code][google.rpc.Code] enum
value
OKindicates that all statements were executed successfully. - If the status was not
OK, check the number of result sets in the response. If the response containsNResultSet messages, then statementN+1in the request failed.
Example 1:
- Request: 5 DML statements, all executed successfully.
- Response: 5 ResultSet messages, with the
status
OK.
Example 2:
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.result_sets: Vec<ResultSet>One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each ResultSet contain the number of rows modified by the statement.
Only the first ResultSet in the response contains valid ResultSetMetadata.
status: Option<Status>If all DML statements are executed successfully, the status is OK.
Otherwise, the error status of the first failed statement.
precommit_token: Option<MultiplexedSessionPrecommitToken>Optional. A precommit token is included if the read-write transaction is on a multiplexed session. Pass the precommit token with the highest sequence number from this transaction attempt should be passed to the Commit request for this transaction.
Implementations§
Source§impl ExecuteBatchDmlResponse
impl ExecuteBatchDmlResponse
Sourcepub fn set_result_sets<T, V>(self, v: T) -> Self
pub fn set_result_sets<T, V>(self, v: T) -> Self
Sets the value of result_sets.
Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sets the value of status.
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
Sourcepub fn set_precommit_token<T>(self, v: T) -> Selfwhere
T: Into<MultiplexedSessionPrecommitToken>,
pub fn set_precommit_token<T>(self, v: T) -> Selfwhere
T: Into<MultiplexedSessionPrecommitToken>,
Sets the value of precommit_token.
Sourcepub fn set_or_clear_precommit_token<T>(self, v: Option<T>) -> Selfwhere
T: Into<MultiplexedSessionPrecommitToken>,
pub fn set_or_clear_precommit_token<T>(self, v: Option<T>) -> Selfwhere
T: Into<MultiplexedSessionPrecommitToken>,
Sets or clears the value of precommit_token.
Trait Implementations§
Source§impl Clone for ExecuteBatchDmlResponse
impl Clone for ExecuteBatchDmlResponse
Source§fn clone(&self) -> ExecuteBatchDmlResponse
fn clone(&self) -> ExecuteBatchDmlResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecuteBatchDmlResponse
impl Debug for ExecuteBatchDmlResponse
Source§impl Default for ExecuteBatchDmlResponse
impl Default for ExecuteBatchDmlResponse
Source§fn default() -> ExecuteBatchDmlResponse
fn default() -> ExecuteBatchDmlResponse
Source§impl Message for ExecuteBatchDmlResponse
impl Message for ExecuteBatchDmlResponse
Source§impl PartialEq for ExecuteBatchDmlResponse
impl PartialEq for ExecuteBatchDmlResponse
Source§fn eq(&self, other: &ExecuteBatchDmlResponse) -> bool
fn eq(&self, other: &ExecuteBatchDmlResponse) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExecuteBatchDmlResponse
Auto Trait Implementations§
impl !Freeze for ExecuteBatchDmlResponse
impl RefUnwindSafe for ExecuteBatchDmlResponse
impl Send for ExecuteBatchDmlResponse
impl Sync for ExecuteBatchDmlResponse
impl Unpin for ExecuteBatchDmlResponse
impl UnsafeUnpin for ExecuteBatchDmlResponse
impl UnwindSafe for ExecuteBatchDmlResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request