Package com.google.spanner.v1
Interface MutationOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Mutation,Mutation.Builder
public interface MutationOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionDelete rows from a table.Delete rows from a table.Insert new rows in a table.Insert new rows in a table.Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided.Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided.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.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.Update existing rows in a table.Update existing rows in a table.booleanDelete rows from a table.booleanInsert new rows in a table.booleanLike [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided.booleanLike [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead.booleanUpdate existing rows in a table.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasInsert
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;- Returns:
- Whether the insert field is set.
-
getInsert
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;- Returns:
- The insert.
-
getInsertOrBuilder
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; -
hasUpdate
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;- Returns:
- Whether the update field is set.
-
getUpdate
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;- Returns:
- The update.
-
getUpdateOrBuilder
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; -
hasInsertOrUpdate
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;- Returns:
- Whether the insertOrUpdate field is set.
-
getInsertOrUpdate
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;- Returns:
- The insertOrUpdate.
-
getInsertOrUpdateOrBuilder
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; -
hasReplace
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;- Returns:
- Whether the replace field is set.
-
getReplace
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;- Returns:
- The replace.
-
getReplaceOrBuilder
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; -
hasDelete
boolean hasDelete()Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;- Returns:
- Whether the delete field is set.
-
getDelete
Mutation.Delete getDelete()Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;- Returns:
- The delete.
-
getDeleteOrBuilder
Mutation.DeleteOrBuilder getDeleteOrBuilder()Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5; -
getOperationCase
Mutation.OperationCase getOperationCase()
-