ditto-lib / live.ditto / DittoWriteTransaction

DittoWriteTransaction

class DittoWriteTransaction

DittoWriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction. You must use the scoped function to get collection-scoped access to the write transaction object, which will then allow you to perform insert, update, remove or evict operations using the write transaction.

Constructors

<init>

DittoWriteTransaction(writeTxn: SWIGTYPE_p_Ditto_WriteTransaction, dittoHandle: SWIGTYPE_p_Ditto, siteID: Long, objectMapper: ObjectMapper)

DittoWriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction. You must use the scoped function to get collection-scoped access to the write transaction object, which will then allow you to perform insert, update, remove or evict operations using the write transaction.

Properties

dittoHandle

val dittoHandle: SWIGTYPE_p_Ditto

objectMapper

val objectMapper: ObjectMapper

results

var results: MutableList<DittoWriteTransactionResult>

siteID

val siteID: Long

writeTxn

val writeTxn: SWIGTYPE_p_Ditto_WriteTransaction

Functions

scoped

fun scoped(collectionName: String): DittoScopedWriteTransaction

Creates a DittoScopedWriteTransaction object that will ensure that operations called on it are all in the context of the collection name provided to this function. You can create many DittoScopedWriteTransaction objects per DittoWriteTransaction object.