int from = (page - 1) * pageSize;
String pageSql = buildPageSql(sql, from, pageSize);
DbSqlBuilder dbsql = sql(pageSql);
DbOomQuery query = query(dbsql);
query.setMaxRows(pageSize);
query.setFetchSize(pageSize);
query.setMap(params);
List<T> list = query.list(pageSize, target);
query.close();
String countSql = buildCountSql(sql);
dbsql = sql(countSql);
query = query(dbsql);
query.setMap(params);
long count = query.executeCount();
query.close();
return new PageData<T>(page, (int) count, pageSize, list);
}