[Fix](ut)(show) added UT cases for show backup stmt (#28604)
* Added UT for show backup * fixed some toSql() space and missing CLAUSE * Updated Doc with relevant syntax
This commit is contained in:
@ -136,13 +136,13 @@ public class ShowBackupStmt extends ShowStmt {
|
||||
@Override
|
||||
public String toSql() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("SHOW BACKUP");
|
||||
if (dbName != null) {
|
||||
builder.append(" FROM `").append(dbName).append("` ");
|
||||
builder.append("SHOW BACKUP ");
|
||||
if (Strings.isNullOrEmpty(dbName)) {
|
||||
builder.append("FROM `").append(dbName).append("` ");
|
||||
}
|
||||
|
||||
if (where != null) {
|
||||
builder.append(where.toSql());
|
||||
builder.append("WHERE ").append(where.toSql());
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
|
||||
Reference in New Issue
Block a user