DittoSyncKit  1.0.0-alpha1
Public Member Functions | List of all members
Ditto.SyncKit.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 Ditto.SyncKit.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 Ditto.SyncKit.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 Ditto.SyncKit.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> Ditto.SyncKit.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.