mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-22 14:54:21 +08:00
Compare commits
2 Commits
master
...
60f40f6808
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60f40f6808 | ||
|
|
2f27e0f36a |
@@ -23,9 +23,11 @@ public class SqlExecuteReq {
|
|||||||
private Integer limit = 1000;
|
private Integer limit = 1000;
|
||||||
|
|
||||||
public String getSql() {
|
public String getSql() {
|
||||||
if (StringUtils.isNotBlank(sql) && sql.endsWith(";")) {
|
if(StringUtils.isNotBlank(sql)){
|
||||||
sql = sql.substring(0, sql.length() - 1);
|
sql=sql.replaceAll("^[\\n]+|[\\n]+$", "");
|
||||||
|
sql=StringUtils.removeEnd(sql,";");
|
||||||
}
|
}
|
||||||
|
|
||||||
return String.format(LIMIT_WRAPPER, sql, limit);
|
return String.format(LIMIT_WRAPPER, sql, limit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user