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