修正输出格式

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@172 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-21 07:33:59 +00:00
parent 19b51f3eef
commit a11649ca87
5 changed files with 36 additions and 46 deletions
@@ -182,17 +182,17 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
public boolean visit(SQLBetweenExpr x) {
x.getTestExpr().accept(this);
if (x.isNot()) {
print(" NOT BETWEEN ");
} else {
print(" BETWEEN ");
}
x.getBeginExpr().accept(this);
print(" AND ");
x.getEndExpr().accept(this);
return false;
}
@@ -586,21 +586,27 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
if (x.getColumns().size() > 0) {
print(" (");
incrementIndent();
for (int i = 0, size = x.getColumns().size(); i < size; ++i) {
if (i != 0) {
if (i % 5 == 0) {
println();
}
print(", ");
}
x.getColumns().get(i).accept(this);
}
decrementIndent();
print(")");
}
if (x.getValues() != null) {
print(" VALUES ");
println();
print("VALUES ");
x.getValues().accept(this);
} else {
if (x.getQuery() != null) {
print(" ");
println();
x.getQuery().accept(this);
}
}