Package com.couchbase.lite
Class ArrayExpression
- java.lang.Object
-
- com.couchbase.lite.ArrayExpression
-
public final class ArrayExpression extends Object
Array expression
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayExpressionIn
any(VariableExpression variable)
Creates an ANY Quantified operator (ANY <variable name> IN <expr> SATISFIES <expr>) with the given variable name.static ArrayExpressionIn
anyAndEvery(VariableExpression variable)
Creates an ANY AND EVERY Quantified operator (ANY AND EVERY <variable name> IN <expr> SATISFIES <expr>) with the given variable name.static ArrayExpressionIn
every(VariableExpression variable)
Creates an EVERY Quantified operator (EVERY <variable name> IN <expr> SATISFIES <expr>) with the given variable name.static VariableExpression
variable(String name)
Creates a variable expression.
-
-
-
Method Detail
-
any
@NonNull public static ArrayExpressionIn any(@NonNull VariableExpression variable)
Creates an ANY Quantified operator (ANY <variable name> IN <expr> SATISFIES <expr>) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each item of which will be evaluated against the satisfies expression. The ANY operator returns TRUE if at least one of the items in the array satisfies the given satisfies expression.- Parameters:
variable
- The variable expression.- Returns:
- An In object
-
every
@NonNull public static ArrayExpressionIn every(@NonNull VariableExpression variable)
Creates an EVERY Quantified operator (EVERY <variable name> IN <expr> SATISFIES <expr>) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each of which will be evaluated against the satisfies expression. The EVERY operator returns TRUE if the array is empty OR every item in the array satisfies the given satisfies expression.- Parameters:
variable
- The variable expression.- Returns:
- An In object.
-
anyAndEvery
@NonNull public static ArrayExpressionIn anyAndEvery(@NonNull VariableExpression variable)
Creates an ANY AND EVERY Quantified operator (ANY AND EVERY <variable name> IN <expr> SATISFIES <expr>) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each of which will be evaluated against the satisfies expression. 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.- Parameters:
variable
- The variable expression.- Returns:
- An In object.
-
variable
@NonNull public static VariableExpression variable(@NonNull String name)
Creates a variable expression. The variable are used to represent each item in an array in the quantified operators (ANY/ANY AND EVERY/EVERY <variable name> IN <expr> SATISFIES <expr>) to evaluate expressions over an array.- Parameters:
name
- The variable name- Returns:
- A variable expression
-
-