@InterfaceStability.Experimental @InterfaceAudience.Public public class Collections extends Object
DSL for N1QL Collections (aka comprehensions, ANY, EVERY, ARRAY and FIRST…).
Modifier and Type | Class and Description |
---|---|
static class |
Collections.SatisfiesBuilder |
static class |
Collections.WhenBuilder |
Constructor and Description |
---|
Collections() |
Modifier and Type | Method and Description |
---|---|
static Collections.SatisfiesBuilder |
anyIn(String variable,
Expression expression)
Create an ANY comprehension with a first IN range.
|
static Collections.SatisfiesBuilder |
anyWithin(String variable,
Expression expression)
Create an ANY comprehension with a first WITHIN range.
|
static Collections.WhenBuilder |
arrayIn(Expression arrayExpression,
String variable,
Expression expression)
Create an ARRAY comprehension with a first IN range.
|
static Collections.WhenBuilder |
arrayWithin(Expression arrayExpression,
String variable,
Expression expression)
Create an ARRAY comprehension with a first WITHIN range.
|
static Collections.SatisfiesBuilder |
everyIn(String variable,
Expression expression)
Create an EVERY comprehension with a first IN range.
|
static Collections.SatisfiesBuilder |
everyWithin(String variable,
Expression expression)
Create an EVERY comprehension with a first WITHIN range.
|
static Collections.WhenBuilder |
firstIn(Expression arrayExpression,
String variable,
Expression expression)
Create a FIRST comprehension with a first IN range.
|
static Collections.WhenBuilder |
firstWithin(Expression arrayExpression,
String variable,
Expression expression)
Create a FIRST comprehension with a first WITHIN range.
|
public static Collections.SatisfiesBuilder anyIn(String variable, Expression expression)
Create an ANY comprehension with a first IN range.
ANY is a range predicate that allows you to test a Boolean condition over the elements or attributes of a collection, object, or objects. It uses the IN and WITHIN operators to range through the collection. IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
If at least one item in the array satisfies the ANY expression, then ANY returns TRUE, otherwise returns FALSE.
public static Collections.SatisfiesBuilder anyWithin(String variable, Expression expression)
Create an ANY comprehension with a first WITHIN range.
ANY is a range predicate that allows you to test a Boolean condition over the elements or attributes of a collection, object, or objects. It uses the IN and WITHIN operators to range through the collection. IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
If at least one item in the array satisfies the ANY expression, then ANY returns TRUE, otherwise returns FALSE.
public static Collections.SatisfiesBuilder everyIn(String variable, Expression expression)
Create an EVERY comprehension with a first IN range.
EVERY is a range predicate that allows you to test a Boolean condition over the elements or attributes of a collection, object, or objects. It uses the IN and WITHIN operators to range through the collection.
IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
If every array element satisfies the EVERY expression, it returns TRUE. Otherwise it returns FALSE. If the array is empty, it returns TRUE.
public static Collections.SatisfiesBuilder everyWithin(String variable, Expression expression)
Create an EVERY comprehension with a first WITHIN range.
EVERY is a range predicate that allows you to test a Boolean condition over the elements or attributes of a collection, object, or objects. It uses the IN and WITHIN operators to range through the collection.
IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
If every array element satisfies the EVERY expression, it returns TRUE. Otherwise it returns FALSE. If the array is empty, it returns TRUE.
public static Collections.WhenBuilder arrayIn(Expression arrayExpression, String variable, Expression expression)
Create an ARRAY comprehension with a first IN range.
The ARRAY operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand expression, that satisfies the WHEN clause, if provided.
For elements, IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
public static Collections.WhenBuilder arrayWithin(Expression arrayExpression, String variable, Expression expression)
Create an ARRAY comprehension with a first WITHIN range.
The ARRAY operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand expression, that satisfies the WHEN clause, if provided.
For elements, IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
public static Collections.WhenBuilder firstIn(Expression arrayExpression, String variable, Expression expression)
Create a FIRST comprehension with a first IN range.
The FIRST operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to a single element based on the operand expression that satisfies the WHEN clause, if provided.
For each variable, IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
public static Collections.WhenBuilder firstWithin(Expression arrayExpression, String variable, Expression expression)
Create a FIRST comprehension with a first WITHIN range.
The FIRST operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to a single element based on the operand expression that satisfies the WHEN clause, if provided.
For each variable, IN ranges in the direct elements of its array expression, WITHIN also ranges in its descendants.
Copyright © 2014 Couchbase, Inc.