mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
PagerUtils support count(distinct)
This commit is contained in:
@@ -29,6 +29,13 @@ public class PagerUtilsTest_Count_MySql_0 extends TestCase {
|
||||
Assert.assertEquals("SELECT COUNT(*)\n" + //
|
||||
"FROM t", result);
|
||||
}
|
||||
|
||||
public void test_mysql_3() throws Exception {
|
||||
String sql = "select distinct id from t order by id";
|
||||
String result = PagerUtils.count(sql, JdbcConstants.MYSQL);
|
||||
Assert.assertEquals("SELECT COUNT(DISTINCT id)\n" + //
|
||||
"FROM t", result);
|
||||
}
|
||||
|
||||
public void test_mysql_group_0() throws Exception {
|
||||
String sql = "select type, count(*) from t group by type";
|
||||
|
||||
Reference in New Issue
Block a user