mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
Merge pull request #13717 from dataease/pr@dev-v2@fix_sql
fix(数据集): 修复sql片段报错的问题
This commit is contained in:
@@ -429,7 +429,7 @@ public class DatasetDataManage {
|
||||
if (ObjectUtils.isEmpty(list)) {
|
||||
return null;
|
||||
}
|
||||
sql = SQLUtils.buildOriginPreviewSqlWithOrderBy(SqlPlaceholderConstants.TABLE_PLACEHOLDER, 100, 0, String.format(SQLConstants.FIELD_DOT, list.get(0).getOriginName()) + " ASC ");
|
||||
sql = SQLUtils.buildOriginPreviewSqlWithOrderBy(SqlPlaceholderConstants.TABLE_PLACEHOLDER, 100, 0, String.format(SQLConstants.FIELD_DOT_FIX, list.get(0).getOriginName()) + " ASC ");
|
||||
} else {
|
||||
sql = SQLUtils.buildOriginPreviewSql(SqlPlaceholderConstants.TABLE_PLACEHOLDER, 100, 0);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ public class SQLConstants {
|
||||
|
||||
public static final String FIELD_DOT = "%s";
|
||||
|
||||
public static final String FIELD_DOT_FIX = "`%s`";
|
||||
|
||||
public static final String UNIX_TIMESTAMP = "DE_UNIX_TIMESTAMP(%s)";
|
||||
|
||||
public static final String DE_DATE_FORMAT = "DE_DATE_FORMAT(%s,'%s')";
|
||||
|
||||
Reference in New Issue
Block a user