Examples of Parenthesis


Examples of net.sf.jsqlparser.expression.Parenthesis

    if (expr instanceof BinaryExpression) {
      final BinaryExpression be = (BinaryExpression) expr;
      result.add(be.getLeftExpression());
      result.add(be.getRightExpression());
    } else if (expr instanceof Parenthesis) {
      final Parenthesis prnths = (Parenthesis) expr;
      result.add(prnths.getExpression());
    } else if (expr instanceof Function) {
      final Function fun = (Function) expr;
      final ExpressionList params = fun.getParameters();
      if (params != null)
        result.addAll(params.getExpressions());
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

    else if (expr instanceof AndExpression)
      return estimate((AndExpression) expr);
    else if (expr instanceof OrExpression)
      return estimate((OrExpression) expr);
    else if (expr instanceof Parenthesis) {
      final Parenthesis pnths = (Parenthesis) expr;
      return estimate(pnths.getExpression());
    } else
      return HardCodedSelectivities.estimate(_queryName, expr);
  }
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

    if (expr instanceof OrExpression || expr instanceof AndExpression) {
      final BinaryExpression be = (BinaryExpression) expr;
      result = appendOr(result, getMineSubset(source, be.getLeftExpression()));
      result = appendOr(result, getMineSubset(source, be.getRightExpression()));
    } else if (expr instanceof Parenthesis) {
      final Parenthesis prnth = (Parenthesis) expr;
      result = getMineSubset(source, prnth.getExpression());
    }

    // whatever is not fully recognized (all the compNames = source), and is
    // not And or Or, returns null
    return result;
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 79:
        jj_consume_token(79);
        retval = Expression();
        jj_consume_token(80);
                                             retval = new Parenthesis(retval);
        break;
      default:
        jj_la1[79] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

          ;
        }
        jj_consume_token(79);
        left = OrExpression();
        jj_consume_token(80);
                                         left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; }
        break;
      default:
        jj_la1[81] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
          result = left;
    label_17:
    while (true) {
      if (jj_2_12(2147483647)) {
        ;
      } else {
        break label_17;
      }
      jj_consume_token(K_AND);
      if (jj_2_13(2147483647)) {
        right = Condition();
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case K_NOT:
        case 79:
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case K_NOT:
            jj_consume_token(K_NOT);
                                not = true;
            break;
          default:
            jj_la1[82] = jj_gen;
            ;
          }
          jj_consume_token(79);
          right = OrExpression();
          jj_consume_token(80);
                                                  right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; }
          break;
        default:
          jj_la1[83] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 79:
        jj_consume_token(79);
        retval = BitwiseAndOr();
        jj_consume_token(80);
                                               retval = new Parenthesis(retval);
        break;
      default:
        jj_la1[100] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 79:
        jj_consume_token(79);
        leftExpression = AdditiveExpression();
        jj_consume_token(80);
                                                         leftExpression = new Parenthesis(leftExpression);
        break;
      default:
        jj_la1[104] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
        result = leftExpression;
    label_23:
    while (true) {
      if (jj_2_24(2)) {
        ;
      } else {
        break label_23;
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 82:
        jj_consume_token(82);
                            result = new Multiplication();
        break;
      case 96:
        jj_consume_token(96);
                                                                        result = new Division();
        break;
      default:
        jj_la1[105] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      if (jj_2_25(2147483647)) {
        rightExpression = BitwiseXor();
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case 79:
          jj_consume_token(79);
          rightExpression = AdditiveExpression();
          jj_consume_token(80);
                                                                                                  rightExpression = new Parenthesis(rightExpression);
          break;
        default:
          jj_la1[106] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

          ;
        }
        jj_consume_token(79);
        retval = PrimaryExpression();
        jj_consume_token(80);
                                                                                               retval = new Parenthesis(retval);
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case S_CHAR_LITERAL:
          token = jj_consume_token(S_CHAR_LITERAL);
                                   retval = new StringValue(token.image);
View Full Code Here

Examples of net.sf.jsqlparser.expression.Parenthesis

    public void visit(Parenthesis parenthesis) {
        Expression pExp = parenthesis.getExpression();
        Expression qualifiedExpression;
        qualifiedExpression = qualify(session, tableAliases, pExp);

        Parenthesis qualified = new Parenthesis();
        qualified.setExpression(qualifiedExpression);
        this._qualifiedExpression = qualified;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.