Ditto Scoped Write Transaction
class DittoScopedWriteTransaction(baseTransaction: DittoWriteTransaction, val collectionName: String)
DittoScopedWriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction.
Properties
Functions
Link copied to clipboard
Generates a DittoWriteTransactionPendingCursorOperation with the provided query that can be used to update, remove, or evict documents.
Link copied to clipboard
Generates a DittoWriteTransactionPendingCursorOperation that can be used to update, remove or evict documents.
Link copied to clipboard
Generates a DittoWriteTransactionPendingIdSpecificOperation with the provided document identifier that can be used to update, remove, or evict the document.
Link copied to clipboard
fun <T : Any> upsert(value: T, writeStrategy: DittoWriteStrategy = DittoWriteStrategy.Merge): DittoDocumentId
Inserts a new document into the collection and returns its identifier. If the document already exists, the behavior is determined by the given writeStrategy
.