return sql.toLowerCase().indexOf("select distinct") >= 0;
}
@Override
protected LimitGrammar buildLimitGrammar() {
return new LimitGrammarBean(null, null, false, false, true) {
public String limit(String sql, boolean hasOffset) {
int startOfSelect = sql.toLowerCase().indexOf("select");
StringBuilder pagingSelect = new StringBuilder(sql.length() + 100)
.append(sql.substring(0, startOfSelect)) // add the comment
.append("select * from ( select ") // nest the main query in an