Skip to content

Commit

Permalink
fix compiler error in MySqlDDLParserListenerImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Jan 20, 2025
1 parent 3c73ba9 commit 5c9001a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Constants {
public static final String ADD_COLUMN = "ADD COLUMN %s %s";
public static final String ADD_COLUMN_NULLABLE = "ADD COLUMN %s Nullable(%s)";


public static final String MODIFY_COLUMN = "MODIFY COLUMN %s %s";
public static final String MODIFY_COLUMN_NULLABLE = "MODIFY COLUMN %s Nullable(%s)";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,14 @@ else if(columnDefChild.getText().equalsIgnoreCase(Constants.NOT_NULL)) {
if (columnName != null && columnType != null)
if (isNullColumn) {
this.query.append(" ").append(String.format(modifierWithNull, columnName, columnType)).append(" ");
} else{
if(notNullExplicitlySet) {
this.query.append(" ").append(String.format(modifierWithNotNull, columnName, columnType)).append(" ");
} else {
this.query.append(" ").append(String.format(modifier, columnName, columnType));
}
}

// else{
// if(notNullExplicitlySet) {
// this.query.append(" ").append(String.format(modifierWithNotNull, columnName, columnType)).append(" ");
// } else {
// this.query.append(" ").append(String.format(modifier, columnName, columnType));
// }
if (defaultModifier != null && defaultModifier.isEmpty() == false) {
this.query.append(" ").append(defaultModifier);
}
Expand Down

0 comments on commit 5c9001a

Please sign in to comment.