mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
change createView output format.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user