Class With

  • All Implemented Interfaces:
    Serializable

    public class With
    extends Expression
    With SQL Expression.
    Since:
    2.4.0
    Author:
    Francisco Santos (francisco.santos@feedzai.com)
    See Also:
    Serialized Form
    • Constructor Detail

      • With

        public With​(String alias,
                    Expression expression)
        Creates a new WITH expression.
        Parameters:
        alias - expression alias.
        expression - expression to be aliased.
    • Method Detail

      • getClauses

        public List<org.apache.commons.lang3.tuple.ImmutablePair<Name,​Expression>> getClauses()
        Gets the clauses.
        Returns:
        the clauses.
      • getThen

        public Expression getThen()
        Gets the then expression.
        Returns:
        the then expression.
      • andWith

        public With andWith​(String alias,
                            Expression expression)
        Adds an alias and expression to the with clause.
        Parameters:
        alias - expression alias
        expression - expression to be aliased.
        Returns:
        this object.
      • then

        public With then​(Expression thenExpression)
        Sets the expression to be executed given the clauses.
        Parameters:
        thenExpression - expression to be executed given the clauses.
        Returns:
        this object.
      • translate

        public String translate()
        Description copied from class: Expression
        Translates the expression.
        Specified by:
        translate in class Expression
        Returns:
        A translation of the implementing expression.