change createView output format.

This commit is contained in:
wenshao
2017-06-19 22:05:29 +08:00
parent dd72eef325
commit 9afc424dd2
10 changed files with 15 additions and 48 deletions
@@ -166,30 +166,6 @@ public class SQLCreateViewStatement extends SQLStatementImpl implements SQLDDLSt
this.force = force;
}
public void output(StringBuffer buf) {
buf.append("CREATE VIEW ");
this.getName().output(buf);
if (this.columns.size() > 0) {
buf.append(" (");
for (int i = 0, size = this.columns.size(); i < size; ++i) {
if (i != 0) {
buf.append(", ");
}
this.columns.get(i).output(buf);
}
buf.append(")");
}
buf.append(" AS ");
this.subQuery.output(buf);
if (this.with != null) {
buf.append(" WITH ");
buf.append(this.with.name());
}
}
@Override
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
@@ -2480,8 +2480,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
x.getTableSource().accept(this);
if (x.getColumns().size() > 0) {
println();
print('(');
print0(" (");
incrementIndent();
println();
for (int i = 0; i < x.getColumns().size(); ++i) {