Skip to content

Commit 59c8333

Browse files
committed
Method Name Consistency
1 parent 966c4d7 commit 59c8333

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3Utils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
public class MyBatis3Utils {
5454
private MyBatis3Utils() {}
5555

56-
public static long count(ToLongFunction<SelectStatementProvider> mapper,
56+
public static long countFrom(ToLongFunction<SelectStatementProvider> mapper,
5757
SqlTable table, CountDSLCompleter completer) {
58-
return count(mapper, SqlBuilder.countFrom(table), completer);
58+
return countFrom(mapper, SqlBuilder.countFrom(table), completer);
5959
}
6060

61-
public static long count(ToLongFunction<SelectStatementProvider> mapper,
61+
public static long countFrom(ToLongFunction<SelectStatementProvider> mapper,
6262
CountDSL<SelectModel> start, CountDSLCompleter completer) {
6363
return mapper.applyAsLong(completer.apply(start).build().render(RenderingStrategies.MYBATIS3));
6464
}

src/test/java/examples/simple/PersonMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public interface PersonMapper {
9191
int update(UpdateStatementProvider updateStatement);
9292

9393
default long count(CountDSLCompleter completer) {
94-
return MyBatis3Utils.count(this::count, person, completer);
94+
return MyBatis3Utils.countFrom(this::count, person, completer);
9595
}
9696

9797
default int delete(DeleteDSLCompleter completer) {

src/test/java/examples/simple/PersonWithAddressMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ default Optional<PersonWithAddress> selectByPrimaryKey(Integer id_) {
100100
default long count(CountDSLCompleter completer) {
101101
CountDSL<SelectModel> start = countFrom(person)
102102
.join(address, on(person.addressId, equalTo(address.id)));
103-
return MyBatis3Utils.count(this::count, start, completer);
103+
return MyBatis3Utils.countFrom(this::count, start, completer);
104104
}
105105
}

0 commit comments

Comments
 (0)