private QueryResult query(String sqlString) {
QueryResult result = new QueryResult(sqlString);
try {
if (sqlString.toLowerCase().startsWith("select")) {
PageLimit limit = getPageLimit();
String newSql = sqlService.getLimitString(sqlString, limit);
List<Map<String, Object>> datas = sqlService.queryForList(newSql);
Page<?> page = new SinglePage<Map<String, Object>>(limit.getPageNo(), limit
.getPageSize(), sqlService.count(sqlString), datas);
if (!datas.isEmpty()) {
result.setColumns(new ArrayList<String>(datas.get(0).keySet()));
}
result.setDatas(page);