public final class Mutation extends com.google.protobuf.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 |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.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 |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Mutation |
getDefaultInstance() |
Mutation |
getDefaultInstanceForType() |
Mutation.Delete |
getDelete()
Delete rows from a table.
|
Mutation.DeleteOrBuilder |
getDeleteOrBuilder()
Delete rows from a table.
|
static com.google.protobuf.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() |
com.google.protobuf.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() |
com.google.protobuf.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 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Mutation.Builder |
newBuilder() |
static Mutation.Builder |
newBuilder(Mutation prototype) |
Mutation.Builder |
newBuilderForType() |
protected Mutation.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Mutation |
parseDelimitedFrom(InputStream input) |
static Mutation |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(byte[] data) |
static Mutation |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(ByteBuffer data) |
static Mutation |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(com.google.protobuf.ByteString data) |
static Mutation |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Mutation |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(InputStream input) |
static Mutation |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Mutation> |
parser() |
Mutation.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.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, waitpublic 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 com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.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 com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Mutation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Mutation parseFrom(InputStream input) throws IOException
IOExceptionpublic static Mutation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Mutation parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Mutation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Mutation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Mutation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Mutation.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Mutation.Builder newBuilder()
public static Mutation.Builder newBuilder(Mutation prototype)
public Mutation.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Mutation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Mutation getDefaultInstance()
public static com.google.protobuf.Parser<Mutation> parser()
public com.google.protobuf.Parser<Mutation> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Mutation getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2019 Google LLC. All rights reserved.