CBLQueryArrayFunction

@interface CBLQueryArrayFunction : NSObject

CBLQueryArrayFunction provides array based functions.

  • Creates an ARRAY_CONTAINS(expr, value) function that checks whether the given array expression contains the given value or not.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)contains:
                                        (nonnull CBLQueryExpression *)expression
                                       value:(nonnull CBLQueryExpression *)value;

    Parameters

    expression

    The expression that evaluates to an array.

    value

    The value to search for in the given array expression.

    Return Value

    The ARRAY_CONTAINS(expr, value) function.

  • Creates an ARRAY_LENGTH(expr) function that returns the length of the given array expression.

    Declaration

    Objective-C

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

    Parameters

    expression

    The expression that evaluates to an array.

    Return Value

    The ARRAY_LENGTH(expr) function.

  • Not available

    Declaration

    Objective-C

    - (nonnull instancetype)init;