Hi Robert,

such a feature already exists, it's used in the replication protocol. You have 
to search for `new_edits` in the docs 
(<http://docs.couchdb.org/en/2.0.0/api/database/bulk-api.html#db-bulk-docs>) to 
find some information about it. There is also information in the replication 
protocol definition.

However, there are some requirements on the _rev-IDs, so please keep that in 
mind when opening this escape hatch. It might be better to have a local, 
compatible instance that replicates upstream (for example, PouchDB) instead of 
implementing part of the replication protocol yourself (and thus sharing the 
responsibility for correctness).

Best regards,
Jonas

Am 20. Oktober 2016 um 10:31:30 +02:00, hat Robert Nagy 
<robert.n...@boffins.se> geschrieben:

> I would like to request a feature which would allow clients to provide the 
> revId during PUT and bulkDocs. Something like:
> 
> db.put({
> _id,
> _rev,
> _hash // _revId, _uuid, _something
> }).then(({ rev }) => assert(rev === _hash))
> 
> That way the client doesn’t have to directly wait for the reply before 
> preparing a next (optimistic) update.
> Best Regards,
> 
> Robert Nagy
> 
> Robert Nagy
> Mail: <robert.n...@boffins.se> <mailto:<robert.n...@boffins.se>> | Phone: +46 
> (0)735441639 | Web: Boffins Technologies AB <<http://www.boffins.se/>>
> 
> Boffins Technologies
> Södervägen 12
> 232 52 Åkarp
> Sweden
>

Reply via email to