Details
Description
Replication related API issues from GitHub.
From https://github.com/couchbaselabs/couchbase-lite-api/issues/58
There are several issues in this repo that cover adding specific optional properties to replications. Those would all become part of this properties object. I'll add links to/from them.
The controversy when we discussed this in the past is whether properties should be a dictionary, supporting arbitrary string keys, or a custom class with a specific set of properties.
- A dictionary is simpler to implement and uses less code than adding a new class and properties.
- A dictionary maps exactly to the properties in the POST request to _replicate in the REST API (that's actually why I created it.)
- It's easy (for better or worse) to add unofficial properties to a dictionary, i.e. for a specific customer or as a workaround for a problem, without needing to touch the API. (An example of this is the "websockets" property in iOS that you can set to false to disable use of websockets.)
- A custom class is simpler to use, and the documentation is slightly clearer (we document the properties, not string constants naming keys.)
- A custom class's properties are type-safe.