get

suspend fun get(collection: Collection, id: String): TransactionGetResult

Gets a document from the specified Couchbase collection matching the specified id.

Return

a TransactionGetResult containing the document

Parameters

collection

the Couchbase collection containing the document

id

the ID of the document to get

Throws

DocumentNotFoundException

if the document does not exist