- Type Parameters:
- R- The record type of the table being deleted from
- All Superinterfaces:
- Attachable,- AttachableQueryPart,- ConditionProvider,- Delete<R>,- DMLQuery<R>,- Flow.Publisher<Integer>,- Publisher<Integer>,- org.reactivestreams.Publisher<Integer>,- Query,- QueryPart,- RowCountQuery,- Serializable,- Statement
A 
DELETE statement (model API).
 
 This type is the model API representation of a Delete statement,
 which can be mutated after creation. The advantage of this API compared to
 the DSL API is a more simple approach to writing dynamic SQL.
 
 Instances can be created using DSLContext.deleteQuery(Table).
- Author:
- Lukas Eder
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddConditions(Collection<? extends Condition> conditions) Adds new conditions to the query, connecting them to existing conditions withOperator.AND.voidaddConditions(Condition condition) Adds a new condition to the query, connecting them to existing conditions withOperator.AND.voidaddConditions(Condition... conditions) Adds new conditions to the query, connecting them to existing conditions withOperator.AND.voidaddConditions(Operator operator, Collection<? extends Condition> conditions) Adds new conditions to the query, connecting them to existing conditions with the provided operator.voidaddConditions(Operator operator, Condition condition) Adds a new condition to the query, connecting them to existing conditions with the provided operator.voidaddConditions(Operator operator, Condition... conditions) Adds new conditions to the query, connecting them to existing conditions with the provided operator.voidLimit the results of this select.voidLimit the results of this select.voidaddOrderBy(Collection<? extends OrderField<?>> fields) Adds ordering fields.voidaddOrderBy(OrderField<?>... fields) Adds ordering fields.voidaddUsing(Collection<? extends TableLike<?>> tables) Add tables to theUSINGclause.voidAdd tables to theUSINGclause.voidAdd tables to theUSINGclause.The record holding returned values as specified by any of thesetReturning()methods.The records holding returned values as specified by any of thesetReturning()methods.voidConfigure theDELETEstatement to return all fields inR.voidsetReturning(Collection<? extends SelectFieldOrAsterisk> fields) Configure theDELETEstatement to return a list of fields inR.voidsetReturning(SelectFieldOrAsterisk... fields) Configure theDELETEstatement to return a list of fields inR.Methods inherited from interface org.jooq.Attachableattach, configuration, detachMethods inherited from interface org.jooq.AttachableQueryPartgetBindValues, getParam, getParams, getSQL, getSQLMethods inherited from interface org.reactivestreams.PublishersubscribeMethods inherited from interface org.jooq.Querybind, bind, cancel, execute, executeAsync, executeAsync, isExecutable, keepStatement, poolable, queryTimeout
- 
Method Details- 
addUsing@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,MARIADB,MYSQL,POSTGRES,REDSHIFT,SNOWFLAKE,SQLSERVER,SYBASE,TERADATA}) void addUsing(TableLike<?> table) Add tables to theUSINGclause.
- 
addUsing@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,MARIADB,MYSQL,POSTGRES,REDSHIFT,SNOWFLAKE,SQLSERVER,SYBASE,TERADATA}) void addUsing(TableLike<?>... tables) Add tables to theUSINGclause.
- 
addUsing@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,MARIADB,MYSQL,POSTGRES,REDSHIFT,SNOWFLAKE,SQLSERVER,SYBASE,TERADATA}) void addUsing(Collection<? extends TableLike<?>> tables) Add tables to theUSINGclause.
- 
addConditionsDescription copied from interface:ConditionProviderAdds a new condition to the query, connecting them to existing conditions withOperator.AND.- Specified by:
- addConditionsin interface- ConditionProvider
- Parameters:
- condition- The condition
 
- 
addConditionsDescription copied from interface:ConditionProviderAdds new conditions to the query, connecting them to existing conditions withOperator.AND.- Specified by:
- addConditionsin interface- ConditionProvider
- Parameters:
- conditions- The condition
 
- 
addConditionsDescription copied from interface:ConditionProviderAdds new conditions to the query, connecting them to existing conditions withOperator.AND.- Specified by:
- addConditionsin interface- ConditionProvider
- Parameters:
- conditions- The condition
 
- 
addConditionsDescription copied from interface:ConditionProviderAdds a new condition to the query, connecting them to existing conditions with the provided operator.- Specified by:
- addConditionsin interface- ConditionProvider
- condition- The condition
 
- 
addConditionsDescription copied from interface:ConditionProviderAdds new conditions to the query, connecting them to existing conditions with the provided operator.- Specified by:
- addConditionsin interface- ConditionProvider
- conditions- The condition
 
- 
addConditionsDescription copied from interface:ConditionProviderAdds new conditions to the query, connecting them to existing conditions with the provided operator.- Specified by:
- addConditionsin interface- ConditionProvider
- conditions- The condition
 
- 
addOrderByAdds ordering fields.- Parameters:
- fields- The ordering fields
 
- 
addOrderByAdds ordering fields.- Parameters:
- fields- The ordering fields
 
- 
addLimitLimit the results of this select.- Parameters:
- numberOfRows- The number of rows to return
 
- 
addLimitLimit the results of this select.- Parameters:
- numberOfRows- The number of rows to return
 
- 
setReturning@Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2_2_0_202,MARIADB_10_1,ORACLE,POSTGRES,SQLSERVER,YUGABYTEDB}) void setReturning()Configure theDELETEstatement to return all fields inR.- See Also:
 
- 
setReturning@Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2_2_0_202,MARIADB_10_1,ORACLE,POSTGRES,SQLSERVER,YUGABYTEDB}) void setReturning(SelectFieldOrAsterisk... fields) Configure theDELETEstatement to return a list of fields inR.- Parameters:
- fields- Fields to be returned
- See Also:
 
- 
setReturning@Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2_2_0_202,MARIADB_10_1,ORACLE,POSTGRES,SQLSERVER,YUGABYTEDB}) void setReturning(Collection<? extends SelectFieldOrAsterisk> fields) Configure theDELETEstatement to return a list of fields inR.- Parameters:
- fields- Fields to be returned
- See Also:
 
- 
getReturnedRecord@Nullable @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2_2_0_202,MARIADB_10_1,ORACLE,POSTGRES,SQLSERVER,YUGABYTEDB}) R getReturnedRecord()The record holding returned values as specified by any of thesetReturning()methods.If the DELETEstatement returns several records, this is the same as callinggetReturnedRecords().get(0)This implemented differently for every dialect: - Firebird and Postgres have native support for
 DELETE … RETURNINGclauses
 - Returns:
- The returned value as specified by any of the
         setReturning()methods. This may returnnullin case jOOQ could not retrieve any generated keys from the JDBC driver.
- See Also:
 
- Firebird and Postgres have native support for
 
- 
getReturnedRecords@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2_2_0_202,MARIADB_10_1,ORACLE,POSTGRES,SQLSERVER,YUGABYTEDB}) @NotNull Result<R> getReturnedRecords()The records holding returned values as specified by any of thesetReturning()methods.If the DELETEstatement returns several records, this is the same as callinggetReturnedRecords().get(0)This implemented differently for every dialect: - Firebird and Postgres have native support for
 DELETE … RETURNINGclauses
 - Returns:
- The returned values as specified by any of the
         setReturning()methods. Note:- Not all databases / JDBC drivers support returning several values on multi-row inserts!
- This may return an empty
         Resultin case jOOQ could not retrieve any generated keys from the JDBC driver.
 
 
- Firebird and Postgres have native support for
 
 
-