コード例 #1
0
  public boolean visit(SQLBinaryOpExpr x) {
    x.getLeft().setParent(x);
    x.getRight().setParent(x);

    switch (x.getOperator()) {
      case Equality:
      case NotEqual:
      case GreaterThan:
      case GreaterThanOrEqual:
      case LessThan:
      case LessThanOrEqual:
      case LessThanOrEqualOrGreaterThan:
      case Like:
      case NotLike:
      case Is:
      case IsNot:
        handleCondition(x.getLeft(), x.getOperator().name, x.getRight());
        handleCondition(x.getRight(), x.getOperator().name, x.getLeft());

        handleRelationship(x.getLeft(), x.getOperator().name, x.getRight());
        break;
      default:
        break;
    }
    return true;
  }
コード例 #2
0
 @Override
 public boolean visit(SQLInSubQueryExpr x) {
   if (x.isNot()) {
     handleCondition(x.getExpr(), "NOT IN");
   } else {
     handleCondition(x.getExpr(), "IN");
   }
   return true;
 }
コード例 #3
0
  public boolean visit(SQLInListExpr x) {
    if (x.isNot()) {
      handleCondition(x.getExpr(), "NOT IN", x.getTargetList());
    } else {
      handleCondition(x.getExpr(), "IN", x.getTargetList());
    }

    return true;
  }
コード例 #4
0
 protected void handleCondition(SQLExpr expr, String operator, List<SQLExpr> values) {
   handleCondition(expr, operator, values.toArray(new SQLExpr[values.size()]));
 }