Skip to content

Commit

Permalink
[fix] add force in the tosql for table and database
Browse files Browse the repository at this point in the history
  • Loading branch information
Vallishp committed Nov 4, 2024
1 parent dacba03 commit 24c367e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public void analyze(Analyzer analyzer) throws UserException {
public String toSql() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("DROP DATABASE ").append("`").append(dbName).append("`");
if (forceDrop) {
stringBuilder.append(" FORCE");
}
return stringBuilder.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public void analyze(Analyzer analyzer) throws UserException {
public String toSql() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("DROP TABLE ").append(tableName.toSql());
if (forceDrop) {
stringBuilder.append(" FORCE");
}
return stringBuilder.toString();
}

Expand Down

0 comments on commit 24c367e

Please sign in to comment.