CBLCollectionConfiguration
@interface CBLCollectionConfiguration : NSObject
The collection configuration that can be configured specifically for the replication.
-
The custom conflict resolver function. If this value is nil, the default conflict resolver will be used.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) CBLCollection *collection; -
The custom conflict resolver function. If this value is nil, the default conflict resolver will be used.
Declaration
Objective-C
@property (nonatomic, nullable) id<CBLConflictResolver> conflictResolver; -
Filter function for validating whether the documents can be pushed to the remote endpoint. Only documents of which the function returns true are replicated.
Declaration
Objective-C
@property (nonatomic) int pushFilter; -
Filter function for validating whether the documents can be pulled from the remote endpoint. Only documents of which the function returns true are replicated.
Declaration
Objective-C
@property (nonatomic) int pullFilter; -
Channels filter for specifying the channels for the pull the replicator will pull from. For any collections that do not have the channels filter specified, all accessible channels will be pulled. Push replicator will ignore this filter.
@Note: Channels are not supported in Peer-to-Peer and Database-to-Database replication.
Declaration
Objective-C
@property (nonatomic, nullable) NSArray<NSString *> *channels; -
Document IDs filter to limit the documents in the collection to be replicated with the remote endpoint. If not specified, all docs in the collection will be replicated.
Declaration
Objective-C
@property (nonatomic, nullable) NSArray<NSString *> *documentIDs; -
Initializes a collection configuration with the given collection.
Declaration
Objective-C
- (nonnull instancetype)initWithCollection:(nonnull CBLCollection *)collection;Parameters
collectionThe collection instance.
-
Deprecated
Use -initWithCollection: instead.
Initializes a collection configuration.
@deprecated Use
-initWithCollection:instead.Declaration
Objective-C
- (nonnull instancetype)init; -
Creates an array of
CBLCollectionConfigurationobjects from the given collections.Each collection is wrapped in a
CBLCollectionConfigurationusing default settings (no filters and no custom conflict resolvers).This is a convenience method for configuring multiple collections with default configurations. If custom configurations are needed, construct
CBLCollectionConfigurationobjects directly instead.Declaration
Objective-C
+ (nonnull NSArray<CBLCollectionConfiguration *> *)fromCollections: (nonnull NSArray<CBLCollection *> *)collections;Parameters
collectionsThe collections to replicate.
Return Value
An array of CBLCollectionConfiguration objects for the given collections.
CBLCollectionConfiguration Class Reference