mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
[improvement][project] Keep the style consistent when displaying various SQL queries on the Chat page. (#684)
This commit is contained in:
@@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@Data
|
||||
public class SqlExecuteReq {
|
||||
public static final String LIMIT_WRAPPER = " select * from ( %s ) a limit 1000 ";
|
||||
public static final String LIMIT_WRAPPER = " SELECT * FROM ( %s ) a LIMIT 1000 ";
|
||||
|
||||
@NotNull(message = "modelId can not be null")
|
||||
private Long id;
|
||||
|
||||
@@ -91,7 +91,7 @@ public abstract class SemanticNode {
|
||||
public static String getSql(SqlNode sqlNode, EngineType engineType) {
|
||||
SemanticSqlDialect sqlDialect = SqlDialectFactory.getSqlDialect(engineType);
|
||||
SqlWriterConfig config = SqlPrettyWriter.config().withDialect(sqlDialect)
|
||||
.withKeywordsLowerCase(true).withClauseEndsLine(true).withAlwaysUseParentheses(false)
|
||||
.withKeywordsLowerCase(false).withClauseEndsLine(true).withAlwaysUseParentheses(false)
|
||||
.withSelectListItemsOnSeparateLines(false).withUpdateSetListNewline(false).withIndentation(0);
|
||||
|
||||
UnaryOperator<SqlWriterConfig> sqlWriterConfigUnaryOperator = (c) -> config;
|
||||
|
||||
Reference in New Issue
Block a user