1

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

Sandro Rey
  • 2,429
  • 13
  • 36
  • 80

1 Answers1

1

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

Graham Pople
  • 416
  • 4
  • 8