Couchbase Lite
Objective-C API for iOS and Mac OS
Instance Methods | List of all members
<CBLConflictResolver> Protocol Reference

Detailed Description

Abstract interface for an application-defined object that can resolve a conflict between two revisions of a document.

Called when saving a CBLDocument, when there is a a newer revision already in the database; and also when the replicator pulls a remote revision that conflicts with a locally-saved revision.

Inheritance diagram for <CBLConflictResolver>:

Instance Methods

(nullable NSDictionary *) - resolveMine:withTheirs:andBase:
 Resolves conflicting edits of a document against their common base. More...
 

Method Documentation

- (nullable NSDictionary*) resolveMine: (NSDictionary *)  localProperties
withTheirs: (NSDictionary *)  conflictingProperties
andBase: (NSDictionary *)  baseProperties 

Resolves conflicting edits of a document against their common base.

Parameters
localPropertiesThe revision that is being saved, or the revision in the local database for which there is a server-side conflict.
conflictingPropertiesThe conflicting revision that is already stored in the database, or on the server.
basePropertiesThe common parent revision of these two revisions, if available.
Returns
The resolved set of properties for the document to store, or nil to give up if automatic resolution isn't possible.

The documentation for this protocol was generated from the following file: