TransactionAttemptContext

class TransactionAttemptContext

Functions

Link copied to clipboard
suspend fun get(collection: Collection, id: String): TransactionGetResult

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

Link copied to clipboard
inline suspend fun <T> insert(collection: Collection, id: String, content: T, jsonSerializer: JsonSerializer? = null): TransactionGetResult

Inserts a new document into the specified Couchbase collection.

Link copied to clipboard
suspend fun query(statement: String, parameters: QueryParameters = QueryParameters.None, scope: Scope? = null, serializer: JsonSerializer? = null, consistency: QueryScanConsistency = QueryScanConsistency.requestPlus(), readonly: Boolean = false, adhoc: Boolean = true, flexIndex: Boolean = false, profile: QueryProfile = QueryProfile.OFF, scanCap: Int? = null, pipelineBatch: Int? = null, pipelineCap: Int? = null, clientContextId: String? = UUID.randomUUID().toString(), raw: Map<String, Any?> = emptyMap()): QueryResult

Executes a SQL++ query, buffers all result rows in memory, and returns them as a QueryResult.

Link copied to clipboard
suspend fun remove(doc: TransactionGetResult)

Removes the specified doc.

Link copied to clipboard
inline suspend fun <T> replace(doc: TransactionGetResult, content: T, jsonSerializer: JsonSerializer? = null): TransactionGetResult

Mutates the specified doc with new content.