CBLQueryArrayExpression
@interface CBLQueryArrayExpression : NSObject
/**
Creates a variable expression that represents an item in the array expression
(ANY/ANY AND EVERY/EVERY <variable> IN <expr> SATISFIES <expr>).
@param name The variable name.
@return The variable expression.
*/
+ (CBLQueryVariableExpression*) variableWithName: (NSString*)name;
/**
Creates an ANY quantified operator (ANY <variable> IN <expr> SATISFIES <expr>)
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.
@param variable The variable expression.
@param inExpression The IN expression that can be evaluated as an array value.
@param satisfies The expression to be evaluated with.
@return The ANY quantifies operator.
*/
+ (CBLQueryExpression*) any: (CBLQueryVariableExpression*)variable
in: (CBLQueryExpression*)inExpression
satisfies: (CBLQueryExpression*)satisfies;
/**
Creates an ANY AND EVERY quantified operator (ANY AND EVERY <variable name> IN <expr>
SATISFIES <expr>) 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.
@param variable The variable expression.
@param inExpression The IN expression that can be evaluated as an array value.
@param satisfies The expression to be evaluated with.
@return The ANY AND EVERY quantifies operator.
*/
+ (CBLQueryExpression*) anyAndEvery: (CBLQueryVariableExpression*)variable
in: (CBLQueryExpression*)inExpression
satisfies: (CBLQueryExpression*)satisfies;
/**
Creates an EVERY quantified operator (ANY <variable name> IN <expr> SATISFIES <expr>)
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.
@param variable The variable expression.
@param inExpression The IN expression that can be evaluated as an array value.
@param satisfies The expression to be evaluated with.
@return The EVERY quantifies operator.
*/
+ (CBLQueryExpression*) every: (CBLQueryVariableExpression*)variable
in: (CBLQueryExpression*)inExpression
satisfies: (CBLQueryExpression*)satisfies;
/** Not available */
- (instancetype) init NS_UNAVAILABLE;
@end
Undocumented
-
Creates a variable expression that represents an item in the array expression (ANY/ANY AND EVERY/EVERY
IN SATISFIES ). Declaration
Objective-C
+ (nonnull CBLQueryVariableExpression *)variableWithName: (nonnull NSString *)name;
Swift
class func variable(withName name: String) -> CBLQueryVariableExpression
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 CBLQueryVariableExpression *)variable in:(nonnull CBLQueryExpression *)inExpression satisfies:(nonnull CBLQueryExpression *)satisfies;
Swift
class func any(_ variable: CBLQueryVariableExpression, in inExpression: CBLQueryExpression, satisfies: CBLQueryExpression) -> CBLQueryExpression
Parameters
variable
The variable expression.
inExpression
The IN expression that can be evaluated as an array value.
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 CBLQueryVariableExpression *)variable in:(nonnull CBLQueryExpression *)inExpression satisfies:(nonnull CBLQueryExpression *)satisfies;
Swift
class func anyAndEvery(_ variable: CBLQueryVariableExpression, in inExpression: CBLQueryExpression, satisfies: CBLQueryExpression) -> CBLQueryExpression
Parameters
variable
The variable expression.
inExpression
The IN expression that can be evaluated as an array value.
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 CBLQueryVariableExpression *)variable in:(nonnull CBLQueryExpression *)inExpression satisfies:(nonnull CBLQueryExpression *)satisfies;
Swift
class func every(_ variable: CBLQueryVariableExpression, in inExpression: CBLQueryExpression, satisfies: CBLQueryExpression) -> CBLQueryExpression
Parameters
variable
The variable expression.
inExpression
The IN expression that can be evaluated as an array value.
satisfies
The expression to be evaluated with.
Return Value
The EVERY quantifies operator.
-
Not available
Declaration
Objective-C
- (nonnull instancetype)init;