sql parser refactor

This commit is contained in:
wenshao
2012-07-18 07:42:37 +08:00
parent 4b64b07e38
commit 236561d6c3
5 changed files with 11 additions and 16 deletions
@@ -18,6 +18,10 @@ public class DistinctTest extends TestCase {
Assert.assertEquals("SELECT COUNT(DISTINCT *)\nFROM t", SQLUtils.format(sql, JdbcUtils.ORACLE));
}
public void test_oracle_unique() throws Exception {
Assert.assertEquals("SELECT COUNT(UNIQUE *)\nFROM t", SQLUtils.format("select count(unique *) from t", JdbcUtils.ORACLE));
}
public void test_postgres() throws Exception {
Assert.assertEquals("SELECT COUNT(DISTINCT *)\nFROM t", SQLUtils.format(sql, JdbcUtils.POSTGRESQL));
}