mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正输出格式
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@172 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user