Reputation: 2989
I want to increments the numerical value of special counter document, Obtain the id from counter document and increment it
com.couchbase.client.java.Bucket bucket;
JsonLongDocument joCounter = bucket.counter(docKey, 1);
but I don't know how to instantiate the bucket object
Upvotes: 1
Views: 282
Reputation: 516
Our documentation for the Java client shows how to connect to a Couchbase cluster and open a bucket:
https://docs.couchbase.com/java-sdk/current/start-using-sdk.html
Upvotes: 1