The easiest way to retrieve a specific document by ID from your Couchbase cluster is by calling the get() method.
get()
person = client.get( id = "brad" );
There are many other methods for getting data. Please check the API Docsarrow-up-right (in the download) to see full descriptions and code samples for all of them.
getMulti() - Get multiple objects from couchbase with a single call.
getMulti()
getAndTouch() - Get a document and update its expiry value
getAndTouch()
getAndLock() - Get a document and lock it for a specified amount of time
getAndLock()
getFromReplica() - Get a document from a replica
getFromReplica()
getWithCAS() - Get an object from couchbase with a special Compare And Swap (CAS) version (for use wit replaceWithCAS())
getWithCAS()
replaceWithCAS()
n1qlQuery() - Get a document using a N1QL query
n1qlQuery()
Last updated 7 years ago
Was this helpful?