Skip to content

Commit

Permalink
Fix formatting procedure parameters with spaces (RS-180392)
Browse files Browse the repository at this point in the history
(cherry picked from commit cbb46a9)
  • Loading branch information
aleksey.kozlov committed May 30, 2024
1 parent 0e1cfd0 commit f88cb95
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/org/underworldlabs/util/SQLUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,9 @@ public static String formattedParameters(Vector<ColumnData> tableVector, boolean
sb.append("(").append(cd.getSelectOperator()).append(")");

} else {

if (!variable)
sb.append("\t");
sb.append(formattedParameter(cd));

sb.append(formattedParameter(cd, variable));
}

if (variable) {
Expand All @@ -718,15 +716,11 @@ public static String formattedParameters(Vector<ColumnData> tableVector, boolean
return sb.toString();
}

public static String formattedParameter(ColumnData cd) {
return formattedParameter(cd, true);
}

public static String formattedParameter(ColumnData cd, boolean appendName) {
public static String formattedParameter(ColumnData cd, boolean variable) {
StringBuilder sb = new StringBuilder();

if (appendName)
sb.append(cd.getColumnName() == null ? CreateTableSQLSyntax.EMPTY : cd.getColumnName()).append(SPACE);
String formattedName = variable ? cd.getColumnName() : format(cd.getColumnName(), cd.getConnection());
sb.append(cd.getColumnName() == null ? CreateTableSQLSyntax.EMPTY : formattedName).append(SPACE);

if (MiscUtils.isNull(cd.getComputedBy())) {

Expand Down

0 comments on commit f88cb95

Please sign in to comment.