mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve output visitor
This commit is contained in:
@@ -189,6 +189,12 @@ public class ParameterizedOutputVisitorUtils {
|
||||
v.incrementReplaceCunt();
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean visit(ParameterizedVisitor v, SQLVariantRefExpr x) {
|
||||
v.print('?');
|
||||
v.incrementReplaceCunt();
|
||||
return false;
|
||||
}
|
||||
|
||||
public static SQLBinaryOpExpr merge(ParameterizedVisitor v, SQLBinaryOpExpr x) {
|
||||
SQLExpr left = x.getLeft();
|
||||
|
||||
@@ -601,7 +601,9 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
|
||||
decrementIndent();
|
||||
} else if (parent instanceof ValuesClause) {
|
||||
println();
|
||||
print("(");
|
||||
x.getSubQuery().accept(this);
|
||||
print(")");
|
||||
println();
|
||||
} else {
|
||||
print("(");
|
||||
|
||||
Reference in New Issue
Block a user