CBLQueryFunction

@interface CBLQueryFunction : NSObject

CBLQueryFunction provides query functions.

  • Creates an AVG(expr) function expression that returns the average of all the number values in the group of the values expressed by the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)avg:(nonnull CBLQueryExpression *)expression;

    Swift

    class func avg(_ expression: CBLQueryExpression) -> CBLQueryExpression

    Parameters

    expression

    The expression.

    Return Value

    The AVG(expr) function.

  • Creates a COUNT(expr) function expression that returns the count of all values in the group of the values expressed by the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)count:(nonnull CBLQueryExpression *)expression;

    Swift

    class func count(_ expression: CBLQueryExpression) -> CBLQueryExpression

    Parameters

    expression

    The expression.

    Return Value

    The COUNT(expr) function.

  • Creates a MIN(expr) function expression that returns the minimum value in the group of the values expressed by the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)min:(nonnull CBLQueryExpression *)expression;

    Swift

    class func min(_ expression: CBLQueryExpression) -> CBLQueryExpression

    Parameters

    expression

    The expression.

    Return Value

    The MIN(expr) function.

  • Creates a MAX(expr) function expression that returns the maximum value in the group of the values expressed by the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)max:(nonnull CBLQueryExpression *)expression;

    Swift

    class func max(_ expression: CBLQueryExpression) -> CBLQueryExpression

    Parameters

    expression

    The expression.

    Return Value

    The MAX(expr) function.

  • Creates a SUM(expr) function expression that return the sum of all number values in the group of the values expressed by the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)sum:(nonnull CBLQueryExpression *)expression;

    Swift

    class func sum(_ expression: CBLQueryExpression) -> CBLQueryExpression

    Parameters

    expression

    The expression.

    Return Value

    The SUM(expr) function.