Package net.sf.jsqlparser.expression.operators.conditional

Examples of net.sf.jsqlparser.expression.operators.conditional.AndExpression


  public static void addAndExprToComp(Map<String, Expression> collocatedExprs, Expression expr,
      String compName) {

    if (collocatedExprs.containsKey(compName)) {
      final Expression oldExpr = collocatedExprs.get(compName);
      final Expression newExpr = new AndExpression(oldExpr, expr);
      collocatedExprs.put(compName, newExpr);
    } else
      collocatedExprs.put(compName, expr);

  }
View Full Code Here


    final List<Column> columns = getJSQLColumns(expr);
    final Set<String> compNameSet = new HashSet<String>(getCompNamesFromColumns(columns));

    if (collocatedExprs.containsKey(compNameSet)) {
      final Expression oldExpr = collocatedExprs.get(compNameSet);
      final Expression newExpr = new AndExpression(oldExpr, expr);
      collocatedExprs.put(compNameSet, newExpr);
    } else
      collocatedExprs.put(compNameSet, expr);
  }
View Full Code Here

    // this is treated as a list of AndExpressions
    if (exprs.size() == 1)
      return estimate(exprs.get(0));

    // at least two expressions in the list
    AndExpression and = new AndExpression(exprs.get(0), exprs.get(1));
    for (int i = 2; i < exprs.size(); i++)
      and = new AndExpression(and, exprs.get(i));
    return estimate(and);
  }
View Full Code Here

  private Expression appendAnd(Expression fullExpr, Expression atomicExpr) {
    if (atomicExpr != null)
      if (fullExpr != null)
        // appending to previous expressions
        fullExpr = new AndExpression(fullExpr, atomicExpr);
      else
        // this is the first expression for this component
        fullExpr = atomicExpr;
    return fullExpr;
  }
View Full Code Here

        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
        String strListExpr = ParserUtil.getStringExpr(listExpr);
View Full Code Here

          jj_la1[83] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
                        result = new AndExpression(left, right);
                        left = result;
    }
                {if (true) return result;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

    public void visit(AndExpression andExpression) {
        Expression left = qualify(session, tableAliases, andExpression.getLeftExpression());
        Expression rigth = qualify(session, tableAliases, andExpression.getRightExpression());

        AndExpression and = new AndExpression(left, rigth);
        this._qualifiedExpression = and;
    }
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.expression.operators.conditional.AndExpression

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.