use of com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlOrderingExpr in project druid by alibaba.
the class WallVisitorUtils method checkSqlExpr.
public static boolean checkSqlExpr(SQLExpr x) {
// check groupby, orderby, limit
if (x == null) {
return false;
}
SQLObject obj = x;
for (; ; ) {
SQLObject parent = obj.getParent();
if (parent == null) {
return false;
}
if (parent instanceof SQLSelectGroupByClause) {
return true;
} else if (parent instanceof SQLOrderBy) {
return true;
} else if (parent instanceof SQLLimit) {
return true;
} else if (parent instanceof MySqlOrderingExpr) {
return true;
}
obj = parent;
}
}
Aggregations