Class Delete


  • public class Delete
    extends BuiltStatement
    A built DELETE statement.
    • Method Detail

      • where

        public Delete.Where where​(Clause clause)
        Adds a WHERE clause to this statement.

        This is a shorter/more readable version for where().and(clause).

        Parameters:
        clause - the clause to add.
        Returns:
        the where clause of this query to which more clause can be added.
      • where

        public Delete.Where where()
        Returns a Where statement for this query without adding clause.
        Returns:
        the where clause of this query to which more clause can be added.
      • onlyIf

        public Delete.Conditions onlyIf​(Clause condition)
        Adds a conditions clause (IF) to this statement.

        This is a shorter/more readable version for onlyIf().and(condition).

        This will configure the statement as non-idempotent, see Statement.isIdempotent() for more information.

        Parameters:
        condition - the condition to add.
        Returns:
        the conditions of this query to which more conditions can be added.
      • onlyIf

        public Delete.Conditions onlyIf()
        Adds a conditions clause (IF) to this statement.

        This will configure the statement as non-idempotent, see Statement.isIdempotent() for more information.

        Returns:
        the conditions of this query to which more conditions can be added.
      • using

        public Delete.Options using​(Using using)
        Adds a new options for this DELETE statement.
        Parameters:
        using - the option to add.
        Returns:
        the options of this DELETE statement.
      • ifExists

        public Delete ifExists()
        Sets the 'IF EXISTS' option for this DELETE statement.

        A delete with that option will report whether the statement actually resulted in data being deleted. The existence check and deletion are done transactionally in the sense that if multiple clients attempt to delete a given row with this option, then at most one may succeed.

        Please keep in mind that using this option has a non negligible performance impact and should be avoided when possible. This will configure the statement as non-idempotent, see Statement.isIdempotent() for more information.

        Returns:
        this DELETE statement.