#[non_exhaustive]pub struct ExecuteBatchDmlRequest {
pub session: String,
pub transaction: Option<TransactionSelector>,
pub statements: Vec<Statement>,
pub seqno: i64,
pub request_options: Option<RequestOptions>,
pub last_statements: bool,
/* private fields */
}Expand description
The request for ExecuteBatchDml.
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.session: StringRequired. The session in which the DML statements should be performed.
transaction: Option<TransactionSelector>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.
statements: Vec<Statement>Required. The list of statements to execute in this batch. Statements are
executed serially, such that the effects of statement i are visible to
statement i+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: i64Required. 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 succeeds.
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 might be aborted. Replays of previously handled requests yield the same response as the first execution.
request_options: Option<RequestOptions>Common options for this request.
last_statements: boolOptional. If set to true, this request marks the end of the transaction.
After these statements execute, you must commit or abort the transaction.
Attempts to execute any other requests against this transaction
(including reads and queries) are rejected.
Setting this option might cause some error reporting to be deferred until
commit time (for example, validation of unique constraints). Given this,
successful execution of statements shouldn’t be assumed until a subsequent
Commit call completes successfully.
Implementations§
Source§impl ExecuteBatchDmlRequest
impl ExecuteBatchDmlRequest
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sets the value of session.
Sourcepub fn set_transaction<T>(self, v: T) -> Selfwhere
T: Into<TransactionSelector>,
pub fn set_transaction<T>(self, v: T) -> Selfwhere
T: Into<TransactionSelector>,
Sets the value of transaction.
Sourcepub fn set_or_clear_transaction<T>(self, v: Option<T>) -> Selfwhere
T: Into<TransactionSelector>,
pub fn set_or_clear_transaction<T>(self, v: Option<T>) -> Selfwhere
T: Into<TransactionSelector>,
Sets or clears the value of transaction.
Sourcepub fn set_statements<T, V>(self, v: T) -> Self
pub fn set_statements<T, V>(self, v: T) -> Self
Sets the value of statements.
Sourcepub fn set_request_options<T>(self, v: T) -> Selfwhere
T: Into<RequestOptions>,
pub fn set_request_options<T>(self, v: T) -> Selfwhere
T: Into<RequestOptions>,
Sets the value of request_options.
Sourcepub fn set_or_clear_request_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestOptions>,
pub fn set_or_clear_request_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestOptions>,
Sets or clears the value of request_options.
Sourcepub fn set_last_statements<T: Into<bool>>(self, v: T) -> Self
pub fn set_last_statements<T: Into<bool>>(self, v: T) -> Self
Sets the value of last_statements.
Trait Implementations§
Source§impl Clone for ExecuteBatchDmlRequest
impl Clone for ExecuteBatchDmlRequest
Source§fn clone(&self) -> ExecuteBatchDmlRequest
fn clone(&self) -> ExecuteBatchDmlRequest
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 ExecuteBatchDmlRequest
impl Debug for ExecuteBatchDmlRequest
Source§impl Default for ExecuteBatchDmlRequest
impl Default for ExecuteBatchDmlRequest
Source§fn default() -> ExecuteBatchDmlRequest
fn default() -> ExecuteBatchDmlRequest
Source§impl Message for ExecuteBatchDmlRequest
impl Message for ExecuteBatchDmlRequest
Source§impl PartialEq for ExecuteBatchDmlRequest
impl PartialEq for ExecuteBatchDmlRequest
Source§fn eq(&self, other: &ExecuteBatchDmlRequest) -> bool
fn eq(&self, other: &ExecuteBatchDmlRequest) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExecuteBatchDmlRequest
Auto Trait Implementations§
impl !Freeze for ExecuteBatchDmlRequest
impl RefUnwindSafe for ExecuteBatchDmlRequest
impl Send for ExecuteBatchDmlRequest
impl Sync for ExecuteBatchDmlRequest
impl Unpin for ExecuteBatchDmlRequest
impl UnsafeUnpin for ExecuteBatchDmlRequest
impl UnwindSafe for ExecuteBatchDmlRequest
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