[#4047] Add DSL.deleteFrom() alias for DSL.delete()
This commit is contained in:
parent
ee72f49ec6
commit
528c13a6ae
@ -4536,7 +4536,7 @@ public interface DSLContext extends Scope {
|
||||
* Example: <code><pre>
|
||||
* DSLContext create = DSL.using(configuration);
|
||||
*
|
||||
* create.delete(table)
|
||||
* create.deleteFrom(table)
|
||||
* .where(field1.greaterThan(100))
|
||||
* .execute();
|
||||
* </pre></code>
|
||||
@ -4544,6 +4544,14 @@ public interface DSLContext extends Scope {
|
||||
* Some but not all databases support aliased tables in delete statements.
|
||||
*/
|
||||
@Support
|
||||
<R extends Record> DeleteWhereStep<R> deleteFrom(Table<R> table);
|
||||
|
||||
/**
|
||||
* Create a new DSL delete statement.
|
||||
* <p>
|
||||
* This is an alias for {@link #deleteFrom(Table)}
|
||||
*/
|
||||
@Support
|
||||
<R extends Record> DeleteWhereStep<R> delete(Table<R> table);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -4209,17 +4209,27 @@ public class DSL {
|
||||
*
|
||||
* // [...]
|
||||
*
|
||||
* delete(table)
|
||||
* deleteFrom(table)
|
||||
* .where(field1.greaterThan(100))
|
||||
* </pre></code>
|
||||
* <p>
|
||||
* Some but not all databases support aliased tables in delete statements.
|
||||
*
|
||||
* @see DSLContext#delete(Table)
|
||||
* @see DSLContext#deleteFrom(Table)
|
||||
*/
|
||||
@Support
|
||||
public static <R extends Record> DeleteWhereStep<R> deleteFrom(Table<R> table) {
|
||||
return using(new DefaultConfiguration()).deleteFrom(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL delete statement.
|
||||
* <p>
|
||||
* This is an alias for {@link #deleteFrom(Table)}
|
||||
*/
|
||||
@Support
|
||||
public static <R extends Record> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
return using(new DefaultConfiguration()).delete(table);
|
||||
return using(new DefaultConfiguration()).deleteFrom(table);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -1496,6 +1496,11 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
|
||||
@Override
|
||||
public <R extends Record> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
return deleteFrom(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends Record> DeleteWhereStep<R> deleteFrom(Table<R> table) {
|
||||
return new DeleteImpl<R>(configuration(), table);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user