代码重构

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@280 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-23 01:48:21 +00:00
parent 9e245f4773
commit 413be781fb
92 changed files with 143 additions and 105 deletions
@@ -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;