Support for revisions in Find, AddOrUpdate
Revisions are essential feature for MVCC in CouchDB. Passing a revision to PUT request makes you aware of the conflict (if happen) via response 409 Conflict from CouchDB HTTP API. That's why we need to support passing revisions to AddOrUpdate method.
To avoid breaking changes with my addition and while more request options might be introduced in future, I contributed to DatabaseApiMethodOptions namespace and:
- added
FindOptions+ICouchDatabase<TSource>.FindAsyncpaired method - added
AddOrUpdateOptions+ICouchDatabase<TSource>.AddOrUpdateAsyncpaired method - added
AddOptions+ICouchDatabase<TSource>.AddAsyncpaired method
I suppose in the future another contributors whould't extend method parameters, instead add properties to DatabaseApiMethodOptions.*Options objects.
Unit-tests covering new options are added.
I checked and see that for attachements revisions are already supported by CouchAttachment class which is passing DocumentRev to DownloadAttachmentAsync(..) and DownloadAttachmentAsStreamAsync(..).
Added "Revisions" section to README.