CBLQueryArrayExpression

Undocumented

  • Creates a variable expression. The variable are used to represent each item in an array in the quantified operators (ANY/ANY AND EVERY/EVERY IN SATISFIES ) to evaluate expressions over an array.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)variableNamed:(nonnull NSString *)name;

    Parameters

    name

    The variable name.

    Return Value

    The variable expression.

  • Creates an ANY quantified operator (ANY IN SATISFIES ) to evaluate expressions over an array. The ANY operator returns TRUE if at least one of the items in the array satisfies the given satisfies expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)any:(nonnull NSString *)variableName
                                     in:(nonnull id)inExpression
                              satisfies:(nonnull CBLQueryExpression *)satisfies;

    Parameters

    variableName

    The variable name represent to an item in the array.

    inExpression

    The array expression that can be evaluated as an array.

    satisfies

    The expression to be evaluated with.

    Return Value

    The ANY quantifies operator.

  • Creates an ANY AND EVERY quantified operator (ANY AND EVERY IN SATISFIES ) to evaluate expressions over an array. The ANY AND EVERY operator returns TRUE if the array is NOT empty, and at least one of the items in the array satisfies the given satisfies expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)anyAndEvery:(nonnull NSString *)variableName
                                             in:(nonnull id)inExpression
                                      satisfies:
                                          (nonnull CBLQueryExpression *)satisfies;

    Parameters

    variableName

    The variable name represent to an item in the array.

    inExpression

    The array expression that can be evaluated as an array.

    satisfies

    The expression to be evaluated with.

    Return Value

    The ANY AND EVERY quantifies operator.

  • Creates an EVERY quantified operator (ANY IN SATISFIES ) to evaluate expressions over an array. The EVERY operator returns TRUE if the array is empty OR every item in the array satisfies the given satisfies expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)every:(nonnull NSString *)variableName
                                       in:(nonnull id)inExpression
                                satisfies:(nonnull CBLQueryExpression *)satisfies;

    Parameters

    variableName

    The variable name represent to an item in the array.

    inExpression

    The array expression that can be evaluated as an array.

    satisfies

    The expression to be evaluated with.

    Return Value

    The EVERY quantifies operator.