pub struct CommitRequest {
pub database_id: Option<String>,
pub mode: Option<String>,
pub mutations: Option<Vec<Mutation>>,
pub single_use_transaction: Option<TransactionOptions>,
pub transaction: Option<Vec<u8>>,
}
Expand description
The request for Datastore.Commit.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- commit projects (request)
Fields§
§database_id: Option<String>
The ID of the database against which to make the request. ‘(default)’ is not allowed; please use empty string ‘’ to refer the default database.
mode: Option<String>
The type of commit to perform. Defaults to TRANSACTIONAL
.
mutations: Option<Vec<Mutation>>
The mutations to perform. When mode is TRANSACTIONAL
, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit
request: - insert
followed by insert
- update
followed by insert
- upsert
followed by insert
- delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single entity.
single_use_transaction: Option<TransactionOptions>
Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.
transaction: Option<Vec<u8>>
The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.
Trait Implementations§
Source§impl Clone for CommitRequest
impl Clone for CommitRequest
Source§fn clone(&self) -> CommitRequest
fn clone(&self) -> CommitRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommitRequest
impl Debug for CommitRequest
Source§impl Default for CommitRequest
impl Default for CommitRequest
Source§fn default() -> CommitRequest
fn default() -> CommitRequest
Source§impl<'de> Deserialize<'de> for CommitRequest
impl<'de> Deserialize<'de> for CommitRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CommitRequest
impl Serialize for CommitRequest
impl RequestValue for CommitRequest
Auto Trait Implementations§
impl Freeze for CommitRequest
impl RefUnwindSafe for CommitRequest
impl Send for CommitRequest
impl Sync for CommitRequest
impl Unpin for CommitRequest
impl UnwindSafe for CommitRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more