upsert
inline suspend fun <T> upsert(id: String, content: T, common: CommonOptions = CommonOptions.Default, transcoder: Transcoder? = null, durability: Durability = Durability.none(), expiry: Expiry = Expiry.None, @SinceCouchbase(value = "7.0" ) preserveExpiry: Boolean = false): MutationResult
Content copied to clipboard
Updates a document if it exists, otherwise inserts it.
To update a document using a Compare And Swap (CAS) value, see replace.
Parameters
id
The ID of the document to insert or update.
content
document content
transcoder
defaults to the transcoder configured on the cluster environment.