Package net.sf.jsqlparser.expression.operators.arithmetic

Examples of net.sf.jsqlparser.expression.operators.arithmetic.Multiplication


        Function se3 = new Function(); se3.setName("EXTRACT_YEAR"); se3.setParameters(el);
        Column le = new Column(); le.setTable(tableLineitem); le.setColumnName("EXTENDEDPRICE");
        Column ld = new Column(); ld.setTable(tableLineitem); ld.setColumnName("DISCOUNT");
        Subtraction diff = new Subtraction(); diff.setLeftExpression(new DoubleValue("1.0")); diff.setRightExpression(ld);
        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 "));
View Full Code Here


        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;
View Full Code Here

  @Test
  public void testParseExpression2() throws Exception {
    Expression result = CCJSqlParserUtil.parseExpression("2*(a+6.0)");
    assertEquals("2 * (a + 6.0)", result.toString());
    assertTrue(result instanceof Multiplication);
    Multiplication mult = (Multiplication)result;
    assertTrue(mult.getLeftExpression() instanceof LongValue);
    assertTrue(mult.getRightExpression() instanceof Parenthesis);
  }
View Full Code Here

        if (exp instanceof Addition)
            qualified = new Addition();
        else if (exp instanceof Division)
            qualified = new Division();
        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)
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.expression.operators.arithmetic.Multiplication

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.