CBLArrayIndexConfiguration

@interface CBLArrayIndexConfiguration

Configuration for indexing property values within nested arrays in documents, intended for use with the UNNEST query.

  • Path to the array, which can be nested.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull path;
  • The expressions representing the values within the array to be indexed.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray<NSString *> *expressions;
  • Initializes the configuration with paths to the nested array and the optional expressions for the values within the arrays to be indexed.

    Note

    Use “[]” to represent a property that is an array of each nested array level. For a single array or the last level array, the “[]” is optional.

    For instance, use “contacts[].phones” to specify an array of phones within each contact.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull NSString *)path
                             expressions:
                                 (nullable NSArray<NSString *> *)expressions;

    Parameters

    path

    Path to the array, which can be nested to be indexed.

    expressions

    An optional array of strings, where each string represents an expression defining the values within the array to be indexed. If the array specified by the path contains scalar values, this parameter can be null.

    Return Value

    The CBLArrayIndexConfiguration object.