DITWriteTransactionPendingIDSpecificOperation
@interface DITWriteTransactionPendingIDSpecificOperation : NSObject
These objects are returned when using findByID
functionality on DITScopedWriteTransaction
s.
You can use them to perform updates on a document and remove or evict a document.
-
Remove the document with the matching ID.
Declaration
Objective-C
- (BOOL)remove;
Return Value
true
if the document was found and removed.false
if the document wasn’t found and therefore wasn’t removed. -
Evict the document with the matching ID.
Declaration
Objective-C
- (BOOL)evict;
Return Value
true
if the document was found and evicted.false
if the document wasn’t found and therefore wasn’t evicted. -
Update the document with the matching ID.
Declaration
Objective-C
- (nonnull NSArray<DITUpdateResult *> *)updateWithBlock: (nonnull void (^)(DITMutableDocument *_Nullable))block;
Parameters
block
A block that gets called with the document matching the ID. If found, the document is a
DITMutableDocument
, so you can call update-related functions on it. If the document is not found then the value provided to the block will benil
.Return Value
A list of
DITUpdateResult
s that describe the updates that were performed on the document.