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 id)expression
                                       value:(nullable id)value;

    Parameters

    expression

    The expression that evluates 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 id)expression;

    Parameters

    expression

    The expression that evluates to an array.

    Return Value

    The ARRAY_LENGTH(expr) function.