DITWriteTransactionResult
@interface DITWriteTransactionResult : NSObject
Provides information about the result of an operation on a document that was part of a write transaction.
The write transaction result can be one of the following types:
inserted
removed
evicted
updated
-
The ID of the document involved in the operation.
Declaration
Objective-C
@property (nonatomic, readonly) DITDocumentID *_Nonnull docID;
-
The name of the collection that the operation took place in.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull collectionName;
-
The type of write transaction result.
Check this value before using one of
asInserted
,asRemoved
,asEvicted
, orasUpdated
to ensure that you get the correct richer write transaction result object.Declaration
Objective-C
@property (nonatomic, readonly) DITWriteTransactionResultType type;
-
Get the update result’s value as a
DITWriteTransactionResultInserted
, if it is of that type.Declaration
Objective-C
- (nullable DITWriteTransactionResultInserted *)asInserted;
Return Value
A
DITWriteTransactionResultInserted
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DITWriteTransactionResultRemoved
, if it is of that type.Declaration
Objective-C
- (nullable DITWriteTransactionResultRemoved *)asRemoved;
Return Value
A
DITWriteTransactionResultRemoved
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DITWriteTransactionResultEvicted
, if it is of that type.Declaration
Objective-C
- (nullable DITWriteTransactionResultEvicted *)asEvicted;
Return Value
A
DITWriteTransactionResultEvicted
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DITWriteTransactionResultUpdated
, if it is of that type.Declaration
Objective-C
- (nullable DITWriteTransactionResultUpdated *)asUpdated;
Return Value
A
DITWriteTransactionResultUpdated
if the value is of that type, otherwisenil
.