Skip to content

Commit

Permalink
feat: pagination query for Kylin
Browse files Browse the repository at this point in the history
  • Loading branch information
chenl committed Sep 8, 2021
1 parent 2a89c94 commit 96f1cd8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/main/java/edp/core/utils/SqlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ public PaginateWithQueryColumns query4Paginate(String sql, int pageNo, int pageS
if (this.dataTypeEnum == MYSQL) {
sql = sql + " LIMIT " + startRow + ", " + pageSize;
getResultForPaginate(sql, paginateWithQueryColumns, jdbcTemplate, excludeColumns, -1);
} else {
} else if (this.dataTypeEnum == KYLIN) {
sql = sql + " LIMIT " + pageSize + " OFFSET "+ startRow;
getResultForPaginate(sql, paginateWithQueryColumns, jdbcTemplate, excludeColumns, -1);
}
else {
getResultForPaginate(sql, paginateWithQueryColumns, jdbcTemplate, excludeColumns, startRow);
}
}
Expand Down

0 comments on commit 96f1cd8

Please sign in to comment.