Function

public class Function: Expression

Function represents a function expression.

  • Create an AVG() function expression that returns the average of all the number values in the group of the values expressed by the given expression. @param expression The expression. @return The average value.

    Declaration

    Swift

    public static func avg(_ expression: Any) -> Expression
  • Create a COUNT() function expression that returns the count of all values in the group of the values expressed by the given expression. @param expression The expression. @return The count value.

    Declaration

    Swift

    public static func count(_ expression: Any) -> Expression
  • Create a MIN() function expression that returns the minimum value in the group of the values expressed by the given expression. @param expression The expression. @return The minimum value.

    Declaration

    Swift

    public static func min(_ expression: Any) -> Expression
  • Create a MAX() function expression that returns the maximum value in the group of the values expressed by the given expression. @param expression The expression. @return The maximum value.

    Declaration

    Swift

    public static func max(_ expression: Any) -> Expression
  • Create a SUM() function expression that return the sum of all number values in the group of the values expressed by the given expression. @param expression The expression. @return The sum value.

    Declaration

    Swift

    public static func sum(_ expression: Any) -> Expression