java.lang.Object
com.couchbase.client.java.query.dsl.functions.Collections

@Experimental
@Public
public class Collections
extends Object
DSL for N1QL Collections (aka comprehensions, ANY, EVERY, ARRAY and FIRST...).
Since:
2.2
Author:
Simon Baslé
  • Method Details

    • anyIn

      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.
    • anyAndEveryIn

      public static Collections.SatisfiesBuilder anyAndEveryIn​(String variable, Expression expression)
      Create an ANY AND EVERY 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. 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.
    • anyWithin

      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.
    • everyIn

      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.
    • everyWithin

      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.
    • arrayIn

      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.
    • arrayWithin

      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.
    • firstIn

      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.
    • firstWithin

      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.