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

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


  public void visit(Function function) {
    // all aggregate functions (SUM, AVG, COUNT, MAX, MIN) have only one
    // parameter (Expression)
    // although COUNT(*) has no parameters
    // EXTRACT_YEAR has one parameter
    final ExpressionList params = function.getParameters();
    int numParams = 0;
    if (params != null) {
      params.accept(this);

      // in order to determine the size
      final List<Expression> listParams = params.getExpressions();
      numParams = listParams.size();
    }
    final List<ValueExpression> expressions = new ArrayList<ValueExpression>();
    for (int i = 0; i < numParams; i++)
      expressions.add(_exprStack.pop());
View Full Code Here


  }

  @Override
  public void visit(Function function) {
    _sb.append(function.getName());
    final ExpressionList params = function.getParameters();
    if (params != null) {
      if (function.isDistinct())
        _sb.append("(DISTINCT ");
      else
        _sb.append("(");
View Full Code Here

  public void visit(Function function) {
    // all aggregate functions (SUM, AVG, COUNT, MAX, MIN) have only one
    // parameter (Expression)
    // although COUNT(*) has no parameters
    // EXTRACT_YEAR has one parameter
    final ExpressionList params = function.getParameters();
    if (params != null)
      visit(params);
  }
View Full Code Here

  public void visit(Function function) {
    if (!isRecognized(function)) {
      // normal call
      // all aggregate functions (SUM, AVG, COUNT, MAX, MIN) should never
      // appear here
      final ExpressionList params = function.getParameters();
      int numParams = 0;
      if (params != null) {
        params.accept(this);

        // in order to determine the size
        final List<Expression> listParams = params.getExpressions();
        numParams = listParams.size();
      }
      final List<ValueExpression> expressions = new ArrayList<ValueExpression>();
      for (int i = 0; i < numParams; i++)
        expressions.add(_exprStack.pop());
View Full Code Here

  public void visit(Function function) {
    // all aggregate functions (SUM, AVG, COUNT, MAX, MIN) have only one
    // parameter (Expression)
    // although COUNT(*) has no parameters
    // EXTRACT_YEAR has one parameter
    final ExpressionList params = function.getParameters();
    int numParams = 0;
    if (params != null) {
      visit(params);

      // only for size
      final List<Expression> listParams = params.getExpressions();
      numParams = listParams.size();
    }
    final List<ValueExpression> expressions = new ArrayList<ValueExpression>();
    for (int i = 0; i < numParams; i++)
      expressions.add(_exprStack.pop());
View Full Code Here

    } 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());
    } else
      return null;
    return result;
  }
View Full Code Here

          // the others not
          if (recognized) {

            // create a list of expressions
            int numParams = 0;
            final ExpressionList params = function.getParameters();
            if (params != null)
              numParams = params.getExpressions().size();

            for (int i = 0; i < numParams; i++)
              expressions.add(popFromExprStack());
          }
        } else
View Full Code Here

    }
  }

  @Override
  public void visit(Function function) {
    final ExpressionList params = function.getParameters();
    if (params != null)
      visit(params);
  }
View Full Code Here

    // parameter (Expression)
    // although COUNT(*) has no parameters
    // EXTRACT_YEAR has one parameter
    // if you change this method, NameProjectVisitor.visit(Function) has to
    // be changed as well
    final ExpressionList params = function.getParameters();
    int numParams = 0;
    if (params != null) {
      params.accept(this);

      // in order to determine the size
      final List<Expression> listParams = params.getExpressions();
      numParams = listParams.size();
    }
    final List<ValueExpression> expressions = new ArrayList<ValueExpression>();
    for (int i = 0; i < numParams; i++)
      expressions.add(_exprStack.pop());
View Full Code Here

    _selectItems = selectItems;
    _whereExpr = whereExpr;
  }

  private void collectInternalExprs(Function fun) {
    final ExpressionList params = fun.getParameters();
    if (params != null) {
      final List<Expression> exprs = params.getExpressions();
      if (exprs != null && !exprs.isEmpty())
        _exprList.addAll(exprs);
    }
  }
View Full Code Here

TOP

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

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.