Examples of CoalesceExpression


Examples of com.facebook.presto.sql.tree.CoalesceExpression

            return new JoinNode(node.getId(), node.getType(), leftSource, rightSource, node.getCriteria());
        }

        private Expression oneIfNull(Symbol symbol)
        {
            return new CoalesceExpression(new QualifiedNameReference(symbol.toQualifiedName()), new LongLiteral("1"));
        }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

        return new SingleColumn(expression, alias);
    }

    private static SelectItem aliasedNullToEmpty(String column, String alias)
    {
        return new SingleColumn(new CoalesceExpression(nameReference(column), new StringLiteral("")), alias);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

    }

    private Expression oneIfNull(Optional<Symbol> symbol)
    {
        if (symbol.isPresent()) {
            return new CoalesceExpression(new QualifiedNameReference(symbol.get().toQualifiedName()), new LongLiteral("1"));
        }
        else {
            return new LongLiteral("1");
        }
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

        return new SingleColumn(expression, alias);
    }

    private static SelectItem aliasedNullToEmpty(String column, String alias)
    {
        return new SingleColumn(new CoalesceExpression(nameReference(column), new StringLiteral("")), alias);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

        return new SingleColumn(expression, alias);
    }

    private static SelectItem aliasedNullToEmpty(String column, String alias)
    {
        return new SingleColumn(new CoalesceExpression(nameReference(column), new StringLiteral("")), alias);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

    }

    private Expression oneIfNull(Optional<Symbol> symbol)
    {
        if (symbol.isPresent()) {
            return new CoalesceExpression(new QualifiedNameReference(symbol.get().toQualifiedName()), new LongLiteral("1"));
        }
        else {
            return new LongLiteral("1");
        }
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.CoalesceExpression

            return new JoinNode(node.getId(), node.getType(), leftSource, rightSource, node.getCriteria());
        }

        private Expression oneIfNull(Symbol symbol)
        {
            return new CoalesceExpression(new QualifiedNameReference(symbol.toQualifiedName()), new LongLiteral("1"));
        }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CoalesceExpression

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      CoalesceExpression expression = stateObject.getExpression();

      // 'COALESCE'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : COALESCE, COALESCE);

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if (expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      toStringChildren(stateObject, true);

      // ')'
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CoalesceExpression

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      CoalesceExpression expression = stateObject.getExpression();

      // 'COALESCE'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : COALESCE, COALESCE);

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if (expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      toStringChildren(stateObject, true);

      // ')'
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CoalesceExpression

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      CoalesceExpression expression = stateObject.getExpression();

      // 'COALESCE'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : COALESCE, COALESCE);

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if (expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      toStringChildren(stateObject, true);

      // ')'
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
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.