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, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
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, unknownFields
memoizedSize
memoizedHashCode
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 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) |
protected Object |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) |
static Mutation |
parseDelimitedFrom(InputStream input) |
static Mutation |
parseDelimitedFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(byte[] data) |
static Mutation |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Mutation |
parseFrom(ByteBuffer data) |
static Mutation |
parseFrom(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(InputStream input) |
static Mutation |
parseFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Mutation> |
parser() |
Mutation.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public Mutation.OperationCase getOperationCase()
getOperationCase
in interface MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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. 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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
hasInsertOrUpdate
in interface MutationOrBuilder
public 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. 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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
getInsertOrUpdate
in interface MutationOrBuilder
public 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. 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.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
getInsertOrUpdateOrBuilder
in interface MutationOrBuilder
public 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`. 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.
.google.spanner.v1.Mutation.Write replace = 4;
hasReplace
in interface MutationOrBuilder
public 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`. 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.
.google.spanner.v1.Mutation.Write replace = 4;
getReplace
in interface MutationOrBuilder
public 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`. 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.
.google.spanner.v1.Mutation.Write replace = 4;
getReplaceOrBuilder
in interface MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public 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 MutationOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Mutation parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Mutation parseFrom(InputStream input) throws IOException
IOException
public static Mutation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Mutation parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Mutation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Mutation parseFrom(CodedInputStream input) throws IOException
IOException
public static Mutation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public Mutation.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Mutation.Builder newBuilder()
public static Mutation.Builder newBuilder(Mutation prototype)
public Mutation.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Mutation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Mutation getDefaultInstance()
public Parser<Mutation> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Mutation getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.