提交 9102d563 authored 作者: junjie's avatar junjie

feat(数据集):数据集 优化

上级 df09ffd7
......@@ -557,11 +557,11 @@ public class DataSetTableService {
DatasourceTypes datasourceType = DatasourceTypes.valueOf(type);
switch (datasourceType) {
case mysql:
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + fields[0], StringUtils.join(fields, ","), table);
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + (fields.length > 0 ? fields[0] : "null"), StringUtils.join(fields, ","), table);
case sqlServer:
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + fields[0], StringUtils.join(fields, ","), table);
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + (fields.length > 0 ? fields[0] : "null"), StringUtils.join(fields, ","), table);
default:
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + fields[0], StringUtils.join(fields, ","), table);
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY " + (fields.length > 0 ? fields[0] : "null"), StringUtils.join(fields, ","), table);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论