public final class Mutation extends GeneratedMessageV3 implements MutationOrBuilder
A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a [Commit][google.spanner.v1.Spanner.Commit] call.Protobuf type
google.spanner.v1.Mutation| Modifier and Type | Class and Description |
|---|---|
static class |
Mutation.Builder
A modification to one or more Cloud Spanner rows.
|
static class |
Mutation.Delete
Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
|
static interface |
Mutation.DeleteOrBuilder |
static class |
Mutation.OperationCase |
static class |
Mutation.Write
Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
[replace][google.spanner.v1.Mutation.replace] operations.
|
static interface |
Mutation.WriteOrBuilder |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
DELETE_FIELD_NUMBER |
static int |
INSERT_FIELD_NUMBER |
static int |
INSERT_OR_UPDATE_FIELD_NUMBER |
static int |
REPLACE_FIELD_NUMBER |
static int |
UPDATE_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static Mutation |
getDefaultInstance() |
Mutation |
getDefaultInstanceForType() |
Mutation.Delete |
getDelete()
Delete rows from a table.
|
Mutation.DeleteOrBuilder |
getDeleteOrBuilder()
Delete rows from a table.
|
static Descriptors.Descriptor |
getDescriptor() |
Mutation.Write |
getInsert()
Insert new rows in a table.
|
Mutation.WriteOrBuilder |
getInsertOrBuilder()
Insert new rows in a table.
|
Mutation.Write |
getInsertOrUpdate()
Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then
its column values are overwritten with the ones provided.
|
Mutation.WriteOrBuilder |
getInsertOrUpdateOrBuilder()
Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then
its column values are overwritten with the ones provided.
|
Mutation.OperationCase |
getOperationCase() |
Parser<Mutation> |
getParserForType() |
Mutation.Write |
getReplace()
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.
|
Mutation.WriteOrBuilder |
getReplaceOrBuilder()
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.
|
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
Mutation.Write |
getUpdate()
Update existing rows in a table.
|
Mutation.WriteOrBuilder |
getUpdateOrBuilder()
Update existing rows in a table.
|
boolean |
hasDelete()
Delete rows from a table.
|
int |
hashCode() |
boolean |
hasInsert()
Insert new rows in a table.
|
boolean |
hasInsertOrUpdate()
Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then
its column values are overwritten with the ones provided.
|
boolean |
hasReplace()
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.
|
boolean |
hasUpdate()
Update existing rows in a table.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Mutation.Builder |
newBuilder() |
static Mutation.Builder |
newBuilder(Mutation prototype) |
Mutation.Builder |
newBuilderForType() |
protected Mutation.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Mutation |
parseDelimitedFrom(java.io.InputStream input) |
static Mutation |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(byte[] data) |
static Mutation |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(java.nio.ByteBuffer data) |
static Mutation |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(ByteString data) |
static Mutation |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(CodedInputStream input) |
static Mutation |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(java.io.InputStream input) |
static Mutation |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Mutation> |
parser() |
Mutation.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int INSERT_FIELD_NUMBER
public static final int UPDATE_FIELD_NUMBER
public static final int INSERT_OR_UPDATE_FIELD_NUMBER
public static final int REPLACE_FIELD_NUMBER
public static final int DELETE_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public Mutation.OperationCase getOperationCase()
getOperationCase in interface MutationOrBuilderpublic boolean hasInsert()
Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error `ALREADY_EXISTS`.
.google.spanner.v1.Mutation.Write insert = 1;hasInsert in interface MutationOrBuilderpublic Mutation.Write getInsert()
Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error `ALREADY_EXISTS`.
.google.spanner.v1.Mutation.Write insert = 1;getInsert in interface MutationOrBuilderpublic Mutation.WriteOrBuilder getInsertOrBuilder()
Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error `ALREADY_EXISTS`.
.google.spanner.v1.Mutation.Write insert = 1;getInsertOrBuilder in interface MutationOrBuilderpublic boolean hasUpdate()
Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error `NOT_FOUND`.
.google.spanner.v1.Mutation.Write update = 2;hasUpdate in interface MutationOrBuilderpublic Mutation.Write getUpdate()
Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error `NOT_FOUND`.
.google.spanner.v1.Mutation.Write update = 2;getUpdate in interface MutationOrBuilderpublic Mutation.WriteOrBuilder getUpdateOrBuilder()
Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error `NOT_FOUND`.
.google.spanner.v1.Mutation.Write update = 2;getUpdateOrBuilder in interface MutationOrBuilderpublic boolean hasInsertOrUpdate()
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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;hasInsertOrUpdate in interface MutationOrBuilderpublic Mutation.Write getInsertOrUpdate()
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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;getInsertOrUpdate in interface MutationOrBuilderpublic Mutation.WriteOrBuilder getInsertOrUpdateOrBuilder()
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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;getInsertOrUpdateOrBuilder in interface MutationOrBuilderpublic boolean hasReplace()
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`.
.google.spanner.v1.Mutation.Write replace = 4;hasReplace in interface MutationOrBuilderpublic Mutation.Write getReplace()
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`.
.google.spanner.v1.Mutation.Write replace = 4;getReplace in interface MutationOrBuilderpublic Mutation.WriteOrBuilder getReplaceOrBuilder()
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`.
.google.spanner.v1.Mutation.Write replace = 4;getReplaceOrBuilder in interface MutationOrBuilderpublic boolean hasDelete()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;hasDelete in interface MutationOrBuilderpublic Mutation.Delete getDelete()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;getDelete in interface MutationOrBuilderpublic Mutation.DeleteOrBuilder getDeleteOrBuilder()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;getDeleteOrBuilder in interface MutationOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static Mutation parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Mutation parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Mutation parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Mutation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Mutation parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Mutation parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Mutation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Mutation.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Mutation.Builder newBuilder()
public static Mutation.Builder newBuilder(Mutation prototype)
public Mutation.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected Mutation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static Mutation getDefaultInstance()
public Parser<Mutation> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public Mutation getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder