Hi Team,
I have worked on counter during update like shown below.
import static com.couchbase.client.java.kv.MutateInSpec.increment;
public static void main(String[] args) {
List<MutateInSpec> updateSpecs = new ArrayList<>();
updateSpecs.add(increment("processCnt", 1));
updateSpecs.add(MutateInSpec.upsert("processCntUpdTm", System.currentTimeMillis()));
sdkupdate();//code
}
Above code seem to work fine.
But how to do increment during document creation.
I am using Java -couchbase SDK 3.0 .
Whenever I search for counters , couchbase sdk points to below link Core Operations | Couchbase Docs.
The method bucket.counter() does not exist.
What is the equivalent version of this ?
Thanks in advance