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@280 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
+4
-2
@@ -44,8 +44,10 @@ public class MySqlParameterizedOutputVisitor extends MySqlOutputVisitor {
|
||||
|
||||
public SQLBinaryOpExpr merge(SQLBinaryOpExpr x) {
|
||||
if (x.getLeft() instanceof SQLLiteralExpr && x.getRight() instanceof SQLLiteralExpr) {
|
||||
x.getLeft().getAttributes().put(ATTR_PARAMS_SKIP, true);
|
||||
x.getRight().getAttributes().put(ATTR_PARAMS_SKIP, true);
|
||||
if (x.getOperator() == SQLBinaryOperator.Equality || x.getOperator() == SQLBinaryOperator.NotEqual) {
|
||||
x.getLeft().getAttributes().put(ATTR_PARAMS_SKIP, true);
|
||||
x.getRight().getAttributes().put(ATTR_PARAMS_SKIP, true);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,8 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
|
||||
}
|
||||
aliasMap.put(ident, ident);
|
||||
}
|
||||
} else {
|
||||
accept(x.getExpr());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user