简体   繁体   中英

Multiple documents update in couchbase

What is the best way to update multiple documents in couchbase in one go?

Means I have to update similar kind of information in multiple couchbase documents. The simple way is fetching all these documents in java and then updating them, which is not a good solution.

Does couchbase provide some kind of functionality or API, which can be used? Given that, the document structure of all these documents is the same.

We have searched the couchbase website but nothing is available.

Thanks.

When We want to update multiple document in couchbase it's possible but when something happened in between the transaction (any exception) then couchbase not supporting rollback mechanism.

For this you have to use : Couchbase Transactions

For Spring boot developers: Spring Boot data with Couchbase Transactions

@Az.Mayo is right - but note that N1QL doesn't support transactions - you will need the Java SDK specifically for the Couchbase Transactions .

  • Couchbase docs for update: Update

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM