Ditto 3.0.6
Public Member Functions | List of all members
DittoSDK.DittoWriteTransactionPendingIdSpecificOperation Class Reference

These objects are returned when using DittoScopedWriteTransaction.FindById(string) functionality. More...

Public Member Functions

unsafe DittoDocument Exec ()
 Execute the find operation to return the document with the matching identifier. More...
 
unsafe List< DittoUpdateResultUpdate (Action< DittoMutableDocument > updater)
 Update the document with the matching identifier. More...
 
unsafe bool Remove ()
 Remove the document with the matching identifier. More...
 
unsafe bool Evict ()
 Evict the document with the matching identifier. More...
 

Detailed Description

These objects are returned when using DittoScopedWriteTransaction.FindById(string) functionality.

You can use them to perform updates on, remove, evict, or find a document.

Member Function Documentation

◆ Evict()

unsafe bool DittoSDK.DittoWriteTransactionPendingIdSpecificOperation.Evict ( )
inline

Evict the document with the matching identifier.

Returns
true if the document was found and evicted. false if the document wasn't found and therefore wasn't evicted.

◆ Exec()

unsafe DittoDocument DittoSDK.DittoWriteTransactionPendingIdSpecificOperation.Exec ( )
inline

Execute the find operation to return the document with the matching identifier.

Returns
The DittoDocument with the identifier provided in the DittoScopedWriteTransaction.FindById(string) call or null if the document was not found.

◆ Remove()

unsafe bool DittoSDK.DittoWriteTransactionPendingIdSpecificOperation.Remove ( )
inline

Remove the document with the matching identifier.

Returns
true if the document was found and removed. false if the document wasn't found and therefore wasn't removed.

◆ Update()

unsafe List< DittoUpdateResult > DittoSDK.DittoWriteTransactionPendingIdSpecificOperation.Update ( Action< DittoMutableDocument updater)
inline

Update the document with the matching identifier.

Parameters
updaterAn Action that gets called with the document matching the identifier. If found, the document is a DittoMutableDocument, so you can call update-related functions on it. If the document is not found then the value provided to the action will be nil.
Returns
A list of DittoUpdateResult objects that describe the updates that were performed on the document.