[][src]Enum gcp_client::google::spanner::v1::mutation::Operation

pub enum Operation {
    Insert(Write),
    Update(Write),
    InsertOrUpdate(Write),
    Replace(Write),
    Delete(Delete),
}

Required. The operation to perform.

Variants

Insert(Write)

Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error ALREADY_EXISTS.

Update(Write)

Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error NOT_FOUND.

InsertOrUpdate(Write)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved.

When using [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as when using [insert][google.spanner.v1.Mutation.insert], all NOT NULL columns in the table must be given a value. This holds true even when the row already exists and will therefore actually be updated.

Replace(Write)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not explicitly written become NULL.

In an interleaved table, if you create the child table with the ON DELETE CASCADE annotation, then replacing a parent row also deletes the child rows. Otherwise, you must delete the child rows before you replace the parent row.

Delete(Delete)

Delete rows from a table. Succeeds whether or not the named rows were present.

Implementations

impl Operation[src]

pub fn encode<B>(&self, buf: &mut B) where
    B: BufMut
[src]

pub fn merge<B>(
    field: &mut Option<Operation>,
    tag: u32,
    wire_type: WireType,
    buf: &mut B,
    ctx: DecodeContext
) -> Result<(), DecodeError> where
    B: Buf
[src]

pub fn encoded_len(&self) -> usize[src]

Trait Implementations

impl Clone for Operation[src]

impl Debug for Operation[src]

impl PartialEq<Operation> for Operation[src]

impl StructuralPartialEq for Operation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]