Skip to content

Commit 6ebf7cf

Browse files
committed
Consistency
1 parent 8bb069a commit 6ebf7cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/org/mybatis/dynamic/sql/delete/DeleteDSL.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public class DeleteDSL<R> extends AbstractWhereSupport<DeleteDSL<R>.DeleteWhereB
3232
private final String tableAlias;
3333
private final DeleteWhereBuilder whereBuilder = new DeleteWhereBuilder();
3434

35-
private DeleteDSL(SqlTable table, Function<DeleteModel, R> adapterFunction, String tableAlias) {
35+
private DeleteDSL(SqlTable table, String tableAlias, Function<DeleteModel, R> adapterFunction) {
3636
this.table = Objects.requireNonNull(table);
37-
this.adapterFunction = Objects.requireNonNull(adapterFunction);
3837
this.tableAlias = tableAlias;
38+
this.adapterFunction = Objects.requireNonNull(adapterFunction);
3939
}
4040

4141
@Override
@@ -59,16 +59,16 @@ public R build() {
5959
return adapterFunction.apply(deleteModel);
6060
}
6161

62-
public static <R> DeleteDSL<R> deleteFrom(Function<DeleteModel, R> adapterFunction, SqlTable table) {
63-
return new DeleteDSL<>(table, adapterFunction, null);
62+
public static <R> DeleteDSL<R> deleteFrom(Function<DeleteModel, R> adapterFunction, SqlTable table, String tableAlias) {
63+
return new DeleteDSL<>(table, tableAlias, adapterFunction);
6464
}
6565

6666
public static DeleteDSL<DeleteModel> deleteFrom(SqlTable table) {
67-
return deleteFrom(Function.identity(), table);
67+
return deleteFrom(Function.identity(), table, null);
6868
}
6969

7070
public static DeleteDSL<DeleteModel> deleteFrom(SqlTable table, String tableAlias) {
71-
return new DeleteDSL<>(table, Function.identity(), tableAlias);
71+
return deleteFrom(Function.identity(), table, tableAlias);
7272
}
7373

7474
public class DeleteWhereBuilder extends AbstractWhereDSL<DeleteWhereBuilder> implements Buildable<R> {

0 commit comments

Comments
 (0)