Skip to content

Commit 0aeb43e

Browse files
authored
README update how to use options / revisions
README update to reflect how to use options and how to fork with revisions
1 parent a7a1699 commit 0aeb43e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ var tasks = await client.GetActiveTasksAsync();
268268
```csharp
269269
// CRUD
270270
await rebels.AddAsync(rebel);
271+
await rebels.AddAsync(rebel, batch: true);
271272
await rebels.AddOrUpdateAsync(rebel);
273+
await rebels.AddOrUpdateAsync(rebel, batch: true);
272274
await rebels.RemoveAsync(rebel);
273275
var rebel = await rebels.FindAsync(id);
274276
var rebel = await rebels.FindAsync(id, withConflicts: true);
@@ -389,6 +391,19 @@ string downloadFilePath = await rebels.DownloadAttachment(attachment, downloadFo
389391
Stream responseStream = await rebels.DownloadAttachmentAsStreamAsync(attachment);
390392
```
391393

394+
## Revisions
395+
396+
The options for 'FindAsync(..)' and 'AddOrUpdateAsync(..)' support passing revision:
397+
398+
```csharp
399+
await _rebels.FindAsync("1", new FindOptions { Rev = "1-xxx" });
400+
await _rebels.AddOrUpdateAsync(r, new AddOrUpdateOptions { Rev = "1-xxx" });
401+
```
402+
403+
Options also can be used to pass 'Batch', 'Conflicts' where applicable.
404+
405+
For attachements revisions are supported by 'CouchAttachment' class which is passing 'DocumentRev' to 'DownloadAttachmentAsync(..)' and 'DownloadAttachmentAsStreamAsync(..)'.
406+
392407
## DB Changes Feed
393408

394409
The following *feed modes* are supported: `normal`, `longpool` and `continuous`.
@@ -741,4 +756,4 @@ Also, the configurator has `ConfigureFlurlClient` to set custom HTTP client opti
741756

742757
[Benjamin Höglinger-Stelzer](https://github.com/nefarius), [mwasson74](https://github.com/mwasson74), [Emre ÇAĞLAR](https://github.com/emrecaglar): Attachments improvments and fixes.
743758

744-
[Dhiren Sham](https://github.com/dhirensham): Implementing replication.
759+
[Dhiren Sham](https://github.com/dhirensham): Implementing replication.

0 commit comments

Comments
 (0)