improve WallFilter

This commit is contained in:
wenshao
2013-05-26 20:57:56 +08:00
parent 8bd297894d
commit 799e31a18d
2 changed files with 52 additions and 5 deletions
@@ -531,7 +531,7 @@ public class WallVisitorUtils {
Object result = getValue(visitor, groupList.get(i));
if (Boolean.TRUE == result) {
final WallConditionContext wallContext = WallVisitorUtils.getWallConditionContext();
if (wallContext != null) {
if (wallContext != null && i != 0) {
wallContext.setPartAlwayTrue(true);
}
return true;
@@ -627,14 +627,14 @@ public class WallVisitorUtils {
if (x == null) {
return false;
}
for (;;) {
SQLObject parent = x.getParent();
if (parent == null) {
return false;
}
if (parent instanceof SQLSelectQueryBlock) {
SQLSelectQueryBlock query = (SQLSelectQueryBlock) parent;
if (query.getWhere() == x) {
@@ -643,7 +643,7 @@ public class WallVisitorUtils {
return false;
}
}
if (parent instanceof SQLSelectGroupByClause) {
SQLSelectGroupByClause groupBy = (SQLSelectGroupByClause) parent;
if (x == groupBy.getHaving()) {
@@ -652,7 +652,7 @@ public class WallVisitorUtils {
return false;
}
}
x = parent;
}
}