Skip to content
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into upsert_sqlite
# Conflicts:
#	src/main/java/net/sf/jsqlparser/statement/drop/Drop.java
#	src/main/java/net/sf/jsqlparser/util/deparser/DropDeParser.java
  • Loading branch information
manticore-projects committed Jan 13, 2023
commit 0575519005f121d84738ff1295580b06d478e4e8
13 changes: 12 additions & 1 deletion src/main/java/net/sf/jsqlparser/statement/drop/Drop.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ public Drop withUsingTemporary(boolean useTemporary) {
return this;
}

public boolean isMaterialized() {
return materialized;
}

public void setMaterialized(boolean materialized) {
this.materialized = materialized;
}

public Map<String, List<String>> getTypeToParameters() {
return typeToParameters;
}
Expand All @@ -92,7 +100,10 @@ public void setTypeToParameters(Map<String, List<String>> typeToParameters) {

@Override
public String toString() {
String sql = "DROP " + ( isUsingTemporary? "TEMPORARY " : "") + type + " "
String sql = "DROP "
+ (isUsingTemporary ? "TEMPORARY " : "")
+ (materialized ? "MATERIALIZED " : "")
+ type + " "
+ (ifExists ? "IF EXISTS " : "") + name.toString();

if (type.equals("FUNCTION")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public void deParse(Drop drop) {
if (drop.isUsingTemporary()) {
buffer.append("TEMPORARY ");
}
if (drop.isMaterialized()) {
buffer.append("MATERIALIZED ");
}
buffer.append(drop.getType());
if (drop.isIfExists()) {
buffer.append(" IF EXISTS");
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.