java.lang.Object
org.springframework.data.relational.core.sql.Functions

public class Functions extends Object
Factory for common function expressions.
Since:
1.1
Author:
Mark Paluch, Jens Schauder
See Also:
  • Method Details

    • coalesce

      public static SimpleFunction coalesce(Expression... expressions)
      Creates a new COALESCE function.
      Parameters:
      expressions - expressions to apply COALESCE, must not be null.
      Returns:
      the new COALESCE function for expression.
      Since:
      3.2
    • count

      public static SimpleFunction count(Expression... columns)
      Creates a new COUNT function.
      Parameters:
      columns - columns to apply COUNT, must not be null.
      Returns:
      the new COUNT function for columns.
    • count

      public static SimpleFunction count(Collection<? extends Expression> columns)
      Creates a new COUNT function.
      Parameters:
      columns - columns to apply COUNT, must not be null.
      Returns:
      the new COUNT function for columns.
    • greatest

      public static SimpleFunction greatest(Expression... expressions)
      Creates a new GREATEST function.
      Parameters:
      expressions - expressions to apply GREATEST, must not be null.
      Returns:
      the new GREATEST function for expression.
      Since:
      3.2
    • greatest

      public static SimpleFunction greatest(List<? extends Expression> expressions)
      Creates a new GREATEST function.
      Parameters:
      expressions - expressions to apply GREATEST, must not be null.
      Returns:
      the new GREATEST function for expression.
      Since:
      3.2
    • least

      public static SimpleFunction least(Expression... expressions)
      Creates a new LEAST function.
      Parameters:
      expressions - expressions to apply LEAST, must not be null.
      Returns:
      the new LEAST function for expression.
      Since:
      3.2
    • lower

      public static SimpleFunction lower(Expression expression)
      Creates a new LOWER function.
      Parameters:
      expression - expression to apply LOWER, must not be null.
      Returns:
      the new LOWER function for expression.
      Since:
      2.0
    • upper

      public static SimpleFunction upper(Expression expression)
      Creates a new UPPER function.
      Parameters:
      expression - expression to apply UPPER, must not be null.
      Returns:
      the new UPPER function for expression.
      Since:
      2.0