Ditto 1.1.8
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 ID. More...
 
unsafe List< DittoUpdateResultUpdate (Action< DittoMutableDocument > updater)
 Update the document with the matching ID. More...
 
unsafe bool Remove ()
 Remove the document with the matching ID. More...
 
unsafe bool Evict ()
 Evict the document with the matching ID. 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 ID.

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 ID.

Returns
The DittoDocument with the ID 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 ID.

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 ID.

Parameters
updaterAn Action that gets called with the document matching the ID. 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.