Class SingleRowFunctions

java.lang.Object
io.github.torand.fastersql.function.singlerow.SingleRowFunctions

public final class SingleRowFunctions extends Object
Provides factory methods for single row functions.
  • Method Details

    • upper

      public static Upper upper(Expression expression)
      Creates the upper case function for a string expression.
      Parameters:
      expression - the string expression.
      Returns:
      the string function.
    • lower

      public static Lower lower(Expression expression)
      Creates the lower case function for a string expression.
      Parameters:
      expression - the string expression.
      Returns:
      the string function.
    • toNumber

      public static ToNumber toNumber(Expression expression, int precision, int scale)
      Creates the string to decimal number conversion function for an expression.
      Parameters:
      expression - the string expression.
      precision - the total number of digits (including decimals).
      scale - the number of decimals.
      Returns:
      the conversion function.
    • toNumber

      public static ToNumber toNumber(Expression expression, int precision)
      Creates the string to integer number conversion function for an expression.
      Parameters:
      expression - the string expression.
      precision - the total number of digits.
      Returns:
      the conversion function.
    • substring

      public static Substring substring(Expression expression, int startPos, int length)
      Creates the substring function for a string expression.
      Parameters:
      expression - the string expression.
      startPos - the substring start position, 1-based.
      length - the substring length.
      Returns:
      the string function.
    • toChar

      public static ToChar toChar(Expression expression, String format)
      Creates the timestamp/number to string conversion function for an expression.
      Parameters:
      expression - the timestamp or number expression.
      format - the format specifier.
      Returns:
      the conversion function.
    • concat

      public static Concat concat(Expression expression1, Expression expression2, Expression... otherExpressions)
      Creates the concatenation function for string expressions.
      Parameters:
      expression1 - the first string expression.
      expression2 - the second string expression.
      otherExpressions - the additional string expressions.
      Returns:
      the string function.
    • length

      public static Length length(Expression expression)
      Creates the length function for a string expression.
      Parameters:
      expression - the string expression.
      Returns:
      the string function.
    • round

      public static Round round(Expression expression)
      Creates the round function for a numeric expression.
      Parameters:
      expression - the numeric expression.
      Returns:
      the numeric function.
    • abs

      public static Abs abs(Expression expression)
      Creates the absolute value function for a numeric expression.
      Parameters:
      expression - the numeric expression.
      Returns:
      the numeric function.
    • ceil

      public static Ceil ceil(Expression expression)
      Creates the ceiling function for a numeric expression.
      Parameters:
      expression - the numeric expression.
      Returns:
      the numeric function.
    • floor

      public static Floor floor(Expression expression)
      Creates the floor function for a numeric expression.
      Parameters:
      expression - the numeric expression.
      Returns:
      the numeric function.