CBLIndexable

@protocol CBLIndexable <NSObject>

The Indexable interface defines a set of functions for managing the query indexes.

  • Return all index names, or nil if an error occurred.

    Declaration

    Objective-C

    - (nullable NSArray<NSString *> *)indexes:(NSError *_Nullable *_Nullable)error;
  • Create an index with the index name and config.

    Declaration

    Objective-C

    - (BOOL)createIndexWithName:(nonnull NSString *)name
                         config:(nonnull CBLIndexConfiguration *)config
                          error:(NSError *_Nullable *_Nullable)error;
  • Create an index with the index name and index.

    Declaration

    Objective-C

    - (BOOL)createIndex:(nonnull CBLIndex *)index
                   name:(nonnull NSString *)name
                  error:(NSError *_Nullable *_Nullable)error;
  • Delete an index by name.

    Declaration

    Objective-C

    - (BOOL)deleteIndexWithName:(nonnull NSString *)name
                          error:(NSError *_Nullable *_Nullable)error;
  • Get an index object by name.

    Declaration

    Objective-C

    - (nullable CBLQueryIndex *)indexWithName:(nonnull NSString *)name
                                        error:(NSError *_Nullable *_Nullable)error;