Class CoalesceFunction

All Implemented Interfaces:
ExpressionWithVariableParameters, NamedExpression, HasSQL, Typed

public final class CoalesceFunction extends FunctionN
A COALESCE, GREATEST, or LEAST function.
  • Field Details

    • COALESCE

      public static final int COALESCE
      COALESCE().
      See Also:
    • GREATEST

      public static final int GREATEST
      GREATEST() (non-standard).
      See Also:
    • LEAST

      public static final int LEAST
      LEAST() (non-standard).
      See Also:
    • NAMES

      private static final String[] NAMES
    • function

      private final int function
  • Constructor Details

    • CoalesceFunction

      public CoalesceFunction(int function)
    • CoalesceFunction

      public CoalesceFunction(int function, Expression... args)
  • Method Details

    • getValue

      public Value getValue(SessionLocal session)
      Description copied from class: Expression
      Return the resulting value for the current row.
      Overrides:
      getValue in class FunctionN
      Parameters:
      session - the session
      Returns:
      the result
    • optimize

      public Expression optimize(SessionLocal session)
      Description copied from class: Expression
      Try to optimize the expression.
      Specified by:
      optimize in class Expression
      Parameters:
      session - the session
      Returns:
      the optimized expression
    • getName

      public String getName()
      Description copied from interface: NamedExpression
      Get the name.
      Returns:
      the name in uppercase