Enum Mutation.Op

    • Enum Constant Detail

      • INSERT

        public static final Mutation.Op INSERT
        Inserts a new row in a table. If the row already exists, the write or transaction fails with ErrorCode.ALREADY_EXISTS. When inserting a row, all NOT NULL columns in the table must be given a value.
      • UPDATE

        public static final Mutation.Op UPDATE
        Updates an existing row in a table. If the row does not already exist, the transaction fails with error ErrorCode.NOT_FOUND.
      • INSERT_OR_UPDATE

        public static final Mutation.Op INSERT_OR_UPDATE
        Like 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.
      • REPLACE

        public static final Mutation.Op REPLACE
        Like 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.
      • DELETE

        public static final Mutation.Op DELETE
        Deletes rows from a table. Succeeds whether or not the named rows were present.
    • Method Detail

      • values

        public static Mutation.Op[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Mutation.Op c : Mutation.Op.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Mutation.Op valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null