public static enum Mutation.Op extends Enum<Mutation.Op>
Enum Constant and Description |
---|
DELETE
Deletes rows from a table.
|
INSERT
Inserts a new row in a table.
|
INSERT_OR_UPDATE
Like
INSERT , except that if the row already exists, then its column values are
overwritten with the ones provided. |
REPLACE
Like
INSERT , except that if the row already exists, it is deleted, and the column
values provided are inserted instead. |
UPDATE
Updates an existing row in a table.
|
Modifier and Type | Method and Description |
---|---|
static Mutation.Op |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Mutation.Op[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Mutation.Op INSERT
ErrorCode.ALREADY_EXISTS
. When inserting a row, all NOT NULL columns in the table
must be given a value.public static final Mutation.Op UPDATE
ErrorCode.NOT_FOUND
.public static final Mutation.Op INSERT_OR_UPDATE
INSERT
, except that if the row already exists, then its column values are
overwritten with the ones provided. All NOT NUll columns in the table must be give a value
and this holds true even when the row already exists and will actually be updated. Values for
all NULL columns not explicitly written are preserved.public static final Mutation.Op REPLACE
INSERT
, except that if the row already exists, it is deleted, and the column
values provided are inserted instead. Unlike INSERT_OR_UPDATE
, this means any values
not explicitly written become NULL
.public static final Mutation.Op DELETE
public static Mutation.Op[] values()
for (Mutation.Op c : Mutation.Op.values()) System.out.println(c);
public static Mutation.Op valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 Google LLC. All rights reserved.