Package net.sf.jsqlparser.expression.operators.relational

Examples of net.sf.jsqlparser.expression.operators.relational.EqualsTo


    } else
      return HardCodedSelectivities.estimate(_queryName, expr);
  }

  public double estimate(GreaterThan gt) {
    final EqualsTo equals = new EqualsTo();
    equals.setLeftExpression(gt.getLeftExpression());
    equals.setRightExpression(gt.getRightExpression());

    final MinorThan minorThan = new MinorThan();
    minorThan.setLeftExpression(gt.getLeftExpression());
    minorThan.setRightExpression(gt.getRightExpression());
View Full Code Here


      // compared
      return HardCodedSelectivities.estimate(_queryName, mt);
  }

  public double estimate(MinorThanEquals mte) {
    final EqualsTo equals = new EqualsTo();
    equals.setLeftExpression(mte.getLeftExpression());
    equals.setRightExpression(mte.getRightExpression());

    final MinorThan minorThan = new MinorThan();
    minorThan.setLeftExpression(mte.getLeftExpression());
    minorThan.setRightExpression(mte.getRightExpression());
View Full Code Here

  /*
   * computed using the basic ones (= and <)
   */
  public double estimate(NotEqualsTo ne) {
    final EqualsTo equals = new EqualsTo();
    equals.setLeftExpression(ne.getLeftExpression());
    equals.setRightExpression(ne.getRightExpression());

    return 1 - estimate(equals);
  }
View Full Code Here

        Parenthesis diffPnths = new Parenthesis();diffPnths.setExpression(diff);
        Multiplication se4 = new Multiplication(); se4.setLeftExpression(le); se4.setRightExpression(diffPnths);
        List<Expression> expListExpr = Arrays.asList(se1, se2, se3, se4);
       
       
        EqualsTo eq1 = new EqualsTo(); eq1.setLeftExpression(se1); eq1.setRightExpression(new StringValue(" FRANCE "));
        EqualsTo eq2 = new EqualsTo(); eq2.setLeftExpression(se2); eq2.setRightExpression(new StringValue(" GERMANY "));
        AndExpression and1 = new AndExpression(eq1, eq2);
        Parenthesis p1 = new Parenthesis(); p1.setExpression(and1);
        EqualsTo eq3 = new EqualsTo(); eq3.setLeftExpression(se1); eq3.setRightExpression(new StringValue(" GERMANY "));
        EqualsTo eq4 = new EqualsTo(); eq4.setLeftExpression(se2); eq4.setRightExpression(new StringValue(" FRANCE "));
        AndExpression and2 = new AndExpression(eq3, eq4);
        Parenthesis p2 = new Parenthesis(); p2.setExpression(and2);
        List<OrExpression> expOrListExpr = Arrays.asList(new OrExpression(p1, p2));
       
        //compare its string representation: computed are first two, expected are second two
View Full Code Here

      jj_consume_token(85);
                result = new MinorThan();
      break;
    case 77:
      jj_consume_token(77);
                result = new EqualsTo();
      break;
    case 86:
      jj_consume_token(86);
                 result = new GreaterThanEquals();
      break;
View Full Code Here

  }
 
  @Test
  public void testAddJoin() throws JSQLParserException {
    Select select = (Select)CCJSqlParserUtil.parse("select a from mytable");
    final EqualsTo equalsTo = new EqualsTo();
    equalsTo.setLeftExpression(new Column("a"));
    equalsTo.setRightExpression(new Column("b"));
    Join addJoin = SelectUtils.addJoin(select, new Table("mytable2"), equalsTo);
    addJoin.setLeft(true);
    assertEquals("SELECT a FROM mytable LEFT JOIN mytable2 ON a = b", select.toString());
  }
View Full Code Here

        else if (exp instanceof Multiplication)
            qualified = new Multiplication();
        else if (exp instanceof Subtraction)
            qualified = new Subtraction();
        else if (exp instanceof EqualsTo)
            qualified = new EqualsTo();
        else if (exp instanceof GreaterThan)
            qualified = new GreaterThan();
        else if (exp instanceof GreaterThanEquals)
            qualified = new GreaterThanEquals();
        else if (exp instanceof LikeExpression)
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.expression.operators.relational.EqualsTo

Copyright © 2018 www.massapicom. 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.