提交 a6c94ddf authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix commit 4f34f37d

上级 a36a6634
...@@ -203,13 +203,13 @@ public class FunctionAlias extends SchemaObjectBase { ...@@ -203,13 +203,13 @@ public class FunctionAlias extends SchemaObjectBase {
} }
@Override @Override
public String getSQL() { public StringBuilder getSQL(StringBuilder builder) {
// TODO can remove this method once FUNCTIONS_IN_SCHEMA is enabled // TODO can remove this method once FUNCTIONS_IN_SCHEMA is enabled
if (database.getSettings().functionsInSchema || if (database.getSettings().functionsInSchema ||
!getSchema().getName().equals(Constants.SCHEMA_MAIN)) { !getSchema().getName().equals(Constants.SCHEMA_MAIN)) {
return super.getSQL(); return super.getSQL(builder);
} }
return Parser.quoteIdentifier(getName()); return Parser.quoteIdentifier(builder, getName());
} }
@Override @Override
......
...@@ -230,6 +230,11 @@ public class FunctionTable extends Table { ...@@ -230,6 +230,11 @@ public class FunctionTable extends Table {
return function.getSQL(); return function.getSQL();
} }
@Override
public StringBuilder getSQL(StringBuilder builder) {
return builder.append(function.getSQL());
}
@Override @Override
public long getRowCountApproximation() { public long getRowCountApproximation() {
return rowCount; return rowCount;
......
...@@ -71,8 +71,7 @@ public class RangeTable extends Table { ...@@ -71,8 +71,7 @@ public class RangeTable extends Table {
} }
@Override @Override
public String getSQL() { public StringBuilder getSQL(StringBuilder builder) {
StringBuilder builder = new StringBuilder();
builder.append(NAME).append('('); builder.append(NAME).append('(');
min.getSQL(builder).append(", "); min.getSQL(builder).append(", ");
max.getSQL(builder); max.getSQL(builder);
...@@ -80,7 +79,7 @@ public class RangeTable extends Table { ...@@ -80,7 +79,7 @@ public class RangeTable extends Table {
builder.append(", "); builder.append(", ");
step.getSQL(builder); step.getSQL(builder);
} }
return builder.append(')').toString(); return builder.append(')');
} }
@Override @Override
......
...@@ -456,12 +456,12 @@ public class TableView extends Table { ...@@ -456,12 +456,12 @@ public class TableView extends Table {
} }
@Override @Override
public String getSQL() { public StringBuilder getSQL(StringBuilder builder) {
if (isTemporary() && querySQL != null) { if (isTemporary() && querySQL != null) {
StringBuilder builder = new StringBuilder(querySQL.length() + 16).append("(\n"); builder.append("(\n");
return StringUtils.indent(builder, querySQL, 4, true).append(')').toString(); return StringUtils.indent(builder, querySQL, 4, true).append(')');
} }
return super.getSQL(); return super.getSQL(builder);
} }
public String getQuery() { public String getQuery() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论