Skip to content

Commit e5671a7

Browse files
committed
Consolidate methods
1 parent 4d6bb05 commit e5671a7

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private DeleteDSL(SqlTable table, Function<DeleteModel, R> adapterFunction) {
3737
}
3838

3939
@Override
40-
protected DeleteWhereBuilder whereDsl() {
40+
public DeleteWhereBuilder where() {
4141
return whereBuilder;
4242
}
4343

src/main/java/org/mybatis/dynamic/sql/select/CountDSL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private CountDSL(BasicColumn countColumn, SqlTable table, Function<SelectModel,
4848
}
4949

5050
@Override
51-
protected CountWhereBuilder whereDsl() {
51+
public CountWhereBuilder where() {
5252
return whereBuilder;
5353
}
5454

src/main/java/org/mybatis/dynamic/sql/select/QueryExpressionDSL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class QueryExpressionDSL<R> extends AbstractQueryExpressionDSL<QueryExpre
6262
}
6363

6464
@Override
65-
protected QueryExpressionWhereBuilder whereDsl() {
65+
public QueryExpressionWhereBuilder where() {
6666
return whereBuilder;
6767
}
6868

src/main/java/org/mybatis/dynamic/sql/update/UpdateDSL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public <T> SetClauseFinisher<T> set(SqlColumn<T> column) {
5656
}
5757

5858
@Override
59-
protected UpdateWhereBuilder whereDsl() {
59+
public UpdateWhereBuilder where() {
6060
return whereBuilder;
6161
}
6262

src/main/java/org/mybatis/dynamic/sql/where/AbstractWhereSupportingDSL.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
*/
1414
public abstract class AbstractWhereSupportingDSL<W extends AbstractWhereDSL<?>> {
1515

16-
public W where() {
17-
return whereDsl();
18-
}
19-
2016
public <T> W where(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>...subCriteria) {
2117
return apply(w -> w.where(column, condition, subCriteria));
2218
}
@@ -26,10 +22,10 @@ public W applyWhere(WhereApplier whereApplier) {
2622
}
2723

2824
private W apply(Consumer<W> block) {
29-
W dsl = whereDsl();
25+
W dsl = where();
3026
block.accept(dsl);
3127
return dsl;
3228
}
3329

34-
protected abstract W whereDsl();
30+
public abstract W where();
3531
}

0 commit comments

Comments
 (0)